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

feat: integrate EngineArgs into NodeCommand #13748

Merged
merged 6 commits into from
Jan 11, 2025

Conversation

htiennv
Copy link
Contributor

@htiennv htiennv commented Jan 9, 2025

Closes #13742.

@htiennv
Copy link
Contributor Author

htiennv commented Jan 9, 2025

Hi @mattsse , I have a question.

The values DEFAULT_PERSISTENCE_THRESHOLD and DEFAULT_MEMORY_BLOCK_BUFFER_TARGET should import from reth-node-builder but it is cyclic import. How should i handle it, Thanks!

@htiennv htiennv marked this pull request as ready for review January 9, 2025 09:00
@mattsse
Copy link
Collaborator

mattsse commented Jan 9, 2025

we can move this constants to node-core

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, this is pretty good already

crates/cli/commands/src/node.rs Outdated Show resolved Hide resolved
Comment on lines 567 to 570
let engine_tree_config = TreeConfig::default()
.with_persistence_threshold(builder.config.engine.persistence_threshold)
.with_memory_block_buffer_target(builder.config.engine.memory_block_buffer_target)
.with_state_root_task(builder.config.engine.state_root_task_enabled);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably make this a function of builder or config?

Copy link
Member

@gakonst gakonst Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, specifically it'd be nice if in the Optimism config we could instantiate TreeConfig from RollupArgs somehow, so that we don't need this: https://github.com/paradigmxyz/reth/blob/main/crates/optimism/bin/src/main.rs#L26-L41

Ideally this https://github.com/paradigmxyz/reth/blob/main/crates/optimism/bin/src/main.rs#L26C12-L39 becomes builder.node(OpNode::new(rollup_args))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for review

crates/node/core/src/node_config.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mattsse mattsse enabled auto-merge January 11, 2025 17:13
@mattsse mattsse added this pull request to the merge queue Jan 11, 2025
Merged via the queue into paradigmxyz:main with commit 8e7768d Jan 11, 2025
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate EngineArgs into NodeCommand
3 participants