-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Split off System random functions into a new Randomness module #3699
Conversation
|
It looks like @expenses signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
1 similar comment
|
It looks like @expenses signed our Contributor License Agreement. 👍 Many thanks, Parity Technologies CLA Bot |
…tion into on_initialize
Co-Authored-By: Kian Paimani <[email protected]>
Co-Authored-By: Kian Paimani <[email protected]>
kianenigma
left a comment
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.
Looks quite good in general. Needs fixing a few minor issues + maybe some tests would also be good.
Co-Authored-By: Bastian Köcher <[email protected]>
Co-Authored-By: Bastian Köcher <[email protected]>
…rate into randomness-module
|
Could you please add some sort of tests? |
|
both of those would do the trick, but ideally I'd like to have something more concise. |
|
Would something like an |
Co-Authored-By: Gavin Wood <[email protected]>
gavofyork
left a comment
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.
Looks reasonable.
Co-Authored-By: Bastian Köcher <[email protected]>
Co-Authored-By: Bastian Köcher <[email protected]>
|
LGTM after a crate rename - it shouldn't be called |
|
@rphmeier I've renamed the crate. Should documentation such as //! # Randomness Module
//!
//! The Randomness module provides a [`random`](./struct.Module.html#method.random) function that
//! generates low-influence random values based on the block hashes from the previous 81 blocks.
//! Low-influence randomness can be useful when defending against relatively weak adversaries.
be renamed too? |
None of by business but I assume yes. Make sure to also merge master before merging this to make sure all external usages of |
bkchr
left a comment
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.
Some last nitpicks, otherwise looks good.
bkchr
left a comment
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.
Sorry, 2 last nitpicks :(
Could you please prepare a pr for polkadot using this guide: https://github.com/paritytech/substrate/blob/master/CONTRIBUTING.adoc#updating-polkadot-as-well
When the Polkadot pr is ready, I will merge this one. (Please make sure your branch in Polkadot is editable by us, so that I can finish it).
Co-Authored-By: Bastian Köcher <[email protected]>
Co-Authored-By: Bastian Köcher <[email protected]>
This closes #1451.