-
Notifications
You must be signed in to change notification settings - Fork 169
Report mev blocker to blocks processor, allow filtering signers for refunds #746
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
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds MEV blocker integration and configurable signer filtering for redistribution processing. The changes enable reporting MEV blocker payments to the blocks processor while allowing certain signers to be ignored during backtest operations.
- Added MEV blocker price tracking to built block traces and blocks processor reporting
- Added configurable ignored signers list for filtering during backtest redistribution calculations
- Modified signer filtering to optionally use refund identity instead of transaction signer
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
crates/rbuilder/src/building/built_block_trace.rs | Added mev_blocker_price field to track MEV blocker payments |
crates/rbuilder/src/building/builders/block_building_helper.rs | Set mev_blocker_price from building context |
crates/rbuilder/src/backtest/redistribute/mod.rs | Added ignored_signers parameter and enhanced logging |
crates/rbuilder/src/backtest/mod.rs | Enhanced filter_out_ignored_signers to optionally use refund identity |
crates/rbuilder/src/backtest/backtest_build_range.rs | Updated call to use new filter signature |
crates/rbuilder-operator/src/flashbots_config.rs | Added backtest_ignored_signers configuration field |
crates/rbuilder-operator/src/blocks_processor.rs | Changed source field from Uuid to String, added MEV blocker reporting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
pub coinbase_reward: U256, | ||
/// True block value (coinbase balance delta) excluding the cost of the payout to validator | ||
pub true_bid_value: U256, | ||
/// Amount that is left out on the coinbase to pay for mev blocker oderflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'oderflow' to 'overflow'.
/// Amount that is left out on the coinbase to pay for mev blocker oderflow | |
/// Amount that is left out on the coinbase to pay for mev blocker overflow |
Copilot uses AI. Check for mistakes.
bid_value: U256::from(0), | ||
coinbase_reward: U256::from(0), | ||
true_bid_value: U256::from(0), | ||
mev_blocker_price: U256::from(0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation using tabs instead of spaces. Should match the surrounding code formatting which uses spaces.
mev_blocker_price: U256::from(0), | |
mev_blocker_price: U256::from(0), |
Copilot uses AI. Check for mistakes.
|
||
self.built_block_trace.bid_value = max(bid_value, fee_recipient_balance_diff); | ||
self.built_block_trace.true_bid_value = true_value; | ||
self.built_block_trace.mev_blocker_price = self.building_context().mev_blocker_price; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation using tabs instead of spaces. Should match the surrounding code formatting which uses spaces.
self.built_block_trace.mev_blocker_price = self.building_context().mev_blocker_price; | |
self.built_block_trace.mev_blocker_price = self.building_context().mev_blocker_price; |
Copilot uses AI. Check for mistakes.
?protect_signers, | ||
?ignored_signers, | ||
blocklist_len = blocklist.len(), | ||
distribute_to_mempool_txs, | ||
"Started to calculate redistribution" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation using tabs instead of spaces. Should match the surrounding code formatting which uses spaces.
?protect_signers, | |
?ignored_signers, | |
blocklist_len = blocklist.len(), | |
distribute_to_mempool_txs, | |
"Started to calculate redistribution" | |
?protect_signers, | |
?ignored_signers, | |
blocklist_len = blocklist.len(), | |
distribute_to_mempool_txs, | |
"Started to calculate redistribution" |
Copilot uses AI. Check for mistakes.
let signer = if use_refund_identity { | ||
order.metadata().refund_identity.or_else(|| order.signer()) | ||
} else { | ||
order.signer() | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation using tabs instead of spaces. Should match the surrounding code formatting which uses spaces.
let signer = if use_refund_identity { | |
order.metadata().refund_identity.or_else(|| order.signer()) | |
} else { | |
order.signer() | |
}; | |
let signer = if use_refund_identity { | |
order.metadata().refund_identity.or_else(|| order.signer()) | |
} else { | |
order.signer() | |
}; |
Copilot uses AI. Check for mistakes.
π Summary
backets_ignored_signers
to config and redistributionπ‘ Motivation and Context
β I have completed the following steps:
make lint
make test