Bootstrap and Genesis
The genesis block is the trust anchor for every service that joins a network. It is not signed: it simply commits to the full validator set in its header, and that set must sign every block after genesis. Because nothing signs the genesis block, it must always be obtained from a trusted source. One of the network's operators is responsible for building it from the genesis configuration. On official networks, the validators are operated by separate entities from the network operator.
The genesis block is subsequently made available for official networks at
https://genesis.<network>.miden.io
which provides an easy method to obtain this data. This is directly supported by service bootstrap commands by passing
--network testnet or --network devnet. Bootstrap commands also support passing a file directly to cover custom
networks, or if the official URLs are not trusted.
Bootstrap Flow
- Official network
- Unofficial network
The genesis block is the chain's trust root: its header commits to the full validator set, which must sign every block after genesis. Each validator operator first prints their public key and sends it to the bootstrapping operator:
miden-validator pubkey --signing-key.kms-id <validator-N-kms-key-id>
The full validator set is passed on the command line, as one --validator.key flag per validator. There is no default
set: the flag is required.
One operator then runs genesis with the genesis configuration and the collected keys. Building the genesis block
requires no signing key:
miden-validator genesis \
--genesis-block-directory genesis-data \
--accounts-directory accounts \
--config genesis.toml \
--validator.key <validator-1-public-key-hex> \
--validator.key <validator-2-public-key-hex> \
--validator.key <validator-3-public-key-hex>
Unless the configuration sets native_faucet to a pre-built account file, the native faucet is generated as a network
account and holds no key of its own; minting from it is restricted to the faucet operator account generated alongside
it. The operator starts with 1,000 MIDEN tokens so it can pay fees for the first mint requests. Both accounts are
written to the accounts directory as native_faucet.mac and faucet_operator.mac, and the faucet account id is
printed. The operator file carries the only signing key permitted to mint, so treat it as a secret.
To run a faucet against the network, pass faucet_operator.mac to the faucet's init --import, and the faucet account
id to --faucet-account-id.
Upload genesis-data/genesis.dat so it is served at:
https://genesis.<network>.miden.io
Every validator operator — including the one that built the genesis block — seeds their own database from the genesis block:
miden-validator bootstrap \
--data-directory validator-1-data \
--genesis genesis-data/genesis.dat
Initialize the sequencer's node storage from the hosted genesis block:
miden-node bootstrap \
--data-directory node-data \
--network testnet
Initialize the network transaction builder from the same hosted genesis block:
miden-ntx-builder bootstrap \
--data-directory ntx-builder-data \
--network testnet
For devnet, use --network devnet instead. The --network flag is shorthand for downloading the genesis block from
https://genesis.<network>.miden.io.
Each validator operator's own KMS key ID must be used when that operator starts their validator for this network.
One operator builds the genesis block; no signing key is needed. The genesis header commits to the full validator
set, passed as one --validator.key flag per validator; there is no default set. Each validator operator generates a
key-pair with miden-validator keygen (or prints the public key of an existing secret with
miden-validator pubkey --signing-key.hex <validator-N-key-hex>) and sends the public key to the bootstrapping
operator.
miden-validator genesis \
--genesis-block-directory genesis-data \
--accounts-directory accounts \
--config genesis.toml \
--validator.key <validator-1-public-key-hex> \
--validator.key <validator-2-public-key-hex> \
--validator.key <validator-3-public-key-hex>
Distribute genesis-data/genesis.dat to the validator operators, who each seed their own database from it — including
the operator who built the genesis block:
miden-validator bootstrap \
--data-directory validator-1-data \
--genesis genesis-data/genesis.dat
For unofficial networks or pre-publication testing, distribute the genesis block file directly and initialize services from that file:
miden-node bootstrap \
--data-directory node-data \
--genesis genesis-data/genesis.dat
miden-ntx-builder bootstrap \
--data-directory ntx-builder-data \
--genesis genesis-data/genesis.dat
The key each validator operator starts their validator with must match the public key committed for them via the
genesis command's --validator.key flags.
Storage Key Ceremony
After genesis is built, every listed validator must join one offline DKG ceremony. The ceremony creates the shared public storage key and one distinct secret share per validator. No coordinator can derive those shares.
Each operator first registers a fresh DKG identity with the validator signing key committed in genesis. One coordinator uses every signed registration to prepare the common ceremony. Every operator then creates two public dealings, checks and signs the same full transcript, and completes both rounds locally. The DKG and database bootstrap may run in either order, but both must finish before the validator starts.
All listed validators must contribute to the ceremony even when the recovery threshold is lower. If any participant drops out or any transcript differs, discard the incomplete ceremony and start a new one with fresh identities and sessions. See storage key setup for the commands and file rules.
Bootstrap takes no transaction encryption key: that key is configured separately when the validator is started, and nothing cross-checks it against the genesis block. Every validator must be started with the same encryption key; the validator refuses to start without one. See Validator for how to provision it.