-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Introduce cancel_proposal
to rid us of those pesky proposals
#7111
Conversation
Also fix proposal weight.
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.
Breaks transaction_version
in case that hasn't been updated for the next release.
@@ -544,6 +556,10 @@ decl_error! { | |||
WrongUpperBound, | |||
/// Maximum number of votes reached. | |||
MaxVotesReached, | |||
/// The provided witness data is wrong. | |||
InvalidWitness, |
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.
self/random note that some other modules can generally use this terminology: Some data that is passed in for sanity/weight should be called witness data.
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.
Other than my comments, this looks good.
@kianenigma @thiolliere @shawntabrizi ready for final review... |
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 good to me
@kianenigma @shawntabrizi would be good to get a final review. |
Missing reads and writes. I am investigating |
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 pushed the latest Weights to the PR. Note that the only relevant changes was an additional read to the propose
weight, caused by checking the blacklist, and a reduction in the on_initialize_base
weight due to bad benchmarking code.
To clarify the intention, on_initialize_base
is supposed to be the least amount of computation needed by the on_initialize
code, so in this case (5 + R) Reads.
If the on_initialize code actually triggers any of the more complex paths, like launch_next
or bake_referendum
, we will assume that the computation should take a full block weight. This is hardcoded into the on_initialize
logic.
Tracking Issue: https://github.com/paritytech/substrate/issues/7209
bot merge |
Trying merge. |
Also fixes the weight of
propose
and introduces a hard-coreblacklist
option to ensure a proposal hash never returns.polkadot companion: paritytech/polkadot#1728
TODO: