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 Committee: Transition to Batch-Level Operations #505

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zadykian
Copy link
Member

@zadykian zadykian commented Mar 7, 2025

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.

Please review PR #388 before reviewing this one

@zadykian zadykian self-assigned this Mar 7, 2025
@zadykian zadykian changed the title # Sync Committee: Transition to Batch-Level Operations Sync Committee: Transition to Batch-Level Operations Mar 7, 2025
Copy link

## 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**.
@zadykian zadykian force-pushed the sync-committee/block-storage-batches branch from 59325b8 to 4dc4ef1 Compare March 7, 2025 14:16
@zadykian zadykian marked this pull request as ready for review March 7, 2025 14:17
@zadykian zadykian requested review from akokoshn, oclaw and x-mass March 7, 2025 14:17
Base automatically changed from sync-committee/parent-batch-ids to main March 10, 2025 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant