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

stateOverrides of debug_traceCallMany does not work #4295

Closed
1 task done
ET-Chan opened this issue Aug 21, 2023 · 0 comments · Fixed by #4298
Closed
1 task done

stateOverrides of debug_traceCallMany does not work #4295

ET-Chan opened this issue Aug 21, 2023 · 0 comments · Fixed by #4298
Labels
C-bug An unexpected or incorrect behavior

Comments

@ET-Chan
Copy link

ET-Chan commented Aug 21, 2023

Describe the bug

stateOverride fails to override storage correctly.

Steps to reproduce

  1. Send the following request to debug_traceCallMany endpoint to a RETH alpha.6 node
[{"transactions": [{"from": "0x1b5212AF6b76113afD94cD2B5a78a73B7d7A8222", "to": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "data": "0x70a082310000000000000000000000001b5212af6b76113afd94cd2b5a78a73b7d7a8222"}]}]


{"blockNumber": "latest", "transactionIndex": -1},

{"tracer": "callTracer", "tracerConfig": {"onlyTopCall": false, "withLog": true}, "stateOverrides": {"0x1b5212AF6b76113afD94cD2B5a78a73B7d7A8222": {"balance": "0x39726378b58c400000", "stateDiff": {}}, "0xdAC17F958D2ee523a2206206994597C13D831ec7": {"stateDiff": {"0xede27e4e7f3676edbf125879f17a896d6507958df3d57bda6219f1880cae8a41": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}}}}

The first tx is just asking for balanceOf 0x1b5212AF6b76113afD94cD2B5a78a73B7d7A8222 (this is a random address).

The 1st overwrite ensures the sender address has enough balances to pass gas fee checks.

The 2nd overwrite is overwriting the balances['0x1b5212AF6b76113afD94cD2B5a78a73B7d7A8222'] of 0xdAC17F958D2ee523a2206206994597C13D831ec7 (USDT)

  1. It returns the following:
[{"from": "0x1b5212af6b76113afd94cd2b5a78a73b7d7a8222", "gas": "0x2faf080", "gasUsed": "0x13a7", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "input": "0x70a082310000000000000000000000001b5212af6b76113afd94cd2b5a78a73b7d7a8222", "output": "0x0000000000000000000000000000000000000000000000000000000000000000", "value": "0x0", "type": "CALL"}]
  1. If the exact same code is run against quicknode, the following response will be returned instead:
[[{"from": "0x1b5212af6b76113afd94cd2b5a78a73b7d7a8222", "gas": "0x23c2f248", "gasUsed": "0x675f", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "input": "0x70a082310000000000000000000000001b5212af6b76113afd94cd2b5a78a73b7d7a8222", "output": "0x0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff", "value": "0x0", "type": "CALL"}]]

Node logs

There is no log related to this JSON request.

Platform(s)

Linux (x86)

What version/commit are you on?

reth 0.1.0-alpha.6 (f53fdd5)

What database version are you on?

Current database version: 1

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

RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc

Code of Conduct

  • I agree to follow the Code of Conduct
@ET-Chan ET-Chan added C-bug An unexpected or incorrect behavior S-needs-triage This issue needs to be labelled labels Aug 21, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Aug 21, 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.

2 participants