Skip to content

Conversation

@sjb933
Copy link
Contributor

@sjb933 sjb933 commented May 23, 2025

Found a bug in the supply tracer, it's missing a fallthrough for the tracing.BalanceIncreaseRewardMineUncle case.

I added unit tests and fixed the issue 👍

@sjb933 sjb933 requested a review from s1na as a code owner May 23, 2025 00:39
@fjl fjl assigned s1na May 27, 2025
s1na
s1na previously approved these changes Jun 16, 2025
Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@s1na
Copy link
Contributor

s1na commented Jun 16, 2025

Test failling on windows:

--- FAIL: TestGenesis (1.33s)
    testing.go:1267: TempDir RemoveAll cleanup: remove C:\Users\appveyor\AppData\Local\Temp\1\TestGenesis2333980851\001\supply.jsonl: The process cannot access the file because it is being

@s1na
Copy link
Contributor

s1na commented Jun 16, 2025

Also now that you will make changes please rename the tests so they reflect being related to the supply tracer.

A side note: the existing test suite is in eth/tracers/internal/tracetest/supply_test.go

@lightclient lightclient self-assigned this Jul 14, 2025
@sjb933
Copy link
Contributor Author

sjb933 commented Aug 7, 2025

@s1na please check the update. I removed my added test file and improved the existing tests.

@sjb933
Copy link
Contributor Author

sjb933 commented Aug 24, 2025

Bump.

@s1na please see the last update. It'd be good to merge since this is a fairly obvious bug and the supply-tracer currently undercounts the total supply when running from genesis.

Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@s1na s1na changed the title Fix supply tracer uncle accounting eth/tracers: fix supply tracer uncle accounting Aug 25, 2025
@s1na s1na added this to the 1.16.3 milestone Aug 26, 2025
@s1na s1na merged commit f877183 into ethereum:master Aug 26, 2025
5 of 6 checks passed
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
Uncle rewards were being omitted in the supply tracer due
to a bug. This PR fixes that.

---------

Co-authored-by: Sina Mahmoodi <[email protected]>
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.

3 participants