Merged
Conversation
Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
Signed-off-by: ljedrz <ljedrz@users.noreply.github.com>
Refactor BlockSync and move client-specific, or validator-specific, code to the client, or validator, logic.
62ec311 to
0c75996
Compare
howardwu
reviewed
Mar 26, 2025
howardwu
reviewed
Mar 26, 2025
howardwu
reviewed
Mar 26, 2025
Member
|
^You can add this to the main PR description for improved visibility. Follow up questions for main PR description:
|
Collaborator
|
@kpandl Could you run the sync tests on this PR to check if there are any improvements/regressions to syncing after the change? |
046decd to
bff7a23
Compare
Contributor
Author
|
I updated the PR description to better reflect the current state of this PR and added a simplified diagram. Hope we can get it merged this week. @vicsn |
raychu86
reviewed
Apr 7, 2025
raychu86
previously approved these changes
Apr 7, 2025
Collaborator
raychu86
left a comment
There was a problem hiding this comment.
Great cleanup and unification of disjoint usages! Code overall looks logically correct.
Would wait to merge until proper sync stress tests have been run and reported. @kpandl would appreciate any updates once you've had a change to run the tests
Collaborator
Co-authored-by: Raymond Chu <14917648+raychu86@users.noreply.github.com> Signed-off-by: Kai Mast <kai@kaimast.com>
raychu86
approved these changes
Apr 9, 2025
kaimast
added a commit
to kaimast/snarkOS
that referenced
this pull request
Apr 29, 2025
vicsn
added a commit
that referenced
this pull request
Apr 30, 2025
kaimast
added a commit
to kaimast/snarkOS
that referenced
this pull request
May 3, 2025
This reverts commit 70d6a84.
kaimast
added a commit
to kaimast/snarkOS
that referenced
this pull request
May 7, 2025
This reverts commit 70d6a84.
kaimast
added a commit
to kaimast/snarkOS
that referenced
this pull request
May 9, 2025
This reverts commit 70d6a84.
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.

Motivation
There are two different code paths that perform block synchronization: one for validators, and one for clients/provers.
In the case of validators, there exist two different instances of
BlockSync.This PR aims to address this by moving code that specific to validators or clients. It also improves documentation of the block synchronization logic.
Finally, the PR serves as the basis for upcoming changes to block synchronization that will harden security and improve performance of the protocol.
Overview
The following is an outline of the structs affected by this PR. It also highlights which structs received significant changes.
Changes
There have been a multiple updates to this PR, and I would prefer if it gets squashes before a merge to not clutter the commit history too much.
Below is a list of the first set of commits that implemented the vast majority of the PR.
BlockSync.BlockSyncevery time due to the very first commit.Test Plan
Existing tests should suffice, as this PR does not change any functionality.