optimism icon indicating copy to clipboard operation
optimism copied to clipboard

op-service/txmgr: multiple fixes / improvements

Open roberto-bayardo opened this issue 6 months ago • 1 comments

Description

  • have transactions get resubmitted even if we fail to bump fees to prevent indefinite hanging when a tx gets dropped from the mempool (as experienced by both base-sepolia and op-sepolia on 8/27/2024).

  • do not bump fees in response to errors that do not require fee bumping like nonce-too-low.

  • force a critical error if we get nonce-too-low before successfully publishing a transaction so the nonce state will reset before trying to publish another transaction.

  • force a critical error if the context is cancelled so the send aborts immediately.

  • some control flow refactoring to (hopefully) make the code a bit more understandable.

Tests

fixed existing unit tests that were relying on fee bumping when fees shouldn't have been bumped, and added new test for the immeidate-fail-on-nonce-too-low case.

TODO:

  • add test to ensure tx gets resubmitted even if fees can't be bumped.
  • add test to check that context cancellation causes the send to abort immediately.

Additional context

Metadata

  • Fixes #[Link to Issue]

roberto-bayardo avatar Aug 27 '24 17:08 roberto-bayardo