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

[delta-audit] bonding: Only provide voting power for active stake #621

Closed
wants to merge 2 commits into from

Conversation

victorges
Copy link
Member

@victorges victorges commented Aug 25, 2023

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

Also ended up being a potential fix for code-423n4/2023-08-livepeer-findings#194

Checklist:

  • README and other documentation updated
  • All tests using yarn test pass

@victorges victorges changed the base branch from confluence to delta August 26, 2023 03:52
@victorges victorges force-pushed the vg/fix/total-supply-invariant branch 2 times, most recently from 5611e8c to 38e7a9e Compare August 28, 2023 19:43
@victorges victorges changed the title bonding: Fix the totalSupply = sum(getVotes(*)) invariant on BondingVotes bonding: Only provide voting power for active stake Aug 28, 2023
@linear
Copy link

linear bot commented Aug 28, 2023

@victorges victorges marked this pull request as ready for review August 28, 2023 19:59
@victorges victorges force-pushed the vg/fix/total-supply-invariant branch from 38e7a9e to b970652 Compare August 28, 2023 20:04
@victorges victorges force-pushed the vg/fix/total-supply-invariant branch 2 times, most recently from 42b1a70 to f6cfad1 Compare September 20, 2023 20:36
@victorges victorges changed the title bonding: Only provide voting power for active stake [delta-audit] bonding: Only provide voting power for active stake Sep 20, 2023
@victorges victorges changed the title [delta-audit] bonding: Only provide voting power for active stake bonding: Only provide voting power for active stake Sep 20, 2023
@victorges victorges changed the title bonding: Only provide voting power for active stake [delta-audit] bonding: Only provide voting power for active stake Sep 21, 2023
@victorges
Copy link
Member Author

we're going with #625 for now. this can be reopen in the future as a separate improvement

@victorges victorges closed this Sep 25, 2023
@victorges victorges deleted the vg/fix/total-supply-invariant branch September 25, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant