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

TotalVotingPower is not accurate in FinalityProviderDistInfo #72

Closed
gitferry opened this issue Sep 16, 2024 · 0 comments · Fixed by #207
Closed

TotalVotingPower is not accurate in FinalityProviderDistInfo #72

gitferry opened this issue Sep 16, 2024 · 0 comments · Fixed by #207
Assignees

Comments

@gitferry
Copy link
Member

TotalVotingPower is not accurate in FinalityProviderDistInfo anymore because in cases where the finality providers do not have timestamped pub rand or they are jailed, they will be assigned zero voting power but can continue to accept delegations. Therefore, TotalVotingPower should be renamed to TotalDelegationValue or something.

context

@SebastianElvis SebastianElvis self-assigned this Oct 15, 2024
SebastianElvis added a commit that referenced this issue Oct 16, 2024
Resolves #145 
Resolves #191 (fuzzed locally and it's not flaky anymore)

This PR simplifies the logics in FP set rotation, including:

- Moving event emitting to msg handlers whereever possible (mostly for
jailing/unjailing).
- Removing the handling of special case `len(events) == 0`. This is not
necessary and can be handled altogether in
`ProcessAllPowerDistUpdateEvents` with same complexity.
- Splitting `recordVotingPowerAndCache` into two functions, one for
recording voting power table/cache and the other for emitting
events/hooks for Fp state update.
- Some minor abstraction for separating event emitting and voting power
rotation algorithm.

Will do a second round of refactoring in another PR, together with
#72
SebastianElvis added a commit that referenced this issue Oct 17, 2024
Resolves #72 

This PR renames total voting power to total bonded sat. After
timestamping pub rand and jailing, having bonded BTC does not mean
having voting power anymore, and the corresponding variables need to be
renamed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants