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

Issue requests for missing blocks on forkchoice update #9672

Closed
Tracked by #8742
mattsse opened this issue Jul 20, 2024 · 0 comments · Fixed by #9704
Closed
Tracked by #8742

Issue requests for missing blocks on forkchoice update #9672

mattsse opened this issue Jul 20, 2024 · 0 comments · Fixed by #9704
Assignees
Labels
C-enhancement New feature or request

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jul 20, 2024

we have a way to request blocks from the network (live sync)

via

/// Block download is needed.
Download(DownloadRequest),

this is currently missing and would be equivalent to this logic in the existing beacon consensus impl:

/// This handles downloaded blocks that are shown to be disconnected from the canonical chain.
///
/// This mainly compares the missing parent of the downloaded block with the current canonical
/// tip, and decides whether or not the pipeline should be run.
///
/// The canonical tip is compared to the missing parent using `exceeds_pipeline_run_threshold`,
/// which returns true if the missing parent is sufficiently ahead of the canonical tip. If so,
/// the pipeline is run. Otherwise, we need to insert blocks using the blockchain tree, and
/// must download blocks outside of the pipeline. In this case, the distance is used to
/// determine how many blocks we should download at once.
fn on_disconnected_block(
&mut self,
downloaded_block: BlockNumHash,
missing_parent: BlockNumHash,
head: BlockNumHash,
) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant