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

Fix invalid trace_block during self destruct - #2319

Merged
merged 5 commits into from
May 31, 2021

Conversation

matkt
Copy link
Contributor

@matkt matkt commented May 24, 2021

Signed-off-by: Karim TAAM karim.t2am@gmail.com

PR description

Traces could be false by displaying a bad value transferred during a call

→ CALL from=0xe793...635d to=0x0000...992c value=0 ETC
        → CALL from=0x0000...992c to=0xe5c6...52cd value=0.01 ETC
            → SUICIDE from=0xe5c6...52cd to=0x0000...992c value=0 ETC
        → CALL from=0x0000...992c to=0x937e...c343 value=0.01 ETC
            → SUICIDE from=0x937e...c343 to=0x0000...992c value=0 ETC
        → CALL from=0x0000...992c to=0xc1c2...2593 value=0.01 ETC
            → SUICIDE from=0xc1c2...2593 to=0x0000...992c value=0 ETC

This traces are invalid because of an invalid value:

→ CALL from=0x0000...992c to=0xe5c6...52cd value=0.01 ETC
→ CALL from=0x0000...992c to=0x937e...c343 value=0.01 ETC
→ CALL from=0x0000...992c to=0xc1c2...2593 value=0.01 ETC

The PR fixe this issue using the value of the frame and not of the transaction

Tests performed

  • Tested directly with the invalid trace curl --location --request POST 'http://127.0.0.1:8545' --header 'Content-Type: application/json' --data-raw '{"jsonrpc":"2.0","method":"trace_transaction","params":["0xf0248d795b32193b93d40511a3d7364d070a2ce6f45868e2848d1b0fd08dddc6"],"id":415}'

  • Did some selfdetruct tests to be sure there is no regresstion

Changelog

@matkt matkt linked an issue May 28, 2021 that may be closed by this pull request
@matkt matkt marked this pull request as ready for review May 28, 2021 11:30
@matkt matkt enabled auto-merge (squash) May 31, 2021 08:23
@matkt matkt merged commit 30c9aaa into hyperledger:master May 31, 2021
@matkt matkt deleted the feature/wrong-trace-block branch June 24, 2021 12:22
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
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.

SELFDESTRUCT creates wrong traces?
3 participants