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

Success status and REVERT opcode #16582

Closed
xuhcc opened this issue Apr 27, 2018 · 2 comments · Fixed by #16588
Closed

Success status and REVERT opcode #16582

xuhcc opened this issue Apr 27, 2018 · 2 comments · Fixed by #16588

Comments

@xuhcc
Copy link

xuhcc commented Apr 27, 2018

I have found interesting transaction on Rinkeby chain:

https://rinkeby.etherscan.io/tx/0x9d0f5ae03a1708f85858764d631a89ef373f92f759f4a6b773675ad02a8e6700

The transaction receipt indicates successful execution, while geth trace contains REVERT opcode. How it could be?

System information

Geth version: 1.8.4
OS & Version: Linux

@karalabe
Copy link
Member

Hey there!

Thanks for the report! Apparently the transaction before this one (https://rinkeby.etherscan.io/address/0x3630a567cf8c88e72dd7a8e6fd0824efc49912d5) already self destructed the contract, so your faulty transaction should be a NOOP.

Looking at its gas use, 21272, that's the base transaction fee (21000) + 4 byte of input data (4 * 64 gas), which is again consistent with a NOOP. I.e. this transaction executed correctly, and consumed a correct amount of gas, and reported correctly the success status.

That leaves the question, why does etherscan (any my local node too) report it as REVERTed. We're still looking into it, but our hunch is that the tracer code uses a slightly modified transaction execution pathway and somewhere the code of the contract was not flagged as deleted and still used that during tracing.

@karalabe
Copy link
Member

Yeah, so the error originates from the tracer which used some funky legacy code to dispose of deleted objects, not the consensus code. Swapping it out to the proper consensus function call makes everything run smoothly.

Sorry for the messup, I'll have to ping @mtbitcoin to re-trace after this is merged/released.

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 a pull request may close this issue.

2 participants