-
Notifications
You must be signed in to change notification settings - Fork 12
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 Committee: Transition to Batch-Level Operations #505
Open
zadykian
wants to merge
1
commit into
main
Choose a base branch
from
sync-committee/block-storage-batches
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
5569c51
to
feb1cd7
Compare
feb1cd7
to
59325b8
Compare
29105fd
to
0f9c26f
Compare
## Overview This update replaces block-level operations with batch-level processing across the Sync Committee services to: - Simplify task cancellation logic. - Support the new multi-block batching model. ## Block Storage Changes - Introduced `batchEntry` struct to hold references to blocks, stored in a new dedicated table. - Removed the `IsProved` field from `blockEntry`; it is now associated with the batch. - Replaced `SetBlockAsProved(BlockId)` with `SetBatchAsProved(BatchId)`. - Updated `TryGetNextProposalData()` to use the main shard block hash as the state root instead of `ChildBlocksRootHash`. - Replaced `SetBlockAsProposed(BlockId)` with `SetBatchAsProposed(BatchId)`. ## Partial Reset Enhancements - The starting point is now determined by `BatchId` instead of the main shard block hash. - Switched from block-based iteration to a mechanism using lightweight batch headers (`batchEntry`), reducing the impact of individual block size on reset transaction size. - Adjusted the default capacity limit from **200 blocks** to **100 batches**.
59325b8
to
4dc4ef1
Compare
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.
Overview
This update replaces block-level operations with batch-level processing across the Sync Committee services to:
Block Storage Changes
batchEntry
struct to hold references to blocks, stored in a new dedicated table.IsProved
field fromblockEntry
; it is now associated with the batch.SetBlockAsProved(BlockId)
withSetBatchAsProved(BatchId)
.TryGetNextProposalData()
to use the main shard block hash as the state root instead ofChildBlocksRootHash
.SetBlockAsProposed(BlockId)
withSetBatchAsProposed(BatchId)
.Partial Reset Enhancements
BatchId
instead of the main shard block hash.batchEntry
), reducing the impact of individual block size on reset transaction size.Please review PR #388 before reviewing this one