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

[txmgr] Avoid incrementing the nonce if tx signing fails #7782

Conversation

mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Oct 21, 2023

Description
#5398 had a bug that incremented the nonce every time craftTx is called, even if it fails. #7250 fixed the issue if gas estimation fails, but not if the sign tx call fails.

This PR moves the sign call into signWithNextNonce, and avoids incrementing the nonce if the sign call fails.

Tests
Added regression test.

Additional context
We saw a batcher halt on Base mainnet because our signer infra was briefly unavailable. This caused the txmgr to submit txs with incremented nonces, which meant the L1 nodes ignored them (i.e. nonce was too high).

@mdehoog mdehoog marked this pull request as ready for review October 22, 2023 18:25
@mdehoog mdehoog requested a review from a team as a code owner October 22, 2023 18:25
op-service/txmgr/txmgr.go Outdated Show resolved Hide resolved
@ajsutton ajsutton added this pull request to the merge queue Oct 23, 2023
Merged via the queue into ethereum-optimism:develop with commit 4dc4d53 Oct 23, 2023
@mdehoog mdehoog deleted the michael/dont-increment-nonce-for-signer-failures branch October 23, 2023 21:48
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.

3 participants