Skip to content

bnb-chain/bsc-snapshots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

About BSC Snapshots

Currently, there are 3 sources of BSC snapshot could be used, if you are unclear about their differences, you may refer Clarification of the snapshots first, to decide which snapshot suit you the most.

Source-1: Legacy Full Node

Usage: usage/legacyfullnode_usage.md

Currently, snapshots are provided as block history data divided by year. Each list includes world states, historical block files, URL, MD5, file size. Users can use the provided tools to quickly download.

The Pruned Snapshot is better for internal/private nodes, it only keeps the latest 9w historical blocks and requires BSC client >=v1.5.5.

mainnet(monthly update)

Snapshot Type Snapshot File Total Size Remark
Full Snapshot mainnet-geth-pbss-20250208 ~3TB
Pruned Snapshot mainnet-geth-pbss-20250208-pruneancient ~900GB BSC >= v1.5.5

testnet(update every 4 months)

Snapshot Type Snapshot File Total Size Remark
Full Snapshot testnet-geth-pbss-20241203 ~300GB

Download

You can download the mainnet or testnet files separately in the list and unzip them in a same directory. Or you can use the following script:

# install aria2 on your os
yum install aria2
wget https://raw.githubusercontent.com/bnb-chain/bsc-snapshots/main/dist/fetch-snapshot.sh

# download & checksum the mainnet or testnet snapshot
bash fetch-snapshot.sh -d -c -D {download_dir} {mainnet-geth-pbss-20250208|testnet-geth-pbss-20241203}
# download & checksum the pruned mainnet or testnet snapshot
bash fetch-snapshot.sh -d -c -p -D {download_dir} {mainnet-geth-pbss-20250208}

# extract the downloaded snapshot
bash fetch-snapshot.sh -e -D {download_dir} -E {extract_dir} {mainnet-geth-pbss-20250208|testnet-geth-pbss-20241203}

You can remove the -c option to skip md5 checking. You can use help to get more detailed command parameters.

bash fetch-snapshot.sh --help
# download, checksum, extract the snapshot, it need at least 6TB empty size for mainnet.
bash fetch-snapshot.sh -d -e -c -D {download_dir} -E {extract_dir} {snapshot_name}
# download, checksum, extract the snapshot, and auto delete the decompressed file, it need at least 4TB empty size for mainnet.
bash fetch-snapshot.sh -d -e -c --auto-delete -D {download_dir} -E {extract_dir} {snapshot_name}
# download, checksum, extract the pruned snapshot, and auto delete the decompressed file, it need at least 2TB empty size for mainnet.
bash fetch-snapshot.sh -d -e -c -p --auto-delete -D {download_dir} -E {extract_dir} {snapshot_name}

Please keep fetch-snapshot.sh the latest version.

Previous snapshot

Source-2: Pruned FullNode(~900GB) & FastNode(~300GB) By 48Club

Usage: https://github.com/BNB48Club/bsc-snapshots

Special thanks to BNB48Club on contributing another dump of snapshot.

Source-3: Erigon Archive Node(~5TB)

Usage: usage/erigon3_archivenode_usage.md, Erigon 3 release: v1.3.0-alpha4

Endpoints: Since Erigon 3, snapshot is no longer needed.

FAQ

Why split snapshot into multiple files?

As the node snapshot of bsc becomes larger and larger, backup, upload and download will become increasingly unmaintainable, and it will occupy more disk space and take up more upload and download time.

At the same time, in order to support the history expiry and state expiry of bsc later, it is planned to split the node snapshot according to historical data and active data, and the following advantages can be obtained:

  1. When updating the snapshot, only the changed part can be updated to reduce the difficulty of operation and maintenance;
  2. Support annual backup of historical data, which also helps with the subsequent historical data pruning;
  3. Support archiving multiple snapshot versions, avoiding wasting disk space;
  4. Support downloading and decompressing a single part immediately, and snapshot download and decompression can be completed on a smaller disk;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages