Full Consensus Node
Full consensus nodes allow you to sync blockchain history in the Sunrise consensus layer.
Chain upgrades
For streamline chain upgrades and minimize downtime, you may want to set up Cosmovisor to manage your node.
Follow the Cosmovisor tutorial
To automate on-chain upgrades, set the following options.
Backups
If you are using a recent version of Cosmovisor, then the default configuration is that a state backup will be created before upgrades are applied. This can be turned off using environment flags.
Alerting and monitoring
Alerting and monitoring are desirable as well - you are encouraged to explore solutions and find one that works for your setup. Prometheus is available out-of-the-box, and there are a variety of open-source tools.
Hardware requirements
The following hardware minimum requirements are recommended for running the validator node:
Memory: 8 GB RAM (minimum)
CPU: 4 cores
Disk: 250 GB SSD Storage
Bandwidth: 1 Gbps for Download/1 Gbps for Upload
If you are not using pruning, you are running an archive node, and it is recommended to have 500 GB of SSD storage.
Dependencies
The tutorial is done on Ubuntu 22.04 (LTS). Follow the environment tutorial
Run the full consensus node
Install
Initialize
Set chain-id
& moniker
. moniker
is just a name for your node.
This will generate the following files in ~/.sunrise/config/
genesis.json
node_key.json
priv_validator_key.json
Download the genesis file
For mainnet:
For testnet:
Option: Set persistent peers
Set minimum gas prices
For RPC nodes and Validator nodes, we recommend setting the following minimum-gas-prices. As we are a permissionless wasm chain, this setting will help protect against contract spam and potential wasm contract attack vectors.
In $HOME/.sunrise/config/app.toml
, set minimum gas prices:
Option: Additional settings
If necessary, Edit config files ~/.sunrise/config/app.toml
Enable defines if the API server should be enabled.
EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
Storage and pruning configurations
If your consensus node is being connected to a sunrise-node bridge node, you will need to enable transaction indexing and retain all block data. This can be achieved with the following settings in config.toml
.
Enable transaction indexing
Retain all block data
And in app.toml
, min-retain-blocks
should remain as the default setting:
Accessing historical state
If you want to query the historical state — for example, you might want to know the balance of a wallet at a given height in the past — you should run an archive node with pruning = "nothing"
in app.toml
. Note that this configuration is resource-intensive and will require significant storage:
If you want to save on storage requirements, consider using pruning = "everything"
in app.toml to prune everything.
Create (or restore) a local key pair
Either create a new key pair or restore an existing wallet for your validator:
Replace <your-key>
with a key name of your choosing.
Get some SR tokens
You will require some SR tokens to bond to your validator. To be in the active set you will need to have enough tokens.
Start the consensus node
Follow the instructions to set up Cosmovisor and start the node.
Using cosmovisor is completely optional. If you choose not to use cosmovisor, you will need to be sure to attend network upgrades to ensure your validator does not have downtime and get jailed.
If you are not using Cosmovisor, run the following:
Syncing the node
After starting the sunrised
daemon, the chain will begin to sync to the network. The time to sync to the network will vary depending on your setup and the current size of the blockchain but could take a very long time. To query the status of your node:
This command returning true
means that your node is still catching up. Otherwise, your node has caught up to the network's current block and you are safe to proceed to upgrade to a validator node.
If you want to shorten the time to catch up to the latest block, consider using snapshots from other nodes.
If you want to catch up from 0 height, you have to upgrade sunrised
at each upgrade height.
Last updated