-
Notifications
You must be signed in to change notification settings - Fork 97
refactor(l2): replace sequencer config toml with CLI flags #2606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The remaining configs are only used by the deployer and will be needless after we implement a separate CLI for it
Lines of code reportTotal lines added: Detailed view
|
ilitteri
commented
Apr 25, 2025
…rex into replace_sequencer_config
…rex into replace_sequencer_config
fmoletta
pushed a commit
that referenced
this pull request
May 15, 2025
**Motivation** - #2380 - #2574 - #2609 **Description** - Adds CLI options for the sequencer components - Extends `ethrex l2 init` options with `SequencerOptions` (a struct that contains all the different components' options) - Refactors `cmd/ethrex/l2.rs` - Moved the command code to `cmd/ethrex/l2/command.rs`. - Moved the command options to `cmd/ethrex/l2/options.rs`. - Leaves the minimum necessary config in the `sequencer_config_example.toml` (needed by the deployer). - Leaves the minimum necessary logic in the `crates/l2/utils/configs/toml_parser.rs` module (needed by the deployer and prover). - Adds CLI options for the contract deployer bin and the system contracts updater bin (removing the need of a config file). - Updates the L2 Makefile. - Updates the Docker Compose files. - Updates the `pr-main_l2` workflow. - Updates the L2 integration test. - Removes the `sequencer_config_example.toml` since it is not needed anymore. - Refactors the `crates/l2/contracts` module - Renames the crate from `ethrex-l2_deployer` to `ethrex-l2_contracts`. - Adds a `bin` module with the bins `ethrex_l2_l1_deployer` and `ethrex_l2_system_contracts_updater`. - All the SDK-related logic was moved to the SDK lib. - Cleans up the logic related to the config and toml parsing since now the only bin relying on the config is the Prover. Everything relative to the sequencer was removed, and now it is "hardcoded" for the Prover. **How to test** If you are in a dev environment, keep working as usual because under the hood, the sequencer initialization is not relying anymore on the `sequencer_config.toml`. If you are in a prod environment, run `cargo run --release --features l2 -- l2 init --help` at the root of the repository to explore the different configuration flags this PR adds. **Caveats** The prover config file is still needed by the prover (tracked in #2576). Closes #2574 --------- Co-authored-by: Javier Rodríguez Chatruc <49622509+jrchatruc@users.noreply.github.com> Co-authored-by: Manuel Iñaki Bilbao <manuel.bilbao@lambdaclass.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Description
ethrex l2 init
options withSequencerOptions
(a struct that contains all the different components' options)cmd/ethrex/l2.rs
cmd/ethrex/l2/command.rs
.cmd/ethrex/l2/options.rs
.sequencer_config_example.toml
(needed by the deployer).crates/l2/utils/configs/toml_parser.rs
module (needed by the deployer and prover).pr-main_l2
workflow.sequencer_config_example.toml
since it is not needed anymore.crates/l2/contracts
moduleethrex-l2_deployer
toethrex-l2_contracts
.bin
module with the binsethrex_l2_l1_deployer
andethrex_l2_system_contracts_updater
.How to test
If you are in a dev environment, keep working as usual because under the hood, the sequencer initialization is not relying anymore on the
sequencer_config.toml
.If you are in a prod environment, run
cargo run --release --features l2 -- l2 init --help
at the root of the repository to explore the different configuration flags this PR adds.Caveats
The prover config file is still needed by the prover (tracked in #2576).
Closes #2574