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

refactor(engine): update sync state for r/w hooks #4687

Merged
merged 3 commits into from
Sep 21, 2023

Conversation

shekhirin
Copy link
Collaborator

@shekhirin shekhirin commented Sep 20, 2023

Same idea as in #4657, but for the UpdateSyncState engine hook action.

It's correct, because when any hook acquires the exclusive DB write access, we should stop receiving the updates from CL:

// If the hook has read-write access to the database, it means that the engine
// can't process any FCU/payload messages from CL. To prevent CL from sending us
// unneeded updates, we need to respond `true` on `eth_syncing` request.

@shekhirin shekhirin added C-debt Refactor of code section that is hard to understand or maintain A-consensus Related to the consensus engine labels Sep 20, 2023
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #4687 (4191c80) into main (cf5d0e2) will decrease coverage by 0.04%.
The diff coverage is 60.00%.

Impacted file tree graph

Files Changed Coverage Δ
crates/consensus/beacon/src/engine/hooks/mod.rs 62.50% <ø> (ø)
crates/consensus/beacon/src/engine/mod.rs 74.10% <55.55%> (-0.16%) ⬇️
crates/consensus/beacon/src/engine/hooks/prune.rs 85.71% <100.00%> (-1.30%) ⬇️

... and 11 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.73% <0.00%> (-0.01%) ⬇️
unit-tests 63.30% <60.00%> (-0.04%) ⬇️

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

Components Coverage Δ
reth binary 32.17% <ø> (ø)
blockchain tree 83.75% <ø> (ø)
pipeline 88.53% <ø> (ø)
storage (db) 72.52% <ø> (ø)
trie 94.73% <ø> (+0.03%) ⬆️
txpool 49.82% <ø> (ø)
networking 77.10% <ø> (-0.12%) ⬇️
rpc 57.83% <ø> (-0.01%) ⬇️
consensus 63.09% <60.00%> (-0.12%) ⬇️
revm 28.38% <ø> (ø)
payload builder 8.35% <ø> (ø)
primitives 86.51% <ø> (-0.04%) ⬇️

@shekhirin shekhirin marked this pull request as ready for review September 20, 2023 13:29
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, pending conflict

@shekhirin shekhirin added this pull request to the merge queue Sep 21, 2023
Merged via the queue into main with commit 5be8ae4 Sep 21, 2023
22 checks passed
@shekhirin shekhirin deleted the alexey/engine-hook-sync-state branch September 21, 2023 12:23
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-debt Refactor of code section that is hard to understand or maintain
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants