Joining Network Using State Sync
State sync offers the quickest way to join SEDA network.
The state sync feature allows a new peer to join the network by asking for a snapshot from existing peers. SEDA provides the following RPC nodes to support this feature. Use these addresses in Step 3:
seda-1 (mainnet)
13.40.140.211:26657
https://rpc.seda.xyz
seda-1-testnet (testnet)
18.171.235.206:26657
https://rpc.testnet.seda.xyz
Steps:
Check the version history and download the correct binary version from the SEDA Chain repository.
Initialize your node for
mainnetortestnet:sedad join <moniker> --network mainnetRun the following commands to enable state sync and add trusted information to the configuration file
config.toml.RPC="https://rpc.seda.xyz" # For testnet, use https://rpc.testnet.seda.xyz LATEST_HEIGHT=$(curl -s $RPC/block | jq -r .result.block.header.height); \ BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \ TRUST_HASH=$(curl -s "$RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash) sed -i.bak -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \ s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$RPC,$RPC\"| ; \ s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \ s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" $HOME/.sedad/config/config.tomlTo complete this step manually, fill out the following fields in
config.tomlwith the information obtained from a trusted source. We recommend using the block height around 2,000 blocks before the latest block height.[statesync] enable = true rpc_servers = "https://rpc.seda.xyz,13.40.140.211:26657" trust_height = 653231 trust_hash = "B77528F6A290FCFBF25F730C6D490DE0DA7587EC6B2612AA2547773499CFB47E" trust_period = "168h0m0s"
(Optional) Sometimes a recent snapshot may not be available in the peer-to-peer network, making it difficult to verify its header. SEDA runs a node that broadcasts snapshots taken every 100 blocks to the network. To ensure that a request for snapshots is sent to this node, add the following address to the
persistent_peersfield inconfig.toml. For mainnet:persistent_peers = "[email protected]:26656"For testnet:
persistent_peers = "[email protected]:26656"You may have to disable SEDA signer to start the node. If you are a validator, please read SEDA Keys to set up SEDA signer after you finish the current instructions.
sedad config set app seda.enable-seda-signer falseStart the node.
sedad start
State sync may be unreliable at times. If it fails, please retry the steps after a few hours or consider Joining Network Using Snapshot.
Last updated
Was this helpful?

