Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if self | ||
| .address_gas_limiter | ||
| .consume_gas(bundle.backrun_tx.signer(), br_gas_used) | ||
| .is_err() | ||
| { | ||
| log_br_txn(TxnExecutionResult::MaxGasUsageExceeded); | ||
| continue; | ||
| } |
There was a problem hiding this comment.
Gas limiter is consumed before checking if the backrun transaction should be included. If the transaction reverts (line 782-789) or exceeds max_gas_per_txn (line 791-796), the gas has already been consumed from the limiter (line 773-780) even though the transaction won't be included in the block.
This is inconsistent with normal transactions, where consume_gas is called after all exclusion checks (see line 561). Move the consume_gas call to after the success check and max_gas_per_txn check to ensure gas is only consumed for transactions that will actually be included.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@dvush Is it fully ready? It's a lot of changes so let's merge these in priority |
|
@julio4 yes, in the current form it is but we would need to tweak it a bit here and there |
lets merge and iteratively tweak it! |
📝 Summary
Adds support for backrun bundles.
eth_sendBackrunBundlerpc (see newrpc.rs)context.rschange)See module level docs in
backrun_bundle/mod.rsfor detailed explanation.Also see docs and definitions for the following structs:
BackrunBundleGlobalPool,BackrunBundlePayloadPool,StoredBackrunBundle,BackrunBundleRPCArgs.💡 Motivation and Context
Backrun bundle is a new type of bundle that allows backrunning mempool transactions. If enabled, after mempool transaction is included builder tries to include the best available backruns for that transactions.
✅ I have completed the following steps:
make lintmake test