-
Notifications
You must be signed in to change notification settings - Fork 272
Voting Power EMA #2240
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
Voting Power EMA #2240
Conversation
|
Enabled the CI process, to check if EVM test is runnable for PR. |
can we try again? |
2a22ace to
e541d53
Compare
shamil-gadelshin
left a comment
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.
Do we have tests for voting power calculation methods?
…is one is no longer unique
| pub validator_trust: u16, | ||
| pub new_validator_permit: bool, | ||
| pub bond: Vec<(u16, u16)>, | ||
| pub stake: u64, |
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 should use type-safe method of expressing stake (alpha): AlphaCurrency.
|
Accidentally merged and then reverted, @gztensor has some changes |
Description
Voting power feature
Purpose: Track validator voting power using an Exponential Moving Average (EMA) of their stake over time, preventing sudden stake changes from immediately affecting governance weight.
Key Components:
Extrinsics: enable_voting_power_tracking, disable_voting_power_tracking, sudo_set_voting_power_ema_alpha
Storage: VotingPower, VotingPowerTrackingEnabled, VotingPowerDisableAtBlock, VotingPowerEmaAlpha
Type of Change
Checklist
./scripts/fix_rust.shto ensure my code is formatted and linted correctlyAdditional Notes
I’ve attempted to run the VotingPower precompile EVM tests locally but encountered multiple Node.js compatibility issues with the polkadot-api dependencies.
Being unable to resolve them I want to give CI a try
That being said the unit tests written cover the core logic.