Skip to content
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

Integrate EngineArgs into NodeCommand #13742

Open
mattsse opened this issue Jan 8, 2025 · 3 comments · May be fixed by #13748
Open

Integrate EngineArgs into NodeCommand #13742

mattsse opened this issue Jan 8, 2025 · 3 comments · May be fixed by #13748
Assignees
Labels
A-cli Related to the reth CLI C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jan 8, 2025

Describe the feature

we've deprecated the legacy launcher and can now integrate the EngineArgs into the default NodeCommand

let engine_tree_config = TreeConfig::default()
.with_persistence_threshold(engine_args.persistence_threshold)
.with_memory_block_buffer_target(engine_args.memory_block_buffer_target)
.with_state_root_task(engine_args.state_root_task_enabled);

pub struct NodeCommand<

so that we no longer have to do any of this:

if engine_args.experimental {
warn!(target: "reth::cli", "Experimental engine is default now, and the --engine.experimental flag is deprecated. To enable the legacy functionality, use --engine.legacy.");
}
let use_legacy_engine = engine_args.legacy;
match use_legacy_engine {

TODO

  • move EngineArgs into NodeCommand
  • remove deprecated EngineArgs fields: experimental + legacy
  • update/simplify main function to just these lines:
    let handle = builder.launch_node(EthereumNode::default()).await?;
    handle.node_exit_future.await
  • use treeconfig in the launcher by replacing Default
    EngineNodeLauncher::new(task_executor, builder.config.datadir(), Default::default());

    with:
    let engine_tree_config = TreeConfig::default()
    .with_persistence_threshold(engine_args.persistence_threshold)
    .with_memory_block_buffer_target(engine_args.memory_block_buffer_target)
    .with_state_root_task(engine_args.state_root_task_enabled);
    obtained from NodeConfig (after moving EngineArgs into NodeCommand)

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Jan 8, 2025
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started C-debt Refactor of code section that is hard to understand or maintain A-cli Related to the reth CLI and removed S-needs-triage This issue needs to be labelled labels Jan 8, 2025
@htiennv
Copy link
Contributor

htiennv commented Jan 9, 2025

Hi @mattsse , Can you assign me to this task? Thanks

@mymiracle0118
Copy link

Mind if I take this issue?

@programskillforverification
Copy link
Contributor

Could you assign this one to me?

@htiennv htiennv linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-debt Refactor of code section that is hard to understand or maintain C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

4 participants