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: run pipeline if latest finalized is far from pipeline progress #3662

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Jul 7, 2023

When the pipeline finishes, it currently runs the update_tree_on_finished_pipeline method immediately afterwards, causing a potentially large execution of buffered blocks.

Now, this checks the buffer to see if the latest finalized block exists in the buffer, and checks its distance compared to the current pipeline progress. If the distance is more than the pipeline threshold, this will run the pipeline and prevent the update_tree_on_finished_pipeline call.

@Rjected Rjected added C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint A-consensus Related to the consensus engine labels Jul 7, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #3662 (5700912) into main (526f624) will increase coverage by 0.00%.
The diff coverage is 77.41%.

Impacted file tree graph

Impacted Files Coverage Δ
crates/consensus/beacon/src/engine/mod.rs 75.49% <77.41%> (-0.03%) ⬇️

... and 11 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.90% <0.00%> (-0.02%) ⬇️
unit-tests 64.13% <77.41%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.40% <ø> (ø)
blockchain tree 81.58% <ø> (+0.32%) ⬆️
pipeline 86.76% <ø> (+0.07%) ⬆️
storage (db) 73.51% <ø> (+0.03%) ⬆️
trie 94.66% <ø> (ø)
txpool 49.28% <ø> (ø)
networking 77.81% <ø> (-0.04%) ⬇️
rpc 58.21% <ø> (ø)
consensus 63.40% <77.41%> (+0.04%) ⬆️
revm 34.86% <ø> (ø)
payload builder 6.83% <ø> (ø)
primitives 88.24% <ø> (-0.03%) ⬇️

@Rjected Rjected force-pushed the dan/run-pipeline-again-if-possible branch from 553c7a6 to 5700912 Compare July 7, 2023 19:00
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, love the docs, so this is easy to follow.

@mattsse mattsse added this pull request to the merge queue Jul 10, 2023
Merged via the queue into main with commit c8d0e7e Jul 10, 2023
@mattsse mattsse deleted the dan/run-pipeline-again-if-possible branch July 10, 2023 11:59
merklefruit pushed a commit to merklefruit/op-reth-old that referenced this pull request Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Related to the consensus engine C-enhancement New feature or request C-perf A change motivated by improving speed, memory usage or disk footprint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants