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

Sync primary network checkpoints during bootstrapping #2752

Merged
merged 97 commits into from
Apr 17, 2024

Conversation

StephenButtolph
Copy link
Contributor

@StephenButtolph StephenButtolph commented Feb 19, 2024

Why this should be merged

This is a minimally invasive PR to increase the parallelization of fetching primary network blockchains.

How this works

By including periodic checkpoints of the primary network chains, we can fetch each chain segment in parallel rather than needing to fetch the whole chain serially.

How this was tested

  • CI
  • Synced Fuji

@StephenButtolph StephenButtolph self-assigned this Feb 19, 2024
@StephenButtolph StephenButtolph added this to the v1.11.1 milestone Feb 19, 2024
@StephenButtolph StephenButtolph modified the milestones: v1.11.2, v1.11.3 Mar 1, 2024
Base automatically changed from interval-tree-syncing-integration to master April 2, 2024 15:16
@StephenButtolph StephenButtolph modified the milestones: v1.11.4, v1.11.5 Apr 4, 2024
mboben pushed a commit to mboben/avalanchego that referenced this pull request Apr 7, 2024
Co-authored-by: Stephen <stephen@avalabs.org>
@@ -446,7 +446,7 @@ func (i *ipTracker) resetBloom() error {
return err
}

count := max(maxIPEntriesPerValidator*i.gossipableIDs.Len(), minCountEstimate)
count := max(maxIPEntriesPerNode*i.trackedIDs.Len(), minCountEstimate)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a minor bug fix. Previously we weren't accounting for manuallyTracked nodes correctly in the bloom filter size. This caused frequent bloom filter resets once we were tracking manually tracking significantly more nodes than we were previously.

See added test.

@StephenButtolph StephenButtolph marked this pull request as ready for review April 16, 2024 18:49
@StephenButtolph StephenButtolph added bug Something isn't working networking This involves networking consensus This involves consensus and removed bug Something isn't working labels Apr 16, 2024
"zGhQDuTyFxZrY3NE3QzBU4v6r8RphEJfMPUgZ2cNHuC7xHbcB"
]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing newline at EOF (or was this done intentionally if it doesn't play nice w/ goembed?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was auto-generated. If we want to add a newline here, we should do it in the script.

genesis/checkpoints.go Outdated Show resolved Hide resolved
genesis/generate/checkpoints/main.go Outdated Show resolved Hide resolved
genesis/generate/checkpoints/main.go Outdated Show resolved Hide resolved
genesis/validators.go Outdated Show resolved Hide resolved
genesis/generate/validators/main.go Outdated Show resolved Hide resolved
StephenButtolph and others added 3 commits April 16, 2024 16:02
Co-authored-by: Joshua Kim <20001595+joshua-kim@users.noreply.github.com>
Signed-off-by: Stephen Buttolph <stephen@avalabs.org>
@StephenButtolph StephenButtolph added this pull request to the merge queue Apr 17, 2024
Merged via the queue into master with commit 389a4ee Apr 17, 2024
18 checks passed
@StephenButtolph StephenButtolph deleted the add-checkpoints branch April 17, 2024 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus This involves consensus networking This involves networking
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants