Skip to content

Conversation

@S1nus
Copy link
Member

@S1nus S1nus commented Nov 14, 2023

closes #1220

Instead of #1220, we'll just fix and update the block_spec.

Also adds the termination condition, and processing out-of-order rollup blocks from DA.

Summary by CodeRabbit

  • New Features

    • Introduced a requirement for blocks to have a valid signature from the centralized sequencer.
    • Implemented support for out-of-order rollup blocks on the Data Availability network.
    • Added a termination condition for sequencer double-signing scenarios.
  • Documentation

    • Updated block specification documentation to reflect new validation rules.
    • Added diagrams to illustrate out-of-order block handling and termination conditions.
  • Refactor

    • Removed AggregatorsHash and NextAggregatorsHash fields from block headers to streamline the validation process.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2023

## Walkthrough
The recent updates centralize the block validation process by requiring a single valid signature from a centralized sequencer for block commits. The validator set is now fixed to one, with the removal of aggregator hashes from the block header. Additionally, the block manager now supports out-of-order rollup blocks and includes a termination condition for sequencer double-signing.

## Changes

| Files | Change Summary |
| --- | --- |
| `types/block_spec.md` | Centralized sequencer signature required for `Commit`, `Validators` length set to 1, removed `AggregatorsHash` and `NextAggregatorsHash`. |
| `block/block-manager.md` | Added support for out-of-order rollup blocks and termination condition for sequencer double-signing. |

> 🐇 In the code's gentle flow, a single signature now will show,  
> As winter's chill begins to bite, our blocks align with sequenced light. 🌟✨

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@codecov
Copy link

codecov bot commented Nov 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (58b3152) 53.46% compared to head (271f51a) 53.46%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1335   +/-   ##
=======================================
  Coverage   53.46%   53.46%           
=======================================
  Files          49       49           
  Lines        6197     6197           
=======================================
  Hits         3313     3313           
  Misses       2573     2573           
  Partials      311      311           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@S1nus S1nus marked this pull request as ready for review November 14, 2023 10:35
@S1nus S1nus requested a review from nashqueue November 14, 2023 10:35
@S1nus S1nus requested a review from Manav-Aggarwal November 14, 2023 10:35
@RollkitBot RollkitBot requested a review from tzdybal November 14, 2023 10:35
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between a6e3b83 and 3afcf47.
Files selected for processing (1)
  • types/block_spec.md (2 hunks)
Additional comments: 3
types/block_spec.md (3)
  • 87-91: The changes to the Commit and Validators fields reflect a significant shift towards centralization. Ensure that these changes are intentional and align with the overall system design and security model. This centralization could introduce single points of failure and reduce the robustness of the system against attacks or downtime of the central sequencer.

  • 94-94: The removal of AggregatorsHash and NextAggregatorsHash fields simplifies the header structure. Verify that this change is compatible with the rest of the system and that any logic depending on these fields is appropriately updated or removed.

  • 108-110: Ensure that the ProposerAddress validation logic is updated to reflect the new centralization changes, as it should now only accept the centralized sequencer's address as valid.

Manav-Aggarwal
Manav-Aggarwal previously approved these changes Nov 15, 2023
@S1nus S1nus enabled auto-merge November 16, 2023 15:44
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 3afcf47 and 830a2e9.
Files ignored due to filter (2)
  • block/out-of-order-blocks.png
  • block/termination.png
Files selected for processing (1)
  • block/block-manager.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • block/block-manager.md

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 830a2e9 and 32839c8.
Files selected for processing (1)
  • types/block_spec.md (2 hunks)
Additional comments: 3
types/block_spec.md (3)
  • 87-91: The documentation clearly states the new requirements for the Commit and Validators fields. The Commit must have one valid signature from the centralized sequencer, and the Validators array must have a length of exactly one. This reflects the shift to a centralized staking model. It's important to ensure that the codebase reflects these changes and that any logic that previously handled multiple validators is updated accordingly.

  • 95-95: The removal of AggregatorsHash and NextAggregatorsHash fields from the Header struct simplifies the block header structure. The note indicates that Rollkit version A should not process validator set updates from the ABCI application and should maintain the centralized sequencer as the sole validator. This is a significant change that should be clearly communicated to developers and operators to avoid confusion.

  • 109-111: The ProposerAddress field validation is mentioned to be checked in the Verify() step. Given the move to a centralized sequencer model, it's crucial that the ProposerAddress corresponds to the centralized sequencer's address. Any deviation from this should be flagged as a critical error, as it would indicate a block proposal from an unauthorized entity.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 32839c8 and 271f51a.
Files selected for processing (1)
  • block/block-manager.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • block/block-manager.md

@S1nus S1nus added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit 9434283 Nov 20, 2023
@S1nus S1nus deleted the connor/update-val-spec branch November 20, 2023 21:15
gupadhyaya pushed a commit that referenced this pull request Nov 24, 2023
closes #1220

Instead of #1220, we'll just fix
and update the block_spec.

Also adds the termination condition, and processing out-of-order rollup
blocks from DA.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a requirement for blocks to have a valid signature from the
centralized sequencer.
- Implemented support for out-of-order rollup blocks on the Data
Availability network.
- Added a termination condition for sequencer double-signing scenarios.

- **Documentation**
- Updated block specification documentation to reflect new validation
rules.
- Added diagrams to illustrate out-of-order block handling and
termination conditions.

- **Refactor**
- Removed `AggregatorsHash` and `NextAggregatorsHash` fields from block
headers to streamline the validation process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Connor O'Hara <connor@switchboard.xyz>
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.

4 participants