Skip to content
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

Design and implement the lockable election provider for multi-block election #6328

Open
gpestana opened this issue Nov 1, 2024 · 0 comments
Labels
T2-pallets This PR/Issue is related to a particular pallet.

Comments

@gpestana
Copy link
Contributor

gpestana commented Nov 1, 2024

In the multi-block election context, the snapshot creation takes multiple blocks. The mutations on the ledgers must be frozen/buffered during the time while the snapshot creation is ongoing, to make sure the snapshot data remains consistent. The election provider must implement a trait LockableElectionDataProvider to signal when to set and release the lock in staking.

Currently, in #6034, the LockableElectionDataProvider implementation is a noop, which is OK to run the election in a single-page context.

Implement the freeze/buffering logic in the staking pallet when the data provider lock is set.

@gpestana gpestana added the T2-pallets This PR/Issue is related to a particular pallet. label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant