insert cached child at the front of a chain of parent lookups#4780
Merged
realbigsean merged 2 commits intosigp:deneb-free-blobsfrom Sep 29, 2023
Merged
Conversation
pawanjay176
approved these changes
Sep 28, 2023
Member
pawanjay176
left a comment
There was a problem hiding this comment.
Nice catch.
We could consider using a VecDeque to avoid O(n) inserts in Vec though.
Member
Author
|
good idea! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Addressed
I induced some parent lookups on devnet 8 and I observed this log on almost every response:
Sep 25 19:41:18.582 DEBG Invalid block received outcome: NonLinearParentRoots, msg: peer sent invalid blockI'm pretty sure this is happening because we append the "cached child" block (the block that triggers the chain of parent requests) to the end of the chain of blocks here: https://github.com/sigp/lighthouse/blob/deneb-free-blobs/beacon_node/network/src/sync/block_lookups/mod.rs#L1196
This comment seems to suggest blocks here should be ordered from highest slot to lowest slot (assuming "highest" and "lowest" here refer to slot). The fact that blocks are reversed here, and later used in order of ascending slot in
filter_chain_segmentalso backs this up.lighthouse/beacon_node/network/src/network_beacon_processor/sync_methods.rs
Line 403 in 42b34db