What does this pull request do? Explain your changes. (required)
This is to fix the totalSupply = sum(getVotes(*)) invariant from BondingVotes,
which wasn't held before when we provided voting power to both active and inactive
transcoders and their delegators.
With this change, we make sure the transcoder active stake is also taken into account
and provide zero voting power when the transcoder is not active.
Specific updates (required)
Start checkpointing the isActiveTranscoder bool, derived from activation and deactivation rounds
Fix tests that broke and added some new tests to the new logic (like checkpoints on active set changes)
How did you test each of these updates (required)yarn test
Does this pull request close any open issues?
Fixes PRO-39
What does this pull request do? Explain your changes. (required) This is to fix the
totalSupply = sum(getVotes(*))
invariant fromBondingVotes
, which wasn't held before when we provided voting power to both active and inactive transcoders and their delegators.With this change, we make sure the transcoder active stake is also taken into account and provide zero voting power when the transcoder is not active.
Specific updates (required)
isActiveTranscoder
bool, derived from activation and deactivation roundsHow did you test each of these updates (required)
yarn test
Does this pull request close any open issues? Fixes PRO-39
Also ended up being a potential fix for https://github.com/code-423n4/2023-08-livepeer-findings/issues/194
Checklist:
yarn test
pass