Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
gzliudan
requested review from
AnilChinchawale,
anunay-xin,
benjamin202410 and
liam-lai
October 27, 2026 00:40
anunay-xin
approved these changes
Oct 27, 2026
The supply tracer's OnBalanceChange put BalanceIncreaseRewardMineUncle in its own empty case body. Go's switch does not fall through, so uncle rewards were silently dropped from issuance.reward. Merge the two reward reasons into one case, as upstream go-ethereum ethereum#31882 does. Production XDPoS chains never emit uncle rewards (VerifyUncles rejects them), so this only affects ethash-based test and dev chains. Tests: eth/tracers/live covers block reward, uncle reward and their accumulation at the hook boundary; removing the merged case makes the uncle cases fail. Ref: ethereum#31882
gzliudan
force-pushed
the
fix-supply-tracer-uncle-accounting
branch
from
October 28, 2026 08:26
696cd15 to
50654f9
Compare
wanwiset25
approved these changes
Oct 29, 2026
This branch has not been deployed
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.
Summary
The supply live tracer (
--vmtrace supply) dropped uncle rewards fromissuance.reward.OnBalanceChangeputBalanceIncreaseRewardMineUnclein its own empty case body, and Go'sswitchdoes not fall through, so the block below never ran for uncle rewards:Fix
Merge the two reward reasons into one case, as upstream go-ethereum ethereum#31882 does:
Impact
Production XDPoS chains never emit uncle rewards:
VerifyUnclesrejects any block carrying uncles andFinalizesets an empty uncle hash. The ethash engine is still in the tree and is used byAllEthashProtocolChangesand friends, so ethash-based dev and test chains were the ones under-reportingissuance.reward.Tests
TestSupplyRewardAccountingineth/tracers/livedrivesOnBalanceChangeat the hook boundary:block-reward: a block reward is added toissuance.reward.uncle-reward: an uncle reward is added (fails before the fix).accumulates: block and uncle rewards add up.other-reasons: a non-reward balance change is ignored.Reverting the merged case makes
uncle-rewardandaccumulatesfail.Found while reviewing
This surfaced while reviewing #2833 (the EIP-8246 selfdestruct burn gate), which touches the same function but does not change this line. Kept separate to keep #2833 focused.
Ref: ethereum#31882