-
Notifications
You must be signed in to change notification settings - Fork 20k
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
eth/tracers: add diffMode to prestateTracer #25422
Merged
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
c97352a
eth/tracers: add a simple diffstate implemention
jsvisa 7acf179
eth/tracers/native: rename diffstateTracer to stateDiffTracer
jsvisa f27afc9
eth/tracers/internal: add stateDiffTracer testcase
jsvisa 9184369
eth/tracers/statediff: change the diff in CaptureTxEnd
jsvisa a95eeaa
eth/tracers/statediff: don't exclude the created contracts
jsvisa 76e04ff
eth/tracers/native: refund the from address with rest gas
jsvisa 810df7f
eth/tracers/native: statediff add miner's state
jsvisa 60b0bf1
eth/tracers/internal: don't repeat yourself
jsvisa aaffa05
eth/tracers/internal: move common func into util.go
jsvisa 2fa7b17
eth/tracers/native: merge statediff into prestate
jsvisa bdcd832
eth/tracers/internal: test prestate
jsvisa 73ad31d
eth/tracers/native: post in prestate as optional
jsvisa 2d95b35
eth/tracer/internal/tracetest: test prestate with collectPost
jsvisa 1592d53
eth/tracers/native: pre/post prestate
jsvisa ce9f84b
eth/tracers/native: prestate calculate the post state pre txend
jsvisa f6401a2
eth/tracers/native: rm notused from/miner balance calculate
jsvisa f6b148d
eth/tracers/native: omitempty prestate
jsvisa 0ed11f2
eth/tracers/native: keep the modified fields
jsvisa 81b6a4d
eth/tracers/tracetest: test with pre && post trace
jsvisa 6cc9770
eth/tracers/tracetest: move collectPost into indepent dir
jsvisa 43d6612
eth/tracers/tracetest: omitempty
jsvisa 90fb1ac
eth/tracers: rm not used t.from
jsvisa 9b0e264
eth/tracers: missing the tx's created contract
jsvisa a39764d
eth/tracers/internal: fix the issue nonce maybe null
jsvisa e18711a
eth/tracers: clear empty slot in prestate
jsvisa 30f509a
eth/traces: remove the not empty contracts in pre
jsvisa 47eaf6c
eth/tracers: add create prestate testcase
jsvisa d4c3be5
eth/tracers: delete the not modified address in pre
jsvisa 0e97016
eth/traces: add suicide,inner_create testcase
jsvisa 48a3f3d
eth/tracers: add create_suicide testcase
jsvisa 6bca612
eth/tracers: fix the issue of pointer compare
jsvisa 37370ee
eth/tracers/native: collectPost -> diffMode
jsvisa c4e26ed
eth/tracers/internal: rename collectPost to diffMode
jsvisa c7a9093
eth/tracers: prestate omitempty
jsvisa 7913c47
eth/tracers: fix the test folder name
jsvisa 388789b
eth/tracers: omitempty of prestate's code,storage
jsvisa d572f7e
eth/tracers: fix the testcase of empty code
jsvisa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
eth/tracers: fix the testcase of empty code
Signed-off-by: Delweng <[email protected]>
- Loading branch information
commit d572f7e63fd3dbed21bb626cdf321b315031e6a0
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
Curious about this 'suicide.json' test -- did any account here do a selfdestruct? If so, it doesn't really show on the post-state?
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.
yes, the contract 0x2861bf89b6c640c79040d357c1e9513693ef5d3f is selfdestructed, and only in the
pre
stage . actually it's this transaction 0x0de8b6a364b7ab3425069cd5f03acaa3a6fc1e560c61ae7cadab0627f87178d0There 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.
What happens with contracts that are not modified during the execution (but still read / accessed )? Are they present in the post-state too, but empty?
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.
In the current implementation, If his balance/storage were modified, then exists in post-state; if only read/accessed, then this account will be in pre or post-state.
But, I think we can add another option to keep them all in pre-post.
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.
Not sure I follow. How does one distinguish between "not in post-state because nothing changed" versus "not in post-state, because it was destructed" ?
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.
I think that's a typo a should read "if only read/accessed, then this account will NOT be in pre or post-state."
I.e. accounts that are only read should be completely left out of the result.