-
Notifications
You must be signed in to change notification settings - Fork 911
[FRAME] Re-normalization migration for pallet-conviction-voting
#125
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
Comments
What a bout a |
This would be callable on all votes? Then it would also apply to votes that were cast with the correct config from the time before out miss-configuration. |
Doesn't this only means that whoever voted before changing the conviction period will just get the wrong conviction period? Aka earlier unlocks, but no other bugs? |
I dont think there will be any bugs without a migration, its just that the period and conviction for past votes would lead either to:
|
Polkadot js was always showing the conviction period. Do we know what other wallets etc have shown? From a use experience POV, I would probably not the fix the old periods and live with the shorter lockup. |
Yes, in which case it would do nothing and would charge tx-fees. If this is a one-ff temporary inconsistency, I would also prefer to not deal with it. Voting seems to be this case. But we have to look into existing delegations and if/how the conviction applied to delegation will be impacted. This is not something that we can overlook. |
Yeah, I mean we should check that everything works if we do it without a migration. |
Other chains may also have similar issue if they want to adjust the parameters as well so it will be best if we have something to better handle the change of parameters. |
Yes. I think a good start is to change the hard-coded type Conviction:
// Convert a Conviction to a Lock Duration. This obsoletes `VoteLockPeriod`.
Convert<Self::Conviction, BlockNumberFor<Self>>
// Convert a Conviction and a Balance to a number of Votes (often by multiplication).
+ Convert<(Self::Conviction, BalanceOf<Self, I>), BalanceOf<Self, I>>
+ Eq
+ Default
+ Copy
+ Parameter
+ Member
+ MaxEncodedLen; (the conversions can be split up, if neccecary) |
…ion header storage (paritytech#125) * Remove execution header storage & submit inbound message with execution update * Fix ci breaking * More refactoring * Update beacon test fixtures * Format code * Initialize storage with finalized checkpoint for benchmark * Update weights include verify the execution proof * Fix breaking test * Remove fixture not in use * Add detail for InvalidExecutionProof * Initialize checkpoint for tests on demand * Revert error as NotBootstrapped for submit_update_with_missing_bootstrap * Add verify_execution_header tests back * Add error test back * Cleanup templates * Update bridges/snowbridge/primitives/beacon/src/types.rs Co-authored-by: Vincent Geddes <vincent@snowfork.com> * Narrowed inputs * Remove fields irrelevant from proof * Update bridges/snowbridge/primitives/core/src/inbound.rs Co-authored-by: Vincent Geddes <vincent@snowfork.com> * Update bridges/snowbridge/pallets/ethereum-client/src/impls.rs Co-authored-by: Vincent Geddes <vincent@snowfork.com> * Polish --------- Co-authored-by: Vincent Geddes <vincent@snowfork.com>
In order to enact the new conviction voting period mentioned here, we need to create a migration since the factors will not be applied retroactively on their own.
The migration needs to retroactively fix-up all votes and factors.
Context from chat:
The text was updated successfully, but these errors were encountered: