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

pop duplicates entries when returning downloaded blocks in engine #3644

Merged
merged 8 commits into from
Jul 7, 2023

Conversation

cjeva10
Copy link
Contributor

@cjeva10 cjeva10 commented Jul 6, 2023

@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #3644 (f83b85b) into main (526f624) will decrease coverage by 17.63%.
The diff coverage is 60.00%.

Impacted file tree graph

Impacted Files Coverage Δ
crates/consensus/beacon/src/engine/sync.rs 64.53% <60.00%> (-16.00%) ⬇️

... and 202 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.91% <0.00%> (-0.01%) ⬇️
unit-tests 43.95% <60.00%> (-20.18%) ⬇️

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

Components Coverage Δ
reth binary 16.09% <ø> (-10.32%) ⬇️
blockchain tree 70.31% <ø> (-10.95%) ⬇️
pipeline 68.71% <ø> (-17.98%) ⬇️
storage (db) 60.83% <ø> (-12.66%) ⬇️
trie 67.15% <ø> (-27.51%) ⬇️
txpool 34.09% <ø> (-15.20%) ⬇️
networking 54.92% <ø> (-22.92%) ⬇️
rpc 44.76% <ø> (-13.45%) ⬇️
consensus 40.33% <60.00%> (-23.02%) ⬇️
revm 21.66% <ø> (-13.20%) ⬇️
payload builder 6.83% <ø> (ø)
primitives 65.64% <ø> (-22.63%) ⬇️

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.

smol nit

please also take a look @Rjected

crates/consensus/beacon/src/engine/sync.rs Outdated Show resolved Hide resolved
@mattsse mattsse added C-perf A change motivated by improving speed, memory usage or disk footprint A-consensus Related to the consensus engine labels Jul 6, 2023
Comment on lines 308 to 314
while let Some(peek) = self.range_buffered_blocks.peek() {
if peek.0 .0.hash() == block.0 .0.hash() {
self.range_buffered_blocks.pop();
} else {
break;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

please use peek_mut

besides that, this is exactly what we want

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, just needs nightly formatting cargo +nightly fmt

@mattsse mattsse enabled auto-merge July 7, 2023 15:22
@mattsse mattsse added this pull request to the merge queue Jul 7, 2023
Merged via the queue into paradigmxyz:main with commit 93865ef Jul 7, 2023
@cjeva10 cjeva10 deleted the dl-dup-blocks branch July 20, 2023 21: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-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.

3 participants