Fix adding pending voter share on V11 calculations#989
Merged
Conversation
jshufro
reviewed
Jan 21, 2026
| 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) |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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
reviewed
Jan 21, 2026
Contributor
jshufro
left a comment
There was a problem hiding this comment.
nothing but small comments! you just pushed a commit, though, so hold on while i refresh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Distribution code was considering just the smoothing pool balance being distributed and ignoring the pending voter share from megapools.