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
Change Author Slot Filter to rely on pallet_randomness (Moonbase only) #1956
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.
PreviousLocalVrfOutput
don't need to be an Option. By default (at genesis or first block after upgrade) this will be the default hash (0x0000...0000
).
Co-authored-by: Stephen Shelton <steve@brewcraft.org>
…take/moonbeam into nish-randomness-author-slot-filter
/// 2. First 2 bytes of index.to_le_bytes() when selecting the ith eligible author | ||
/// 3. First 4 bytes of slot_number.to_be_bytes() | ||
/// | ||
/// Note: This needs to be updated when asynchronous backing is in effect, |
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.
s/Note/TODO/
?
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.
:D I'm agnostic here. Will create a tracking ticket for it anyhow. Not a huge fan of TODOs if they're not currently actionable.
Didn't we wanna remove TODOs from our codebase though?
…nbeam-foundation#1956) * attempt using pallet_randomness for auth_slot_filter * use subject with local vrf output for randomness * fix slice copy
What does it do?
attempts using pallet_randomness for auth_slot_filter.
The randomness seed is the
LocalVrfOutput
of the previous block, salted with the subject, which includes the relay block number for collision prevention when the vrf output does not change (in case block production is skipped).The genesis block will have the default
0x00...
value of the hash.Breaking
This changes might break tools monitoring Author selection as it now relies on a different input (from collective flip previously, to moonbeam pallet randomness) to ensure the correct author
What important points reviewers should know?
pallet-randomness-collective
uses a low-entropy randomness, while LocalVRF is high-entropy (allegedly). This should ideally be okay IMO since high-entropy yields a better randomness.Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?
What value does it bring to the blockchain users?