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

Bound lookup parent chain length with tip extension #5705

Merged
merged 2 commits into from
Jun 27, 2024

Conversation

dapplion
Copy link
Collaborator

@dapplion dapplion commented May 3, 2024

Issue Addressed

Sync lookup bounds the maximum length of parent chains. Current code covered the case where a new parent lookup extended the ancestor of a parent chain beyond the max length. However, there's a second case. Consider these events:

  • New lookup for unknown block root
  • Receive block root which happens to be the child of a parent's chain tip
  • Parent chain exceeds max length

Proposed Changes

Bound lookup parent chain length with tip extension. Extending the sequence of events above:

  • New lookup for unknown block root
  • Receive block root which happens to be the child of a parent's chain tip
  • Send block for processing
  • Receive ParentUnknown
  • Call search_parent_of_child(parent, block)

This PR introduces the max length bound in this final step

@dapplion dapplion force-pushed the parent-chain-second-check branch from 51b3fb2 to 92a9203 Compare May 7, 2024 02:33
@dapplion dapplion added the ready-for-review The code is ready for review label May 15, 2024
Copy link
Member

@realbigsean realbigsean left a comment

Choose a reason for hiding this comment

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

LGTM

@realbigsean
Copy link
Member

@mergify queue

Copy link

mergify bot commented Jun 27, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at f14f21f

mergify bot added a commit that referenced this pull request Jun 27, 2024
@mergify mergify bot merged commit f14f21f into sigp:unstable Jun 27, 2024
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review The code is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants