Sei is the first sector-specific Layer 1 blockchain, specialized for trading and descentralized exchanges.
This repository contains a Dockerfile which installs, configures and runs the node looking for the latest snapshot or using the StateSync function for faster syncronization with the network.
git clone https://github.com/Sensei-Node/sei-network
cd sei-network
Make a copy of the .env-default
to .env
and modify it according to your node neccesities. Note: DOWNLOAD_SNAPSHOT is only available for pacific-1 mainnet.
# ------------------------------------ NODE VARIABLES ------------------------------------
# Github release tag
REL_TAG=v3.8.0
# For validator recognition
MONIKER=
# Chain id atlantic-2, pacific-1
CHAIN_ID=
# Node operation mode: full, validator, etc.
MODE=
# Node folder structure initialization
INIT_NODE=
# For wiping database, first backing up priv-val-state.json
PRUNE_DATA=
# If you want to include specific peers add them here
# NOTICE: needs to be in a row format (because it gets pruned if current node is the peer specified)
INCLUDE_PEERS="node_id@ip:port
node_id_2@ip:port"
# If you want to use state sync (available for testnet and mainnet)
USE_STATE_SYNC=
# If you want to use snapshot sync (only available for mainnet)
USE_SNAPSHOTS=
# If you want to reset peers to current values
RESET_PEERS=
# (SENTRY ONLY) If you want to set up a validator node with a sentry, the validator peer should be specified here
# in order not to be broadcasted to the network
PRIVATE_PEER=
# (VALIDATOR ONLY) This should be set only if the node is validator, and want to just connect to a sentry node
HAS_PRIVATE_VALIDATOR=
# For new seiv2 it is required to use SeiDB so set this to true
USE_SEI_DB=true
# ------------------------------------ ORACLE VARIABLES ------------------------------------
# Start ORACLE for price feeds: set to anything different than empty
START_ORACLE=
# Keyring password of the oracle account
PRICE_FEEDER_PASS=
# Address of the oracle signer, this account should have some sei in order to pay for gas fees
# Also, thi address should be imported into the node, and the keyring password should be the one
# specified above
ORACLE_SIGNER_ADDR=
# The validator related to the oracle
VALIDATOR_ADDR=
docker-compose up -d
There are two avilable options for syncing the node rapidly, one way (and in our opinion the best) is using state sync
the project is prepared in a way that you could use this syncing method for both pacific-1
mainnet and atlantic-2
testnet.
The other way of syncing (only available for pacific-1
) is via snapshots. In order to make use of each method the variables USE_STATE_SYNC
or USE_SNAPSHOTS
(in conjunction with INIT_NODE
) should be set to anything different that empty.
After the node starts, the variable INIT_NODE
should be commented out or left blank (otherwise it will be reinitialized again and syncing process would start from zero).
Also, having the proper bootnodes is key for having a synced node. If this list is not provided (or has peers that are offline/behind) the node wont be able to start syncing ever. Also it is not recommended to set up the persistent-peers
variable inside the config.toml
file, you should rather use the bootstrap-peers
variable instead.
There are some variables that need to be included in order to use cosmovisor as launcher, these could be included in the same .env
file:
USE_COSMOVISOR=true
COSMOVISOR_TAG=v1.3.0
DAEMON_HOME=/root/.sei
DAEMON_NAME=seid
UNSAFE_SKIP_BACKUP=true
DAEMON_RESTART_AFTER_UPGRADE=true
DAEMON_ALLOW_DOWNLOAD_BINARIES=false
seid tx slashing unjail --from admin --fees 2000usei -b block -y
seid tx staking edit-validator --commission-rate="0" --chain-id="atlantic-2" --from="admin" --fees="2000usei"