Useful Commands
These commands are useful to sequencer operators. If you're trying to do something that is not listed here, ask in the appropriate discord channel.
Prerequisites
- You'll need a way to query the L1 contracts, this guide assumes you have
foundry
installed. - Have the
aztec
tool installed - Ethereum EL RPC endpoint
Basics
Get the Registry contract address
The Registry contract is your entrypoint into almost all other contracts for a particular deployment of the Aztec Network. Armed with this address, you can retrieve almost all other useful contracts.
Assume there are two "deployments" of Aztec i.e. an alpha-testnet
and a ignition-testnet
. Then each deployment will have a unique Registry contract that does not change with upgrades. If a governance upgrade on alpha-testnet
deploys a new rollup contract, the Registry contract for the alpha-testnet
deployment will not change.
Get the Rollup contract
Run
cast call <RegistryContractAddress> "getCanonicalRollup()" --rpc-url https://example.com
The rest of the guide will omit the --rpc-url
flag for legibility.
Query the Validator Set
Retrieve a list of all validators
Run
cast call <RollupAddress> "getAttesters()" --rpc-url
What is the status of a particular validator?
Run
cast call <RollupAddress> "getInfo(address)" <ValidatorAddress>
This will return in order: 1) the validator's balance 2) their withdrawer
address 3) their proposer
address and 4) their current status.
Status | Meaning |
---|---|
0 | The validator is not in the validator set |
1 | The validator is currently in the validator set. |
2 | The validator is not active in the set. This could mean that they initiated a withdrawal and are awaiting final exit |
3 | The validator has completed their exit delay and can be exited from the validator set |