core/state: do not ignore null addr while iterative dump#27320
Merged
holiman merged 4 commits intoMay 23, 2023
Conversation
holiman
reviewed
May 22, 2023
| if addr != (common.Address{}) { | ||
| dumpAccount.Address = &addr | ||
| } | ||
| dumpAccount.Address = &addr |
Contributor
There was a problem hiding this comment.
This isn't good either, because the addr is not a pointer, so the "we don't have it" null-element is the zero-address.
So as it is on master, it will fail by not showing the 0x000..0 -address in the output. Which is wrong.
In this PR, however, it will fail by showing accounts for which we do not have the preimage (address), as if they were 0x00..00.
Contributor
Author
There was a problem hiding this comment.
I understand the fix, but the fix will break t8n: https://github.com/ethereum/go-ethereum/tree/master/cmd/evm:
Contributor
Author
There was a problem hiding this comment.
Fixed to make evmtools happy.
devopsbo3
pushed a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
…ereum#27320)" This reverts commit 8686762.
devopsbo3
added a commit
to HorizenOfficial/go-ethereum
that referenced
this pull request
Nov 10, 2023
…ereum#27320)" This reverts commit 8686762.
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jul 14, 2025
fixes bug which caused the zero-address to be ignored during an iterative state-dump. --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
19 tasks
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Jul 14, 2025
fixes bug which caused the zero-address to be ignored during an iterative state-dump. --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan
pushed a commit
to gzliudan/XDPoSChain
that referenced
this pull request
Aug 28, 2025
fixes bug which caused the zero-address to be ignored during an iterative state-dump. --------- Co-authored-by: Martin Holst Swende <martin@swende.se>
gzliudan
added a commit
to XinFinOrg/XDPoSChain
that referenced
this pull request
Aug 28, 2025
… (#1223) fixes bug which caused the zero-address to be ignored during an iterative state-dump. --------- Co-authored-by: Park Changwan <pcw109550@gmail.com> Co-authored-by: Martin Holst Swende <martin@swende.se>
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.
This PR fixes bug which null address is ignored while doing iterative dump.
Null address is excluded in the
jsonlresult, which makes preimage(null address) not included in the final output.This PR also adds test for testing iterative dump functionality.
Example
Iterative dump without the fix:
You may observe that address value is not included for null address(third line of
jsonloutput).Iterative dump with the fix: