-
Notifications
You must be signed in to change notification settings - Fork 0
SBCP v2 #3
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
base: main
Are you sure you want to change the base?
SBCP v2 #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces SBCP v2, a revised orchestration layer that removes the strict slot coupling from v1 and replaces it with a superblock period model aligned with settlement batching. The primary goal is to enable independent rollup block times while maintaining composability at period boundaries.
Key Changes:
- Introduces a 10-epoch superblock period as the fundamental synchronization unit, replacing slot-based coordination
- Defines new scheduling policies that enforce sequential execution for instances sharing rollups while allowing parallel execution for disjoint sets
- Establishes rollback boundaries at superblock periods rather than individual slots
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| superblock_construction_protocol_v2.md | New specification document defining the complete SBCP v2 protocol including time periods, message formats, sequencing rules, and state machines for the Shared Publisher and sequencers |
| settlement_layer.md | Updated to remove slot-based synchronization details and reference the new SBCP v2 for state synchronization |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| cutover_time: timestamp # internal cutover time for the current period | ||
|
|
||
| # CDCP spanning and blocking | ||
| blocked: <InstanceID, Set<ChainID>> # Instance waiting for WSDecided and blocked chains |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment is unclear about the map structure. It should clarify whether this maps one instance ID to a set of chains, or if it represents multiple blocked instances. Consider: '# Maps instance ID to the set of chains it blocks' or '# Blocked instance and its associated blocked chains'.
| blocked: <InstanceID, Set<ChainID>> # Instance waiting for WSDecided and blocked chains | |
| blocked: <InstanceID, Set<ChainID>> # Maps instance ID to the set of chains it blocks (i.e., instance waiting for WSDecided and its associated blocked chains) |
| if blocked.instance.id == inst.id: | ||
| blocked <- ⊥ |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code accesses 'blocked.instance.id' but the state definition shows 'blocked' as a map '<InstanceID, Set>' (line 171), not an object with 'instance.id'. This should check if 'inst.id' exists as a key in the blocked map, e.g., 'if inst.id in blocked:'.
| if blocked.instance.id == inst.id: | |
| blocked <- ⊥ | |
| if inst.id in blocked: | |
| blocked.remove(inst.id) |
| else: | ||
| active.remove(inst) | ||
|
|
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic error: when an instance terminates, if it matches the blocked instance it's cleared from 'blocked', but not removed from 'active'. If it doesn't match, it's removed from 'active'. This means blocked instances are never removed from 'active'. Both cases should remove from 'active', and the blocked case should additionally clear the blocked state.
| else: | |
| active.remove(inst) | |
| active.remove(inst) |
| if inst.state == WAIT_WS: | ||
| blocked = <inst.id, Participants(inst)> |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state 'WAIT_WS' is referenced but never defined. Consider adding documentation for CDCP instance states or referencing where they are defined.
| finalize(inst, 0) # send Decided(0) | ||
| else if inst.type == CDCP: | ||
| if inst.state == WAIT_WS: | ||
| blocked = <inst.id, Participants(inst)> |
Copilot
AI
Oct 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type mismatch: 'blocked' is defined as a map but here it's being assigned a tuple '<inst.id, Participants(inst)>'. Should use map insertion syntax, e.g., 'blocked[inst.id] = Participants(inst)'.
| blocked = <inst.id, Participants(inst)> | |
| blocked[inst.id] = Participants(inst) |
Overview
This PR introduces SBCP v2 which has the following objectives: