Skip to content

Commit aa3c41b

Browse files
tomip01ilitteri
andauthored
docs(l2): clarify config parameters (#2582)
**Motivation** This pull request updates the `crates/l2/docs/sequencer.md` documentation to improve clarity and provide more detailed descriptions of configuration parameters. **Description** * Renamed "Prover Server" to "Proof Coordinator". * Expanded descriptions of configuration parameters under `[deployer]`, `[watcher]`, `[proposer]`, and `[committer]` sections. Closes #2525 --------- Co-authored-by: Ivan Litteri <67517699+ilitteri@users.noreply.github.com>
1 parent 7c5ff95 commit aa3c41b

File tree

1 file changed

+29
-18
lines changed

1 file changed

+29
-18
lines changed

crates/l2/docs/sequencer.md

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- [Block Producer](#block-producer)
99
- [L1 Watcher](#l1-watcher)
1010
- [L1 Transaction Sender (a.k.a. L1 Committer)](#l1-transaction-sender-aka-l1-committer)
11-
- [Prover Server](#prover-server)
11+
- [Proof Coordinator](#proof-coordinator)
1212
- [Configuration](#configuration)
1313

1414
## Components
@@ -21,23 +21,32 @@ Creates Blocks with a connection to the `auth.rpc` port.
2121

2222
### L1 Watcher
2323

24-
This component handles the L1->L2 messages. Without rest, it is always watching the L1 for new deposit events defined as `DepositInitiated()` that contain the deposit transaction to be executed on the L2. Once a new deposit event is detected, it will insert the deposit transaction into the L2.
25-
26-
In the future, it will also be watching for other L1->L2 messages.
24+
This component monitors the L1 for new deposits made by users. For that, it queries the CommonBridge contract on L1 at regular intervals (defined by the config file) for new DepositInitiated() events. Once a new deposit event is detected, it creates the corresponding deposit transaction on the L2.
2725

2826
### L1 Transaction Sender (a.k.a. L1 Committer)
2927

3028
As the name suggests, this component sends transactions to the L1. But not any transaction, only commit and verify transactions.
3129

3230
Commit transactions are sent when the Proposer wants to commit to a new batch of blocks. These transactions contain the batch data to be committed in the L1.
3331

34-
Verify transactions are sent by the Proposer after the prover has successfully generated a proof of batch execution to verify it. These transactions contain the proof to be verified in the L1.
32+
Verify transactions are sent by the Proposer after the prover has successfully generated a proof of block execution to verify it. These transactions contains the new state root of the L2, the hash of the state diffs produced in the block, the root of the withdrawals logs merkle tree and the hash of the processed deposits.
33+
34+
### Proof Coordinator
35+
36+
The Proof Coordinator is a simple TCP server that manages communication with a component called the Prover. The Prover acts as a simple TCP client that makes requests to prove a block to the Coordinator. It responds with the proof input data required to generate the proof. Then, the Prover executes a zkVM, generates the Groth16 proof, and sends it back to the Coordinator.
37+
38+
The Proof Coordinator centralizes the responsibility of determining which block needs to be proven next and how to retrieve the necessary data for proving. This design simplifies the system by reducing the complexity of the Prover, it only makes requests and proves blocks.
39+
40+
For more information about the Proof Coordinator, the Prover, and the proving process itself, see the [Prover Docs](./prover.md).
3541

36-
### Prover Server
42+
### L1 Proof Sender
3743

38-
The Prover Server is a simple TCP server that manages communication with a component called the `Prover Client`. The Prover Client acts as a simple TCP client, handling incoming requests to prove a batch. It then "calls" a zkVM, generates the Groth16 proof, and sends it back to the Server. In this setup, the state is managed solely by the Prover Server, which, in theory, makes it less error-prone than the zkVMs.
44+
The L1 Proof Sender is responsible for interacting with Ethereum L1 to manage proof verification. Its key functionalities include:
3945

40-
For more information about the Prover Server, the Prover Client, and the proving process itself, see the [Prover Docs](./prover.md).
46+
- Connecting to Ethereum L1 to send proofs for verification.
47+
- Dynamically determine required proof types based on active verifier contracts (`PICOVERIFIER`, `R0VERIFIER`, `SP1VERIFIER`).
48+
- Ensure blocks are verified in the correct order by invoking the `verify(..)` function in the `OnChainProposer` contract. Upon successful verification, an event is emitted to confirm the block's verification status.
49+
- Operating on a configured interval defined by `proof_send_interval_ms`.
4150

4251
## Configuration
4352

@@ -53,8 +62,8 @@ The following environment variables are available to configure the Proposer cons
5362

5463
- Under the `[deployer]` section:
5564

56-
- `l1_address`: L1 account which will deploy the common bridge contracts in L1.
57-
- `l1_private key`: Its private key.
65+
- `l1_address`: L1 account which will deploy the common bridge contracts in L1 with funds available for deployments.
66+
- `l1_private key`: Private key corresponding to the above address.
5867
- `pico_contract_verifier`: Address which will verify the `pico` proofs.
5968
- `pico_deploy_verifier`: Whether to deploy the `pico` verifier contract or not.
6069
- `risc0_contract_verifier`: Address which will verify the `risc0` proofs.
@@ -64,22 +73,23 @@ The following environment variables are available to configure the Proposer cons
6473

6574
- Under the `[watcher]` section:
6675

67-
- `bridge_address`: Address of the bridge contract on L1.
68-
- `check_interval_ms`: Interval in milliseconds to check for new events.
69-
- `max_block_step`: Maximum number of blocks to look for when checking for new events.
70-
- `l2_proposer_private_key`: Private key of the L2 proposer.
76+
- `bridge_address`: Address of the bridge contract on L1. This address is used to retrieve logs emitted by deposit events.
77+
- `check_interval_ms`: Interval in milliseconds to check for new events. If no new events or messages are detected, it does nothing.
78+
- `max_block_step`: Defines the maximum range of blocks to scan for new events during each polling cycle. Specifically, events are queried from last_block_fetched up to last_block_fetched + max_block_step. If the chain hasn’t progressed that far yet, the scan will end at the current latest block instead. This ensures we only query blocks that actually exist.
79+
- `l2_proposer_private_key`: Private key of the L2 proposer.
7180

7281
- Under the `[proposer]` section:
7382

74-
- `interval_ms`: Interval in milliseconds to produce new blocks for the proposer.
83+
- `interval_ms`: Interval in milliseconds at which the proposer builds a new block out of the current transactions on the mempool.
7584
- `coinbase address`: Address which will receive the execution fees.
7685

7786
- Under the `[committer]` section:
7887

79-
- `l1_address`: Address of the L1 committer.
88+
- `l1_address`: Address of a funded account that will be used to send commit transactions to the L1.
8089
- `l1_private_key`: Its private key.
81-
- `commit_time_ms`: Sleep time after sending the commit transaction.
90+
- `commit_time_ms`: Sleep time after sending the commit transaction to the L1. If no new block has been built, the committer will simply wait another `commit_time_ms` and check again.
8291
- `on_chain_proposer_address`: Address of the on-chain committer.
92+
- `arbitrary_base_blob_gas_price`: Sets the minimum price floor for blob transactions when posting L2 data to the L1. This parameter allows you to control the lower bound of what the sequencer is willing to pay for blob storage. Higher values ensure faster inclusion in L1 blocks but increase operating costs, while lower values reduce costs but may cause delays.
8393

8494
- Under the `[prover_server]` section:
8595

@@ -88,7 +98,8 @@ The following environment variables are available to configure the Proposer cons
8898
- `l1_private_key`: Its private key.
8999
- `listen_ip`: IP to listen for proof data requests.
90100
- `listen_port`: Port to listen for proof data requests.
91-
- `dev_mode`: Whether `dev_mode` is activated or not.
101+
- `proof_send_interval_ms`: Periodicity with which the proof sender looks for new proofs to send to the L1 for verification.
102+
- `dev_mode`: Whether `dev_mode` is activated or not. If it is activated, the prover won't actually generate proofs, but just execute the blocks it is given, and the proof sender will send empty proofs to the L1. The L1, in turn, will ignore proofs.
92103

93104
- Under the `[eth]` section:
94105

0 commit comments

Comments
 (0)