-
Notifications
You must be signed in to change notification settings - Fork 2
SPIN secondary leader selection mechanism #288
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?
Conversation
|
||
1. **Deterministic Secondary Author:** For any given slot `S`, we already have the primary author `P_primary` determined by `slot_author`. We need to define a deterministic way to find the *secondary* author, `P_secondary`, for that same slot `S`. A simple and common approach is to pick the *next* authority in the current session's round-robin order. | ||
|
||
* Modify `slot_author` or add a new function, e.g., `get_slot_authors(slot, session_length, authorities)` that returns `Option<(PrimaryAuthorityId, SecondaryAuthorityId)>`. |
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.
@khssnv: "get_slot_authors seems better to me, otherwise, why have only one secondary when we can iterate over all the validators until the list is exhausted?"
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.
that's just authority set as a whole then, no?
### Decision Drivers (Optional) | ||
|
||
|
||
### Alternatives Considered |
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.
@khssnv: Can we consider an alternative to T_wait, I mean with with the secondary leader always on and producing blocks which the rest of the network doesn't finalize while there are blocks from the primary?
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.
doesn't finalize but block is produced and included in the chain?
|
||
## Context | ||
|
||
The core idea is to allow a designated secondary author to produce a block for a slot if the primary author fails to do so within a reasonable timeframe. Verification must be possible using only the block header and the parent state. |
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.
reasonable timeframe
add somewhere description of this timeframe:
- is it some parameter, e.g. we wait this time until secondary leader starts producing blocks and then switch to next is he fails?
- or it's metric to be determined later?
1. **Deterministic Secondary Author:** For any given slot `S`, we already have the primary author `P_primary` determined by `slot_author`. We need to define a deterministic way to find the *secondary* author, `P_secondary`, for that same slot `S`. A simple and common approach is to pick the *next* authority in the current session's round-robin order. | ||
|
||
* Modify `slot_author` or add a new function, e.g., `get_slot_authors(slot, session_length, authorities)` that returns `Option<(PrimaryAuthorityId, SecondaryAuthorityId)>`. | ||
* The secondary could be `authorities[(primary_index + 1) % authorities.len()]`. Handle edge cases like only one authority. |
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.
Handle edge cases like only one authority.
describe that edge cases are handled by a minimum number of validators, which is regulated by network and staking parameters
No description provided.