Skip to content

refactor(l2): separated configs for prover_client and sequencer #2269

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
merged 20 commits into from
Mar 26, 2025

Conversation

fborello-lambda
Copy link
Contributor

@fborello-lambda fborello-lambda commented Mar 19, 2025

Motivation

When running the prover_client as a standalone component the config.toml wasn't being parsed.
Ideally we should parse it before we run the prover_client.

Description

  • The ConfigMode enum is proposed to parse the .toml for the Sequencer or the ProverClient
  • The prover_client parses the prover_client_config.toml and creates a .env.prover file
  • Created new envars to set the:
    • CONFIGS_PATH
    • SEQUENCER_CONFIG_FILE
    • PROVER_CLIENT_CONFIG_FILE
    • The references were updated in the Makefile

This change also enables us to change the SEQUENCER_CONFIG_FILE easily keeping it in the configs dir and switching the Makefile's variable. (Useful when testing locally and with a testnet).

Closes #2053

@fborello-lambda fborello-lambda added L2 Rollup client prover L2 prover labels Mar 19, 2025
@fborello-lambda fborello-lambda self-assigned this Mar 19, 2025
@fborello-lambda fborello-lambda requested a review from a team as a code owner March 19, 2025 18:13
Copy link

github-actions bot commented Mar 19, 2025

Lines of code report

Total lines added: 361
Total lines removed: 37
Total lines changed: 398

Detailed view
+----------------------------------------------+-------+------+
| File                                         | Lines | Diff |
+----------------------------------------------+-------+------+
| ethrex/cmd/ethrex/initializers.rs            | 336   | +4   |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/contracts/deployer.rs       | 761   | -9   |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/errors.rs                   | 0     | -27  |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/l2.rs                       | 4     | -1   |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/prover/src/main.rs          | 30    | +8   |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/utils/config/errors.rs      | 43    | +26  |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/utils/config/mod.rs         | 109   | +32  |
+----------------------------------------------+-------+------+
| ethrex/crates/l2/utils/config/toml_parser.rs | 291   | +291 |
+----------------------------------------------+-------+------+

@fborello-lambda fborello-lambda marked this pull request as draft March 19, 2025 21:04
@fborello-lambda fborello-lambda changed the title refactor(l2): parse toml binary refactor(l2): separated configs for prover_client and sequencer Mar 20, 2025
@fborello-lambda fborello-lambda marked this pull request as ready for review March 20, 2025 22:36
@fborello-lambda fborello-lambda added the sequencer L2 sequencer label Mar 20, 2025
@fborello-lambda fborello-lambda added this pull request to the merge queue Mar 26, 2025
Merged via the queue into main with commit 170308a Mar 26, 2025
28 checks passed
@fborello-lambda fborello-lambda deleted the l2/toml_parser_binary branch March 26, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L2 Rollup client prover L2 prover sequencer L2 sequencer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

L2: Separate config file for prover_server and prover_client
4 participants