Skip to main content

Command

Useful Commands​

Start the node​

cd ~/espresso-mainnet && docker compose up -d

Stop the node:​

docker compose down

View logs:​

docker compose logs -f

Check block height:​

curl -s http://localhost:30080/v1/status/block-height

Check key metrics:​

curl -s http://localhost:30080/v1/status/metrics | grep -E "^aggregator_height|^consensus_libp2p_num_connected_peers|^consensus_current_view"

Delegate​

⚠️ Set it accordingly if your ACCOUNT_INDEX differs from the default one (0). Store sensitive credentials in a restricted .env file (chmod 600) so mnemonics are never exposed in shell history or ps aux:

umask 077
cat > ~/espresso-mainnet/keys/staking.env << 'EOF'
MNEMONIC=<YOUR_12_WORD_MNEMONIC>
ACCOUNT_INDEX=0
L1_PROVIDER=<YOUR_ETHEREUM_MAINNET_RPC>
ESP_TOKEN_ADDRESS=0x031De51F3E8016514Bd0963d0B2AB825A591Db9A
STAKE_TABLE_ADDRESS=0xCeF474D372B5b09dEfe2aF187bf17338Dc704451
EOF
chmod 600 ~/espresso-mainnet/keys/staking.env

Step 1 - Approve the stake table contract to spend your ESP:​

docker run --rm \
--env-file ~/espresso-mainnet/keys/staking.env \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:0.7.0.7 \
staking-cli approve \
--amount <AMOUNT>

Step 2 - Delegate to your validator:​

docker run --rm \
--env-file ~/espresso-mainnet/keys/staking.env \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:0.7.0.7 \
staking-cli delegate \
--validator-address <YOUR_VALIDATOR_ADDRESS> \
--amount <AMOUNT>

Update commission rate:​

docker run --rm \
--env-file ~/espresso-mainnet/keys/staking.env \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:0.7.0.7 \
staking-cli update-commission \
--new-commission <NEW_RATE>

Deregister validator​

docker run --rm \
--env-file ~/espresso-mainnet/keys/staking.env \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:0.7.0.7 \
staking-cli deregister-validator

Backup:​

File: ~/espresso-mainnet/keys/0.env Validator wallet mnemonic

⚠️ Without these you lose control of your validator and delegated ESP. There is no recovery.