You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Resolves#145Resolves#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
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.
TotalVotingPower
is not accurate inFinalityProviderDistInfo
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 toTotalDelegationValue
or something.context
The text was updated successfully, but these errors were encountered: