What does this pull request do? Explain your changes. (required)
This fixes a bug observed after deploying the new BondingVotes to production.
It happens when trying to calculate voting power for a delegator whose transcoder hadn't
initialized their cumulativeFeeFactor on the corresponding round.
This causes the voting power calculation to underflow, because we don't initialize the
cumulativeFeeFactor of the endPool like BondingManager does. Even though we
don't really care about fees for voting power, the underflow causes a revert on any
transaction that needs to access the delegator votes at the uninitialized round.
Specific updates (required)
Break delegatorCumulativeStakeAndFees logic in 2, to allow calculating only stake or only fees
Call the stake-only version from BondingVotes
PENDING: a couple tests
How did you test each of these updates (required)yarn test that it didnt change any existing behavior on BondingManager
New tests on BondingVotes
May do a tenderly fork test before actual deploy
What does this pull request do? Explain your changes. (required) This fixes a bug observed after deploying the new BondingVotes to production.
It happens when trying to calculate voting power for a delegator whose transcoder hadn't initialized their
cumulativeFeeFactor
on the corresponding round.This causes the voting power calculation to underflow, because we don't initialize the
cumulativeFeeFactor
of theendPool
likeBondingManager
does. Even though we don't really care about fees for voting power, the underflow causes a revert on any transaction that needs to access the delegator votes at the uninitialized round.Specific updates (required)
delegatorCumulativeStakeAndFees
logic in 2, to allow calculating only stake or only feesHow did you test each of these updates (required)
yarn test
that it didnt change any existing behavior on BondingManager New tests on BondingVotes May do a tenderly fork test before actual deployDoes this pull request close any open issues? N/A
Checklist:
yarn test
pass