Docs
Operate

Seed nodes and snapshots

A new node needs one peer to start from and, if it should not execute every block since genesis, a chain snapshot.

Seed nodes#

Seed nodes are public OysBio nodes that accept connections from anyone. They hold no validator key (see Sentry architecture). The release package lists them in network/peers.txt; add them by hand with EXTRA_PEERS in node.env, or with --bootnodes when you run the binary yourself.

Mainnet

No public mainnet seed node is listed yet. Until one is, connect to a node you know with EXTRA_PEERS, or start from a chain snapshot and use the public RPC.

Testnet

No public testnet seed node is listed yet. Until one is, connect to a node you know with EXTRA_PEERS, or start from a chain snapshot and use the public RPC.

Check that your node reaches one: ./oysbio-node.sh info shows peers: 1 or more within a minute of the start. With discovery on, the node then finds other public nodes by itself.

Chain snapshots#

A snapshot is an export of every block from genesis up to a recent safe block, made once a day from an OysBio node with admin.exportChain, compressed with gzip. Your node imports it and executes the blocks itself, so it checks every block and every state root exactly as a sync from peers would, without waiting for the network. A snapshot never contains blocks above the safe block, so nothing in it can be reorganised away.

Mainnet: loading the latest snapshot…

Testnet: loading the latest snapshot…

Each network folder also has latest.json: block number, block hash, file name, size and SHA-256 of the newest snapshot.

Import a snapshot#

NET=mainnet
curl -fsSL https://docs.oys.bio/snapshots/$NET/latest.json -o latest.json
FILE=$(sed -n 's/.*"file": *"\([^"]*\)".*/\1/p' latest.json)
curl -fSLO https://docs.oys.bio/snapshots/$NET/$FILE
sha256sum $FILE                                  # must equal "sha256" in latest.json
./oysbio-node.sh import $FILE                    # with the node stopped, on a new or existing data folder
./oysbio-node.sh start                           # it syncs the rest from its peers

The import refuses a file of the other network (the genesis block differs). When it ends, compare the hash of the snapshot's last block with the explorer: eth.getBlock(<block>).hash in ./oysbio-node.sh console must equal the block page on https://explorer.oys.bio.

Running the binary without the package script: oysbio import --datadir <dir> --syncmode full --gcmode archive --snapshot=false <file>, after oysbio init --datadir <dir> genesis.json.