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

eth_call fails when batch has more than 1 tx for the same acc #1824

Closed
tclemos opened this issue Mar 14, 2023 · 0 comments · Fixed by #1835
Closed

eth_call fails when batch has more than 1 tx for the same acc #1824

tclemos opened this issue Mar 14, 2023 · 0 comments · Fixed by #1835
Assignees

Comments

@tclemos
Copy link
Contributor

tclemos commented Mar 14, 2023

The way the node process unsigned transactions is by getting the l2 block, then identifying the batch related to this block in order to set the state root we must use when processing the transaction. The code always uses the state root of the latest l2 block related to the batch, so depending on the order of the transactions we might have an false ProviderError: nonce intrinsic error

Here is how it works:

Imagine a scenario like this:

batch 1
block 1 acc 1 tx 1 nonce 1
block 2 acc 2 tx 1 nonce 1
block 3 acc 1 tx 2 nonce 2

if I do a call for block 2, the nonce of the acc 1 should be 1... but since we have the block 3 attached to batch 1, we use the state root of block 3 instead of the root of block 2... and this causes the problem

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 a pull request may close this issue.

2 participants