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(vmtrace): return value pushed by smod #4806

Merged
merged 1 commit into from
Jul 24, 2022

Conversation

banteg
Copy link
Contributor

@banteg banteg commented Jul 24, 2022

i was doing a pairwise comparison with geth trace and found a discrepancy in vmtrace. consider this request

trace_replayTransaction
['0x53546f6ac3d342842acfeeedeca5d66d7fda92acaa5bbc91ef94fd52b6f45a94', ['vmTrace']]

the stack divergest after this operation:

{
    "cost": 5,
    "ex": {
      "mem": null,
      "push": [],
      "store": null,
      "used": 298747
    },
    "pc": 17605,
    "sub": null,
    "op": "SMOD",
    "idx": "161-525-1253-663"
}

SMOD consumes two items from the stack and puts back one, but here it doesn't return what to push.

here is the same operation after the patch applied:

{
    "cost": 5,
    "ex": {
      "mem": null,
      "push": [
        "0x48"
      ],
      "store": null,
      "used": 298747
    },
    "pc": 17605,
    "sub": null,
    "op": "SMOD",
    "idx": "161-525-1253-663"
}

@AskAlexSharov AskAlexSharov merged commit 4c0ab19 into erigontech:devel Jul 24, 2022
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.

2 participants