-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit-reveal based solution submission for EPM #13129
Conversation
The CI pipeline was cancelled due to failure one of the required jobs. |
Signed, | ||
/// Umbrella phase for all the commit-reveal phases (i.e `Commit`, `Reveal` and | ||
/// `FallbackReveal`). | ||
CommitReveal, |
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.
Would a nested enum be more appropriate?
Then the enums could look like
pub enum Phase {
Off,
CommitReveal(CommitReveal),
Signed,
Unsigned((bool, Bn)),
Emergency,
}
pub enum CommitReveal {
Commit,
Reveal((AccountId, Bn)),
FallbackReveal
}
|
||
/// Duration of the commit reveal phase. | ||
#[pallet::constant] | ||
type CommitReveal: Get<Self::BlockNumber>; |
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 know this was how the phase durations were named before. But I feel it would be better if we name these associated types as CommitRevealDuration
, CommitPhaseDuration
and so on. Wdyt?
/// | ||
/// Stores a bounded set of `ElectionScore`, indexed by the score. | ||
#[pallet::storage] | ||
#[pallet::getter(fn commitments)] |
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.
We don't need these getters
I'm closing this PR since I do not intend to work on it any time soon, but let's keep an eye on paritytech/polkadot-sdk#457 and revisit/re-open this PR when useful. |
Specs (wip): https://hackmd.io/zE1goNRmSsa8q_LCjHD5Kg
Currently, the EPM signed expects staking miners to submit a full election solution, which is expensive (tx-fees) and potentially stores a lot of redundant data on-chain. This PR splits the solution submission into two phases:
Closes paritytech/polkadot-sdk#457