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. The default is 0

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

docker run --rm \
-e MNEMONIC="<YOUR_12_WORD_MNEMONIC>" \
-e ACCOUNT_INDEX=0 \
-e L1_PROVIDER="<YOUR_ETHEREUM_MAINNET_RPC>" \
-e ESP_TOKEN_ADDRESS=0x031De51F3E8016514Bd0963d0B2AB825A591Db9A \
-e STAKE_TABLE_ADDRESS=0xCeF474D372B5b09dEfe2aF187bf17338Dc704451 \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:main \
staking-cli approve \
--amount <AMOUNT>

Step 2 - Delegate to your validator:​

docker run --rm \
-e MNEMONIC="<YOUR_12_WORD_MNEMONIC>" \
-e ACCOUNT_INDEX=0 \
-e L1_PROVIDER="<YOUR_ETHEREUM_MAINNET_RPC>" \
-e ESP_TOKEN_ADDRESS=0x031De51F3E8016514Bd0963d0B2AB825A591Db9A \
-e STAKE_TABLE_ADDRESS=0xCeF474D372B5b09dEfe2aF187bf17338Dc704451 \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:main \
staking-cli delegate \
--validator-address <YOUR_VALIDATOR_ADDRESS> \
--amount <AMOUNT>

Update commission rate:​

docker run --rm \
-e MNEMONIC="<YOUR_MNEMONIC>" \
-e ACCOUNT_INDEX=0 \
-e L1_PROVIDER="<YOUR_RPC>" \
-e STAKE_TABLE_ADDRESS=0xCeF474D372B5b09dEfe2aF187bf17338Dc704451 \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:main \
staking-cli update-commission \
--new-commission <NEW_RATE>

Deregister validator​

docker run --rm \
-e MNEMONIC="<YOUR_MNEMONIC>" \
-e ACCOUNT_INDEX=0 \
-e L1_PROVIDER="<YOUR_RPC>" \
-e ESP_TOKEN_ADDRESS=0x031De51F3E8016514Bd0963d0B2AB825A591Db9A \
-e STAKE_TABLE_ADDRESS=0xCeF474D372B5b09dEfe2aF187bf17338Dc704451 \
ghcr.io/espressosystems/espresso-sequencer/staking-cli:main \
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.