Skip to content
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

core, eth: fix tracer dirty finalization #16588

Merged
merged 1 commit into from
Apr 27, 2018

Conversation

karalabe
Copy link
Member

This PR fixes two tracer bugs:

  • The tracer used a weird "optimized" version of dirty object deletion, to avoid having to hash the state trie after each transaction. This was an implementation issue pre-Byzantium where the state object finalization and state trie hashing was a single op. After Byzantium we separated the two, having statedb.Finalise only do the cleanup, but not the expensive hash. The tracer's were never updated to use this new code, and the old legacy optimization/hack probably rotted away as noone was actively testing it. This PR gets rid of that legacy hack and uses the actual consensus code in the tracer too.
  • The second fix is a small tracer bug where if a transaction did a zero value call into a non existent account, our EVM returned early, but did not tell the tracer about it. The outer trace caller then tried to retrieve the results, but the tracer wasn't even inited yet, so it reported errors. The fix is to ensure that our early-break path also tells the tracer it exists.

Fixes #16582.

@karalabe karalabe added this to the 1.8.7 milestone Apr 27, 2018
@karalabe karalabe requested a review from holiman April 27, 2018 11:35
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Success status and REVERT opcode
2 participants