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

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

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
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.

None yet

1 participant