Mainnet
Loading…
Signet
Loading…
Two kinds of snapshot
- Pruned journal
- The journal keeps the last 2,000 blocks. The node runs brc20, bitmap and sns from the snapshot's height onward. Smallest download; the default.
- Full journal
- The journal holds every height. The node can also start a module from scratch: runes, inscriptions, or a brc20 rebuild that recomputes every cumulative hash itself.
Run a node from a snapshot
You need a Linux host with Docker (Compose v2), curl and zstd, 16 cores, 32 GB RAM and
600 GB or more of fast disk, plus a synced Bitcoin Core node with -txindex.
-
Build the image at the snapshot's OPI commit (the OPI column):
git clone https://github.com/bestinslot-xyz/OPI.git git -C OPI checkout <commit> curl -fsSLO https://cdn.opi.network/snapshots/Dockerfile docker build -f Dockerfile -t opi-monolith:local OPI -
Write the settings. Pick a Postgres password and keep the env files private:
mkdir -p -m 700 /srv/env PW=$(openssl rand -hex 24) printf 'POSTGRES_PASSWORD=%s\n' "$PW" > /srv/env/postgres.env printf 'BITCOIN_RPC_USER=%s\nBITCOIN_RPC_PASSWD=%s\nDB_PASSWD=%s\nBITMAP_DB_PASSWD=%s\nSNS_DB_PASSWD=%s\n' \ '<rpcuser>' '<rpcpassword>' "$PW" "$PW" "$PW" > /srv/env/opi.env chmod 600 /srv/env/*.env curl -fsSLO https://cdn.opi.network/snapshots/opi-node.compose.yml echo 'BITCOIN_RPC_URL=http://<bitcoind-host>:8332' > .env -
Restore into
/srv. The script checks every file againstSHA256SUMSand sets the database password from step 2:curl -fsSLO https://cdn.opi.network/snapshots/opi-restore.sh sudo bash opi-restore.sh # newest pruned mainnet snapshot sudo OPI_JOURNAL=full bash opi-restore.sh # newest full-journal snapshot sudo OPI_CHAIN=signet bash opi-restore.sh # signet sudo bash opi-restore.sh mainnet/975052/ # a given snapshot -
Start the node. It indexes from the snapshot's height to the tip:
docker compose -f opi-node.compose.yml up -d docker compose -f opi-node.compose.yml logs -f opiThe API listens on
127.0.0.1:8000and the BRC2.0 JSON-RPC on127.0.0.1:18545. SetOPI_BIND_ADDRin.envto serve them on a private address.
Verify
Every OPI node reports the same cumulative hashes for a block. Compare yours with the network's consensus at any height:
H=$(curl -s localhost:8000/v1/brc20/block_height)
curl -s "localhost:8000/v1/brc20/get_hash_of_all_activity?block_height=$H"
curl -s "https://api.opi.network/lc/get_best_hashes_for_block/$H?event_hash_version=3"
cumulative_event_hash and cumulative_trace_hash match best_cumulative_hash and
best_cumulative_trace_hash. The Check link in each row runs the same comparison for the snapshot's own block.
Machine-readable
index.json lists every snapshot's manifest, newest first;
https://cdn.opi.network/snapshots/<chain>/latest.json and latest-full.json point at the newest of each kind.
The full guide is in README.md.