Skip to content

axieinfinity/ronin-snapshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

Ronin Snapshot

Note

  • We capture a comprehensive snapshot of full node data, including pruned state data, once per week.

Prerequisites

  • Your free disk space has more than twice the size of the snapshot.
  • Install the zstd on your machine.
  • Install the tmux for long time process operation.

Endpoint

Here are snapshots of HBSS with leveldb and pebbledb.

Hash-Base-State-Scheme:

Usage

Step 1: Preparation

  • Make sure your hardware meets the suggested requirement.
  • A disk with enough free storage, at least twice the size of the snapshot.

Step 2: Download & Uncompress

  • Copy the above snapshot URL.
  • Download: wget -O chaindata.tar.zst "<paste snapshot URL here>" . It will take one or two hours to download the snapshot, you can put it in to the tmux by wget -O chaindata.tar.gz "<paste snapshot URL here>"
  • [OPTIONAL] If you need to speedup download, just use aria2c
aria2c -o chaindata.tar.zst -s14 -x14 -k100M https://pub-3cca138de6c349f8afe5f6635f9f6f81.r2.dev/data/{filename}

But aria2c may fail sometimes, you need to rerun the download command. To make it convient, you can use the following script, save it into file download.sh, open new tmux session and run: chmod +x download.sh && ./download.sh "<paste snapshot URL here>" <your dir>

#!/bin/bash
if [ $# -eq 1 ]; then
        dir=$(pwd)
elif [ $# -eq 2 ]; then
        dir=$2
else
        echo "Usage: $0 <uri> [filepath] "
        exit 1
fi
uri=$1
filename=$(basename "$uri")
status=-1
while (( status != 0 ))
do
        PIDS=$(pgrep aria2c)
        if [ -z "$PIDS" ]; then
                aria2c -d $dir -o $filename -s14 -x14 -k100M $uri
        fi
        status=$?
        pid=$(pidof aria2c)
        wait $pid
        echo aria2c exit.
        case $status in
                3)
                        echo file not exist.
                        exit 3
                        ;;
                9)
                        echo No space left on device.
                        exit 9
                        ;;
                *)
                        continue
                        ;;
        esac
done
echo download succeed.
exit 0
  • Performance pretty good compare to wget command:
[#daede1 145GiB/145GiB(99%) CN:1 DL:115MiB]
10/05 10:34:40 [NOTICE] Download complete: /axie/geth.tar.zst

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
daede1|OK  |   207MiB/s|/axie/geth.tar.zst

Status Legend:
(OK):download completed.

real    12m2.862s
user    1m57.320s
sys     2m28.624s
  • Uncompress: tar -I zstd -xvf chaindata.tar.zst. It will take more than 20 min to uncompress. You can put it in the tmux session and run command tar -I zst -xvf chaindata.tar.zst
  • You can combine the above steps by running a script:
wget -O chaindata.tar.zst  "<paste snapshot URL here>"
tar -I zstd -xvf chaindata.tar.zst
  • If you do not need to store the archive for use with other nodes, you may also extract it while downloading to save time and disk space:
wget -q -O - <snapshot URL> | tar -I zstd -xvf -

Step 3: Install the node

  • Now you can follow steps by steps from here Install the node
  • This docs is the detail for 6.(Optional) Download the snapshot

Chaindata snapshot - Archive Node (Leveldb)

Endpoint (Mainnet):

Storage size: 12T - we split it into 500GB for each file.

Usage

  • Download && Concatenate && Uncompress:
for i in {000..022}; do wget "https://ss.roninchain.com/leveldb-archive-mainnet-chaindata-20241205.tar.zst-$i"; done
cat "leveldb-archive-mainnet-chaindata-20241205.tar.zst-"* > chaindata.tar.zst
tar -I zstd -xvf chaindata.tar.zst
  • If you do not need to store the archive for use with other nodes, you may also extract it while joining files to save time and disk space:
for i in {000..022}; do wget "https://ss.roninchain.com/leveldb-archive-mainnet-chaindata-20241205.tar.zst-$i"; done
cat "leveldb-archive-mainnet-chaindata-20241205.tar.zst-"* | tar -I zstd -xvf - -C chaindata

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published