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

parity vmTrace stack pushes are incorrect #5561

Closed
1 task done
gbrew opened this issue Nov 24, 2023 · 2 comments · Fixed by #5563
Closed
1 task done

parity vmTrace stack pushes are incorrect #5561

gbrew opened this issue Nov 24, 2023 · 2 comments · Fixed by #5563
Assignees
Labels
C-bug An unexpected or incorrect behavior

Comments

@gbrew
Copy link
Contributor

gbrew commented Nov 24, 2023

Describe the bug

The code which reports the newly pushed stack elements for each executed opcode is broken, and gives some obviously wrong answers, like this, which shows two elements pushed by a PUSH1:

      {
        "cost": 3,
        "ex": {
          "used": 180751,
          "push": [
            "0x20",
            "0x40"
          ],
          "mem": {
            "off": 2688,
            "data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000>
          },
          "store": null
        },
        "pc": 371,
        "sub": null,
        "op": "PUSH1"
      },

Looking at the code, I can see that the issue is in trying to use both stack and push_stack to produce this value. I'll put up a PR soon to fix it.

Steps to reproduce

cast rpc trace_replayTransaction --raw '[ "txhash", ["vmTrace"]]'

You'll get wrong answers for basically any transaction.

Node logs

No response

Platform(s)

Linux (x86)

What version/commit are you on?

af88851

What database version are you on?

1

What type of node are you running?

Archive (default)

What prune config do you use, if any?

None

If you've built Reth from source, provide the full command you used

No response

Code of Conduct

  • I agree to follow the Code of Conduct
@gbrew gbrew added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Nov 24, 2023
@mattsse
Copy link
Collaborator

mattsse commented Nov 24, 2023

thanks for flagging,
I figured that these are still not quite right.
will tackle them next

@gbrew
Copy link
Contributor Author

gbrew commented Nov 24, 2023

No problem, just posted a PR with a fix

github-merge-queue bot pushed a commit that referenced this issue Nov 25, 2023
Co-authored-by: fake <fake@fake>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Nov 25, 2023
@DaniPopes DaniPopes removed the S-needs-triage This issue needs to be labelled label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug An unexpected or incorrect behavior
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants