Skip to content

Conversation

@cody-wang-cb
Copy link

@cody-wang-cb cody-wang-cb commented Dec 17, 2025

Summary

  • Adds a new base_sendBackrunBundle RPC endpoint and in-memory store to enable backrun transactions to execute immediately after their target transactions during block building.
  • In the block building loop
    • checks the backrun bundles after executing the target transactions
    • sorts bundles in terms of priority fee
    • validates the bundle priority fee >= target priority fee
    • executes bundles in the order of priority fee
  • It also should handle replacement as it replaces bundles from the same sender targeting the same tx
  • Added integration tests for the backrun bundles logic

✅ I have completed the following steps:

  • Run make lint
  • Run make test
  • Added tests (if applicable)

Copy link

@dvush dvush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that this implementation is simple to understand and it solves the problem of mempool replacements in an elegant way.

There are couple of things that I wanted to point out as possible issues.

@cody-wang-cb cody-wang-cb requested a review from dvush December 19, 2025 17:10
continue 'bundle_loop;
}

// Sort backrun txs by priority fee (descending)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not too sure if this is 100% necessary

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