-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
…ble-equialize-offchain-2
…ch/substrate into kiz-enable-equialize-offchain-2
why does it includes #5686 ? |
pushed by mistake. I will revert. |
This reverts commit dbdd27f.
bin/node/runtime/src/lib.rs
Outdated
@@ -363,6 +364,8 @@ impl pallet_staking::Trait for Runtime { | |||
type ElectionLookahead = ElectionLookahead; | |||
type Call = Call; | |||
type SubmitTransaction = TransactionSubmitterOf<()>; | |||
type Randomness = RandomnessCollectiveFlip; |
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.
Why not Babe
?
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.
Ow I didn't know Babe also implements it. What are the differences? I don't think the randomness that Staking needs is in any sense consensus critical.
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.
Babe
provides "real" randomness, while the one provided by collective flip is based on the last 80? block hashes.
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.
isn't there a local (non-deterministic) rand()
function for offchain workers?
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.
Yeah.
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.
I'll switch to that then 👍
Needs a companion PR. |
…ble-equialize-offchain-2
bot merge |
Following: #5452
Just enables to offchain worker code that submits the solution back to run a random number of iterations (capped by
type MaxIterations
). Rest of the changes pertain to fuzzing and testing.polkadot companion: paritytech/polkadot#1039