-
Notifications
You must be signed in to change notification settings - Fork 236
specs: add validator set specs #1279
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Sequencer Selection Scheme | ||
|
|
||
| ## Abstract | ||
|
|
||
| The Sequencer Selection scheme describes the process of selecting a block proposer i.e. sequencer from the validator set. | ||
|
|
||
| ## Protocol/Component Description | ||
|
|
||
| There is exactly one sequencer which is configured at genesis. `GenesisDoc` usually contains an array of validators as it is imported from `CometBFT`. If there is more than one validator defined | ||
| in the genesis validator set, an error is thrown. | ||
|
|
||
| The `State` struct defines a `Sequencer` field which contains the public key of the first and only validator of the genesis. | ||
|
|
||
| The `Header` struct defines a field called `ProposerAddress` which is the pubkey of the original proposer of the block. | ||
|
|
||
| The `SignedHeader` struct commits over the header and the proposer address and stores the result in `LastCommitHash`. | ||
|
|
||
| A new untrusted header is verified by checking its `ProposerAddress` and matching it against the best-known header. In case of a mismatch, an error is thrown. | ||
|
|
||
| When a new node is syncing, the block manager matches the `proposerKey` against the `Sequencer` field of the `lastState`. If a block is not signed by the expected proposer, it is ignored. | ||
|
|
||
| ## Message Structure/Communication Format | ||
|
|
||
| The primary structures encompassing validator information include `SignedHeader`, `Header`, and `State`. Some fields are repurposed from CometBFT as seen in `GenesisDoc` `Validators`. | ||
|
|
||
| ## Assumptions and Considerations | ||
|
|
||
| 1. There must be exactly one validator defined in the genesis file, which determines the sequencer for all the blocks. | ||
|
|
||
| ## Implementation | ||
|
|
||
| The implementation is split across multiple functions including `IsProposer`, `publishBlock`, `CreateBlock`, and `Verify` among others, which are defined in various files like `state.go`, `manager.go`, `block.go`, `header.go` etc., within the repository. | ||
|
|
||
| See [block manager] | ||
|
|
||
| ## References | ||
|
|
||
| [1] [Block Manager][block manager] | ||
|
|
||
| [block manager]: https://github.com/rollkit/rollkit/blob/v0.11.x/block/block-manager.md | ||
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.
Uh oh!
There was an error while loading. Please reload this page.