-
Notifications
You must be signed in to change notification settings - Fork 153
Fix adding pending voter share on V11 calculations #989
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
Conversation
| r.log.Printlnf("WARNING: Total attestation score = %s, successful attestations = %d... sending the whole smoothing pool balance to the pool stakers.", r.totalAttestationScore.String(), r.successfulAttestations) | ||
| poolStakerEth := big.NewInt(0).Set(r.smoothingPoolBalance) | ||
| poolStakerEth.Sub(poolStakerEth, trueVoterEth) | ||
| poolStakerEth.Sub(poolStakerEth, voterEthFromSmoothingPool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This uses a different calculation to the poolStakerETH calculation further down. Here it doesn't add pending voter share and then remove trueVoterETH. I don't think this is correct in the case where there is 0 megapoolVoteEligibleRpl.
Further down it would mean that voter share goes to rETH if there is no eligible RPL but here the voter share would not get distributed, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a commit after Patches comment that changed trueVoterEth to voterEthFromSmoothingPool.
20315f4 to
e498cb5
Compare
…nd ignoring the megapool pending rewards
e498cb5 to
20e2a2f
Compare
jshufro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nothing but small comments! you just pushed a commit, though, so hold on while i refresh
Distribution code was considering just the smoothing pool balance being distributed and ignoring the pending voter share from megapools.