Snapshots are created and preserved every week, and each snapshot is kept for 30 days. NodeReal, a community developer, is responsible for regularly creating and updating the snapshots.
At present, we offer snapshots for both the mainnet and testnet networks in path-based state scheme and archived formats. It is advisable to utilize the path-based state scheme snapshot for quicker synchronization, improved performance, and reduced storage needs.
For more details about different node type and database scheme, please refer to the official documentation.
- Path-Base-State-Scheme(recommand):
- url: https://opbnb-snapshot-mainnet.bnbchain.org/geth-pbss-20240924.tar.gz
- sha256 checksum: d218f4f72ac548259dccc279e500352a20c4f2969e91cebddcad4b2d3db5a5b3
- Archived:
- The full archived node status is too large(over 5.6 TB at the end of May, 2024). There is no available archive snapshot at the moment. If you do need a full archived node, you have to sync the node from scratch.
- Pruned Archived: (Note that the pruned snapshot has erased state data before block height: 19598373)
- url: https://opbnb-snapshot-mainnet.bnbchain.org/geth-prune-20240923.tar.gz
- sha256 checksum: 8319825a61c4603c1c969e5f24056953538e8b3f98f725ddf263373f5de50fbd
- Path-Base-State-Scheme(recommand):
- url: https://opbnb-snapshot-testnet.bnbchain.org/geth-pbss-20240925.tar.gz
- sha256 checksum: af33093e803d2097b769da34bd55a41e0940d1045f89cf708ba636a111c3f167
- Archived:
- There is no available archive snapshot at the moment.
Additionally, you can get the latest snapshot url and sha256 checksum as below:
$ curl https://opbnb-snapshot-mainnet.bnbchain.org/geth-pbss-latest
geth-pbss-20240525.tar.gz
$ curl https://opbnb-snapshot-mainnet.bnbchain.org/geth-pbss-20240525.tar.gz.sha256
d361af99362f3e6c55984e4aff127fffe9939e5c28274450f4b168b04d87370a geth-pbss-20240525.tar.gz
wget -q -O - https://opbnb-snapshot-mainnet.bnbchain.org/geth-pbss-20240525.tar.gz | tar -xvf -
- Stop the running
op-geth
client, ensuring that it has completely shut down. - To back up the original data, execute the following commands:
mv ${OPGeth_DataDir}/geth/chaindata ${OPGeth_DataDir}/geth/chaindata_backup mv ${OPGeth_DataDir}/geth/triecache ${OPGeth_DataDir}/geth/triecache_backup
- Replace the data with the snapshot by running:
mv ./geth/chaindata ${OPGeth_DataDir}/geth/chaindata mv ./geth/triecache ${OPGeth_DataDir}/geth/triecache
- Restart the
op-geth
client and verify the logs.
If you would like to build your own snapshot, you can follow the steps below:
tar -zcvf geth.tar.gz geth/chaindata geth/triecache
The process may take considerable time, depending on the size of the data.
Reminder: The geth/nodekey
file is specific to each node. If you plan to create your own snapshot, make sure not to include this file, as it may lead to peer-to-peer (P2P) connectivity problems when using the snapshot.