Run a decentralised LEZ sequencer
Stake a Bedrock key into the LEZ sequencer committee and produce blocks on your round-robin turn.
This document is accurate for Testnet v0.3.2.
Zone sequencers order mempool transactions into blocks and inscribe them on the Zone's channel on Bedrock. The LEZ is sequenced by a committee of sequencer who take turns doing this in a round-robin schedule. Anybody who meets the minimum stake can join the committee, and membership in the committee is granted automatically, without explicit approval.
This procedure shows how to build the sequencer from the v0.3.2 release, prepare a node home, stake its Bedrock key, and confirm the node produces blocks on its turn. It's for operators who want to run a committee member on a local network, in preparation for
The stake is what makes misbehaviour costly. A member that inscribes an invalid or misplaced block is slashed, and slashing burns the key's whole stake. Being offline isn't slashed.
-
A supported OS:
- Linux
- macOS
The service setup in Step 7 is for Linux with systemd only.
-
The Rust toolchain.
rustupinstalls the pinned 1.98.1 on the first build. -
just, Python 3. -
Only to rebuild the zkVM artifacts: the RISC Zero toolchain, installed with
rzup install. The repository uses risc0 3.0.5 and commits the built artifacts, so Step 1 doesn't need it. -
For the public testnet:
- A funded key in that node's wallet, such as the
PoWClaimkey funded by mining. - A Logos Blockchain node version
0.3.4. - A public account holding at least the network's minimum stake, in an LEZ CLI wallet.
- A funded key in that node's wallet, such as the
-
For a local network:
What to expect
- You can run a sequencer that the committee accredits and that publishes LEZ blocks on its round-robin turn.
- You can check accreditation by finding your node's Bedrock key in the channel's
accredited_keys. - You can leave the committee cleanly and get your stake back once the exit delay has passed.
Step 1: Build the sequencer from the release tag
Run every command in this procedure from the repository root.
-
Clone the repository and check out the release:
git clone https://github.com/logos-blockchain/logos-execution-zone.gitcd logos-execution-zonegit checkout v0.3.2 -
Build the wallet and the sequencer, including the
submit_staketool:cargo build --release -p wallet -p sequencer_service --features sequencer_service/submit_stake- This builds
sequencer_service,bedrock_pubkey,submit_stake, andwalletintotarget/release.
- This builds
-
Put the binaries on your
PATH. Repeat this in every new terminal you open during the procedure:export PATH="$PWD/target/release:$PATH"
Step 2: Choose the network to join
Join the public testnet, or start a local network to try the flow first. You only need one of the options below. Each one sets the shell variables that the rest of the procedure uses, so run the later steps in the same terminal.
Option A—Join the public testnet
The joining sequencer config for the public testnet isn't published with the v0.3.2 release yet. Every node on a channel has to agree on its genesis and channel_params, so don't substitute the debug config. Ask the LEZ team on the Logos Discord for the current config before you continue.
-
Set the variables for the testnet. Replace
<your-bedrock-node>with your Bedrock node's API address, and<joining-config>with an absolute path to the testnet joining config (just setup-sequencerresolves a relative path against the repository root and doesn't expand~):NODE_HOME=~/.logos-execution-zone/sequencerSEQUENCER_RPC=https://testnet.lez.logos.coNODE_URL=http://<your-bedrock-node>CHANNEL_ID=0101010101010101010101010101010101010101010101010101010101010101CONFIG=<joining-config>NODE_RPC=http://127.0.0.1:3040NODE_HOMEis a new directory that Step 3 creates. It holds the node's staked key, so it must not exist yet.SEQUENCER_RPCis any committee member's RPC. The node's own wallet talks to it.- The channel ID for each release is listed on Testnet endpoints.
-
Set
FUNDING_KEYto the public part of the funded key in your Bedrock node's wallet, such as thepublic_keyof the auto-claim target printed in Step 4 of the Blockchain node page:FUNDING_KEY=<bedrock-wallet-public-key>
Option B—Start a local network
You need four terminals for this option. Run Step 1's export PATH in each one.
-
In terminal 1, clear the previous local run and start Bedrock. It stays in the foreground:
just cleanjust run-bedrock -
In terminal 2, start the first sequencer, which creates the channel:
just run-sequencerWait for the first
Publishing blockline before continuing.Expected result:
Channel does not exist yet; starting it as channel creatorPublishing block 2 on pin <msg id> -
In terminal 3, import the accounts that the local genesis funds:
just wallet-import-test-accountsExpected result: the output lists
Public/CbgR6tj5kWx5oziiFptM7jMvrQeYY3Mzaao6ciuhSr2randPublic/2RHZhw9h534Zr3eq2RGhQete2Hh667foECzXPmSkGni2. -
Still in terminal 3, check that the joining node's home doesn't exist yet.
just cleandoesn't remove it:ls ~/.logos-execution-zone/sequencerExpected result:
No such file or directory. If the directory is left over from a previous local run, remove it. If it belongs to another node, such as a testnet one, keep it and use a different path forNODE_HOMEin the next action. -
Set the variables for the local network. Run the rest of the procedure in terminal 3, except where a step says otherwise:
NODE_HOME=~/.logos-execution-zone/sequencerSEQUENCER_RPC=http://127.0.0.1:3040NODE_URL=http://localhost:18080CHANNEL_ID=0101010101010101010101010101010101010101010101010101010101010101CONFIG=lez/sequencer/service/configs/debug/sequencer_config.jsonNODE_RPC=http://127.0.0.1:3041- The debug config's
funding_keyalready matches the local Bedrock node's wallet, so you don't setFUNDING_KEY.
- The debug config's
Step 3: Prepare the node home
just setup-sequencer creates the node home. It submits nothing, so it doesn't need funds.
-
Patch the setup script. At
v0.3.2,tools/setup_sequencer.pywrites the node wallet's config in an older format that the v0.3.2 wallet rejects. Use the following command to update the script as a quick workaround:sed -i.orig 's|"sequencers": \[{"sequencer_addr": args.sequencer}\],|"sequencer": {"sequencer_addr": args.sequencer},|' \tools/setup_sequencer.py -
Create the node home:
just setup-sequencer "$NODE_HOME" --sequencer "$SEQUENCER_RPC" --node-url "$NODE_URL" --config "$CONFIG"- If the command fails, it leaves a partial home behind. Delete
$NODE_HOMEbefore you run it again.
Expected result: the command prints
<NODE_HOME> is ready., followed by the funding account, the Bedrock key, and the paths it wrote. The home contains:File Contents sequencer_config.jsonA copy of $CONFIG, withhomeandnode_urlset for this node.wallet/The node's own wallet, pointed at $SEQUENCER_RPC.wallet-seedThat wallet's password and recovery phrase, in plain text. bedrock_signing_keyThe Bedrock key that the stake accredits. stake-funding-accountA new account in the node's wallet that the stake is paid from. dangerbedrock_signing_keyis the staked identity. If you lose it, you lose the seat. Back it up, restrict its permissions, and never run two nodes with the same key: two nodes inscribing for one key produce misplaced blocks, which are slashed.The node's wallet holds the key that's needed to unstake, and
wallet-seedholds its password and recovery phrase in the clear. Anyone who can read the home controls the stake, so restrict its permissions and back it up.just setup-sequencercreatesbedrock_signing_keyreadable by every user on the machine:chmod 700 "$NODE_HOME"chmod 600 "$NODE_HOME/bedrock_signing_key" - If the command fails, it leaves a partial home behind. Delete
-
(Public testnet only) Set the config's
funding_keyto your Bedrock wallet key:python3 -c 'import json, sys; p = sys.argv[1]; c = json.load(open(p)); c["bedrock_config"]["funding_key"] = sys.argv[2]; json.dump(c, open(p, "w"), indent=4)' \"$NODE_HOME/sequencer_config.json" "$FUNDING_KEY" -
Read the funding account and the Bedrock public key into variables for the next steps:
FUNDING=$(cat "$NODE_HOME/stake-funding-account")SEQUENCER_KEY=$(bedrock_pubkey "$NODE_HOME/sequencer_config.json" --home "$NODE_HOME")
Step 4: Start the node and let it catch up
The node follows the chain as soon as it starts, and starts producing once the committee accredits its key. Start it in its own terminal, terminal 4 on a local network, and set NODE_HOME and PATH there too.
Your Blockchain node must be in Online mode before you can begin this step: curl -s http://<your-bedrock-node>/cryptarchia/info must report "state":"Online". While it's still Bootstrapping, the sequencer can't backfill the channel and logs 408 Request Timeout errors.
-
Start the node. On the public testnet:
RUST_LOG=info,kameo=warn sequencer_service "$NODE_HOME/sequencer_config.json" \--home "$NODE_HOME" --listen-address 127.0.0.1On a local network, the first sequencer already holds ports 3040 and 9000:
RUST_LOG=info,kameo=warn sequencer_service "$NODE_HOME/sequencer_config.json" \--home "$NODE_HOME" --listen-address 127.0.0.1 \--port 3041 --metrics-address 127.0.0.1:9001- The sequencer RPC has no caller authentication.
--listen-address 127.0.0.1keeps it on the local machine; only bind it to a public address if a firewall protects the port.
Expected result:
Channel already exists; joining as a non channel creatorIf the log says
Channel does not exist yet; starting it as channel creatorinstead, stop the node; see Troubleshooting. - The sequencer RPC has no caller authentication.
-
Back in your working terminal, compare your node's last block ID with a committee member's. Repeat until they match:
for rpc in "$NODE_RPC" "$SEQUENCER_RPC"; docurl -s -X POST -H 'Content-Type: application/json' \--data '{"jsonrpc":"2.0","method":"getLastBlockId","params":[],"id":1}' "$rpc"echodone- The node's RPC only starts listening once it has caught up on the channel, about 12 seconds after launch on a local network. Until then, the line for
$NODE_RPCis empty. - While it catches up, the node can log warnings such as
Finalized block 1 did not apply. They stop once its block ID matches the committee member's.
- The node's RPC only starts listening once it has caught up on the channel, about 12 seconds after launch on a local network. Until then, the line for
Step 5: Stake the node's key
-
Read the channel's minimum stake from the node's own config. Every node on the channel has to agree on
channel_params, so this is the value the committee enforces. Save it in the home, because you need the staked amount to unstake:MIN=$(python3 -c 'import json, sys; print(json.load(open(sys.argv[1]))["bedrock_config"]["channel_params"]["minimum_sequencer_stake"])' \"$NODE_HOME/sequencer_config.json")echo "$MIN" > "$NODE_HOME/stake-amount"echo "$MIN"Expected result: the channel's minimum stake. The local debug config sets it to
149. On the public testnet it's25000000000. -
Fund the node's funding account from your funded account. Replace
<funded-account>with your account ID:wallet auth-transfer send --from Public/<funded-account> --to "Public/$FUNDING" --amount "$MIN"On a local network, send from a genesis account through the debug wallet instead:
just run-wallet auth-transfer send --from Public/CbgR6tj5kWx5oziiFptM7jMvrQeYY3Mzaao6ciuhSr2r \--to "Public/$FUNDING" --amount "$MIN"Expected result:
Transaction is included in block <n>. -
Create the ownership account in the node's wallet. It holds the stake and receives the producer rewards. Save its ID in the home, because you need it to unstake:
OWNERSHIP=$(LEE_WALLET_HOME_DIR="$NODE_HOME/wallet" wallet account new public \| sed -n 's|.*account_id Public/\([^ ]*\).*|\1|p')echo "$OWNERSHIP" > "$NODE_HOME/stake-ownership-account" -
Submit the stake:
submit_stake --wallet "$NODE_HOME/wallet" stake \--funding-account "$FUNDING" \--ownership-account "$OWNERSHIP" \--sequencer-key "$SEQUENCER_KEY" \--amount "$MIN"Expected result:
Submitted transaction <tx hash>.
Step 6: Confirm the key is accredited
The committee only changes on finalised state, and the change needs a member's turn plus co-signatures from two thirds of the members, so accreditation can take several minutes.
-
Check the channel until your key appears in
accredited_keys:curl -s "$NODE_URL/channel/$CHANNEL_ID"Expected result:
{"accredited_keys":["<SEQUENCER_KEY>", ...], ...}, with the value of$SEQUENCER_KEYin the list. -
Watch the node's log. From now on, it produces blocks on its turn:
[2026-09-29T21:19:40Z INFO sequencer_core] Publishing block 30 on pin 8312aa4a2a10ca38cb1db8c55fb3306f4f8fab1...- A turn can take up to one full rotation of the committee to come round.
Step 7: Run the node as a service
On the public testnet, run the node under systemd so that it survives reboots. The node shuts down cleanly on SIGTERM. Skip this step on a local network.
-
Stop the foreground node from Step 4 with
Ctrl-C. -
Write the service unit:
sudo tee /etc/systemd/system/lez-sequencer.service >/dev/null <<EOF[Unit]Description=LEZ sequencerWants=network-online.targetAfter=network-online.target[Service]User=$USEREnvironment=RUST_LOG=info,kameo=warnExecStart=$PWD/target/release/sequencer_service $(realpath "$NODE_HOME")/sequencer_config.json --home $(realpath "$NODE_HOME") --listen-address 127.0.0.1Restart=on-failureTimeoutStopSec=60[Install]WantedBy=multi-user.targetEOF -
Enable and start the service, then follow its log:
sudo systemctl daemon-reloadsudo systemctl enable --now lez-sequencerjournalctl -u lez-sequencer -f -
Confirm the node is producing blocks:
journalctl -u lez-sequencer | grep "Publishing block"Expected result: one
Publishing block <n> on pin <msg id>line for each block your node produced on its turn.
Step 8: Leave the committee
Stopping the process doesn't remove the node from the committee. Request the unstake first, and stop the node only once the key has left accredited_keys.
-
Request the unstake. Replace
<destination-account>with the account that receives the stake, as a bare base58 account ID with noPublic/prefix:submit_stake --wallet "$NODE_HOME/wallet" unstake-request \--ownership-account "$(cat "$NODE_HOME/stake-ownership-account")" \--amount "$(cat "$NODE_HOME/stake-amount")" --destination <destination-account>--destinationdoesn't accept thePublic/prefix that the wallet commands use. On a local network, a genesis account such as2RHZhw9h534Zr3eq2RGhQete2Hh667foECzXPmSkGni2works as the destination.- The amount is the whole stake from Step 5. A partial release must leave at least the minimum, or the program drops the request without reporting an error.
- On a local network, submit the request while the first sequencer holds the turn: wait for
Turn update: our_turn=truein terminal 2. The two local nodes don't share pending transactions, and the request goes only to the first sequencer, so it can expire while your node holds the turn.
Expected result:
Submitted transaction <tx hash>. -
Check the channel until your key is no longer in
accredited_keys:curl -s "$NODE_URL/channel/$CHANNEL_ID"- The request is only valid for 16 blocks. If it expires, the sequencer it was sent to logs
Execution outside of the validity windowfor its transaction hash. Submit the request again.
- The request is only valid for 16 blocks. If it expires, the sequencer it was sent to logs
-
Stop the node. On the public testnet:
sudo systemctl disable --now lez-sequencerOn a local network, press
Ctrl-Cin terminal 4.Expected result: after
exit_delayblocks (100 by default), a sequencer includes theFinalizeUnstaketransaction and the destination account receives the stake.
Troubleshooting
The key never appears in accredited_keys
Either the stake reverted, or the committee can't land the change yet.
- The stake reverts if it's below
minimum_sequencer_stake, if the funding account isn't funded, or if the ownership account already backs another key. - The committee follows finalised state and needs a member's turn plus two thirds of the members' co-signatures, so offline members, or another change in flight, hold it back.
Check the funding account's balance:
LEE_WALLET_HOME_DIR="$NODE_HOME/wallet" wallet account get --account-id "Public/$FUNDING"
If the funds are still there, the stake reverted: stake again with at least the minimum. Otherwise, wait for the change to settle.
- At
v0.3.2,just committee-watchfails with aKeyError, because it looks up the stake program's account under the wrong ID. Use theaccredited_keyscheck from Step 6 instead.
The node starts its own channel
The log shows Channel does not exist yet; starting it as channel creator. The channel_id in the node's config is wrong or, on a local network, the node started before the first sequencer created the channel.
Stop the node, correct channel_id in $NODE_HOME/sequencer_config.json or wait for the first sequencer's first block, and delete the node's rocksdb-<channel id> directory in $NODE_HOME.
The node can't pay Bedrock fees
The log shows Failed to fund channel transaction. The config's funding_key isn't a key in the Bedrock node's wallet, or that key holds no funds. Set funding_key to a funded key from that node's wallet, as in Step 3, and restart the node.
Known constraints
- Reachability: members share mempool transactions and co-sign committee changes over gossip. A node that no member can connect to still produces on its turn, because its blocks go through Bedrock, but it only includes transactions sent to its own RPC, and it counts as offline for committee changes.
- Downtime: being offline isn't slashed and doesn't remove the node from the committee. A missed turn passes to the next member after
posting_timeoutidle slots, and the node earns no rewards for it. Slashing covers only invalid or misplaced blocks. - Clock: turns follow Bedrock slots, not the local clock, but block timestamps come from the producing node's system clock and nothing checks them. Keep the clock synced with NTP.
- Distribution: v0.3.2 ships no prebuilt binaries or published Docker images for this flow. Build from source.