Skip to content

Conversation

@mattac21
Copy link
Contributor

@mattac21 mattac21 commented Dec 12, 2025

Description

Modifies the EVM mempool removal logic when a tx is included in a block to immediately remove it, instead of not removing it and allowing for it to be removed from demoteUnexecutables when it fails a nonce check next block.

This was previously not the behavior, because when removing the tx immediately upon block inclusion via RemoveTx, it would cause all future txs to be dequeued as well. However we have now modified the api of RemoveTx to allow for the caller to override the strict behavior of the pending pool (the option that forces the pending pool to dequeue future txs on removal), so that we can tell the legacypool to not remove future txs in this specific scenario.

To achieve this there would have now been 4 configuration options on RemoveTx, and strict would have had three possible states (nil for default, true to override to true, false to override to false). This felt decently confusing so I did a small refactor to change from passing in true, false, false, to using functional options.

Closes: STACK-1986


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • tackled an existing issue or discussed with a team member
  • left instructions on how to review the changes
  • targeted the main branch

@linear
Copy link

linear bot commented Dec 12, 2025

@mattac21 mattac21 marked this pull request as ready for review December 12, 2025 21:29
@mattac21 mattac21 requested review from Eric-Warehime and swift1337 and removed request for swift1337 December 12, 2025 21:29
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