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

Feature/reth el integration #185

Merged
merged 28 commits into from
Jul 30, 2024
Merged

Feature/reth el integration #185

merged 28 commits into from
Jul 30, 2024

Conversation

sapinb
Copy link
Contributor

@sapinb sapinb commented Jul 26, 2024

Description

closes #104
closes #106
closes #133

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

@sapinb sapinb requested review from bewakes and delbonis July 26, 2024 11:21
Copy link

codecov bot commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 39.71377% with 337 lines in your changes missing coverage. Please review.

Project coverage is 51.03%. Comparing base (1edb77f) to head (36c6e9a).

Files Patch % Lines
crates/evmexec/src/fork_choice_state.rs 0.00% 54 Missing ⚠️
crates/evmexec/src/http_client.rs 2.32% 42 Missing ⚠️
crates/evmexec/src/engine.rs 70.50% 41 Missing ⚠️
reth/src/main.rs 0.00% 40 Missing ⚠️
sequencer/src/main.rs 0.00% 40 Missing ⚠️
crates/consensus-logic/src/duty_executor.rs 0.00% 34 Missing ⚠️
sequencer/src/config.rs 16.66% 30 Missing ⚠️
crates/consensus-logic/src/genesis.rs 0.00% 16 Missing ⚠️
crates/evmctl/src/messages.rs 43.47% 13 Missing ⚠️
crates/state/src/block.rs 60.86% 9 Missing ⚠️
... and 6 more
@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
- Coverage   51.93%   51.03%   -0.91%     
==========================================
  Files          80       85       +5     
  Lines        7051     7413     +362     
==========================================
+ Hits         3662     3783     +121     
- Misses       3389     3630     +241     
Files Coverage Δ
crates/consensus-logic/src/unfinalized_tracker.rs 95.51% <100.00%> (+0.02%) ⬆️
crates/db/src/l2/db.rs 99.37% <100.00%> (ø)
crates/db/src/l2/schemas.rs 0.00% <ø> (ø)
crates/db/src/macros.rs 82.35% <100.00%> (+12.35%) ⬆️
crates/db/src/stubs/l2.rs 65.95% <100.00%> (ø)
crates/db/src/sync_event/schemas.rs 100.00% <ø> (ø)
crates/db/src/traits.rs 100.00% <ø> (ø)
crates/primitives/src/buf.rs 64.76% <ø> (+2.85%) ⬆️
crates/primitives/src/params.rs 0.00% <ø> (ø)
crates/state/src/chain_state.rs 60.00% <ø> (ø)
... and 17 more

... and 1 file with indirect coverage changes

Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Looks good so far.

crates/state/src/block.rs Outdated Show resolved Hide resolved
crates/state/src/block.rs Outdated Show resolved Hide resolved
Comment on lines +110 to +107
151, 170, 71, 78, 222, 173, 105, 242, 232, 9, 47, 21, 45, 160, 207, 234, 161, 29, 114,
237, 237, 94, 26, 177, 140, 238, 193, 81, 63, 80, 88, 181,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't bother keeping this state test in sync. It's commented out on master now. This test isn't providing us any value if we don't have some alternative means to compute the numbers we're hardcoding in here. We will probably switch to SSZ before mainnet and that has a well-defined structure hashing scheme.

crates/primitives/src/evm_exec.rs Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be named forkchoice_state or something.

crates/evmexec/src/engine.rs Outdated Show resolved Hide resolved
let fork_choice_result = self
.client
.fork_choice_updated_v2(fork_choice_state, None)
.await;

info!(
"update_block_state; fork_choice_result: {:?}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to clean these up when getting ready to merge.

crates/evmexec/src/http_client.rs Outdated Show resolved Hide resolved
sequencer/src/config.rs Outdated Show resolved Hide resolved
crates/evmexec/src/el_payload.rs Outdated Show resolved Hide resolved
@sapinb sapinb force-pushed the feature/reth-el-integration branch from f6ee20e to e741b90 Compare July 29, 2024 07:42
@sapinb sapinb requested a review from delbonis July 29, 2024 09:06
Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Looks pretty good.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to name this to indicate it's just a dev test chain.

Comment on lines +61 to +65
command.ext.logs.log_file_directory = command
.ext
.logs
.log_file_directory
.join(command.chain.chain.to_string());
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks weird, is this normal?

Copy link
Contributor Author

@sapinb sapinb Jul 30, 2024

Choose a reason for hiding this comment

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

I didnt want to duplicate most of the code for NodeCommand and
and LogArgs

So this ended up with putting log args as extension to node commands. 🤷

This piece of code is the equivalent of this reth code

@delbonis
Copy link
Contributor

delbonis commented Jul 29, 2024

Just make sure that the test framework instantiation works correctly. Like that the engine API keys work.

@sapinb
Copy link
Contributor Author

sapinb commented Jul 30, 2024

@delbonis

Just make sure that the test framework instantiation works correctly. Like that the engine API keys work.

Functional tests are working using reth as service during tests, so ok there

Comment on lines +120 to +121
"--reth-authrpc", reth_socket,
"--reth-jwtsecret", reth_secret_path,
Copy link
Contributor

Choose a reason for hiding this comment

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

These should both use the term "engine", I can tweak this myself.

@delbonis
Copy link
Contributor

Is this still supposed to be a "draft" or is this closer to being mergeable?

@sapinb sapinb marked this pull request as ready for review July 30, 2024 19:47
@sapinb
Copy link
Contributor Author

sapinb commented Jul 30, 2024

Is this still supposed to be a "draft" or is this closer to being mergeable?

@delbonis If there are no major issues, this can be considered mergable.

@sapinb sapinb requested a review from delbonis July 30, 2024 19:49
Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

This kinda steps on my PR I was working on since I was refactoring a few bits related to block assembly but that's fine I should be able to rebase.

@delbonis
Copy link
Contributor

I don't know why it says that one toml file is incorrectly formatted, ignoring.

@delbonis delbonis merged commit fd5de94 into master Jul 30, 2024
14 of 22 checks passed
@storopoli storopoli deleted the feature/reth-el-integration branch November 28, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants