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

trace_callMany doesn't allow to trace dependent transactions #4165

Closed
fleupold opened this issue Jun 16, 2022 · 0 comments · Fixed by #4436
Closed

trace_callMany doesn't allow to trace dependent transactions #4165

fleupold opened this issue Jun 16, 2022 · 0 comments · Fixed by #4436

Comments

@fleupold
Copy link

Describe the bug
While not being a standard ETH RPC method, trace_callMany was first introduced by the OE in order to allow simulating dependent transactions (cf. docs). It has since been implemented by other clients such as Erigon (erigontech/erigon#1486) and also Nethermind (in #3571).

However, Nethermind's implementation differs from the other clients in that it doesn't apply state changes in between calls, thus if call1 updates state (e.g. via a transfer), call2 doesn't have access to the updated state (e.g. the new balance).

This makes it hard for us to use Nethermind as a drop in replacement for other nodes, as our offchain infrastructure uses trace_callMany to simulate dependent calls.

To Reproduce
E.g. the following trace_callMany (send tokens from acc1 to acc2, then sending tokens from acc2 back to acc1) fails in the second transaction:

curl <your URL here>  \
  -X POST \
  -H "Content-Type: application/json" \
  -d "{\"jsonrpc\":\"2.0\",\"method\":\"trace_callMany\",\"params{\"data\":\"0xa9059cbb000000000000000000000000000000000000000000000000000000000000def100000000000000000000000000000000000000000000000000000000000003e8\",\"from\":\"0xca771eda0c70aa7d053ab1b25004559b918fe662\",\"to\":\"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab\"},[\"trace\"]],[{\"data\":\"0xa9059cbb000000000000000000000000ca771eda0c70aa7d053ab1b25004559b918fe66200000000000000000000000000000000000000000000000000000000000003e8\",\"from\":\"0x000000000000000000000000000000000000def1\",\"to\":\"0xdef1ca1fb7fbcdc777520aa7f396b4e015f497ab\"},[\"trace\"]]],\"latest\"],\"id\":1}"

Expected behavior
It should not revert (expect same positive result as on Erigon/OE nodes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant