-
Notifications
You must be signed in to change notification settings - Fork 169
Streamline bidding interface #704
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
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 streamlines the bidding interface by consolidating unfinished blocks processing and bidding service logic into a single module unfinished_block_processing.rs
. The main goal is to simplify the block sealing and bidding flow by moving logic from rbuilder-operator into this repository and eliminating abstract interfaces in favor of concrete implementations.
- Removed complex trait-based interfaces and replaced them with direct implementations
- Consolidated block processing logic into
unfinished_block_processing.rs
- Renamed
BlockBid
toScrapedRelayBlockBid
throughout the codebase for clarity
Reviewed Changes
Copilot reviewed 36 out of 38 changed files in this pull request and generated 8 comments.
Show a summary per file
File | Description |
---|---|
crates/rbuilder/src/telemetry/metrics/mod.rs |
Updated function parameter type from BlockBid to ScrapedRelayBlockBid |
crates/rbuilder/src/live_builder/wallet_balance_watcher.rs |
Updated import path for LandedBlockInfo |
crates/rbuilder/src/live_builder/payload_events/mod.rs |
Removed SlotSource trait and made recv_slot_channel a regular method |
crates/rbuilder/src/live_builder/mod.rs |
Removed generic SlotSource type parameter and updated factory types |
crates/rbuilder/src/live_builder/config.rs |
Simplified bidding service creation by removing factory pattern |
crates/rbuilder/src/live_builder/building/mod.rs |
Updated to use new UnfinishedBuiltBlocksInputFactory |
crates/rbuilder/src/live_builder/building/built_block_cache.rs |
Removed BuiltBlockCacheUpdater wrapper class |
crates/rbuilder/src/live_builder/block_output/unfinished_block_processing.rs |
New module containing consolidated block processing logic |
crates/rbuilder/src/live_builder/block_output/true_value_bidding_service.rs |
New concrete bidding service implementation |
crates/rbuilder/src/live_builder/block_output/bidding_service_interface.rs |
New interfaces replacing old bidding modules |
crates/rbuilder/src/building/builders/mod.rs |
Removed abstract sink factory traits |
crates/bid-scraper/src/types/bid.rs |
Renamed BlockBid struct to ScrapedRelayBlockBid |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
crates/rbuilder/src/live_builder/block_output/unfinished_block_processing.rs
Outdated
Show resolved
Hide resolved
crates/rbuilder/src/live_builder/block_output/unfinished_block_processing.rs
Outdated
Show resolved
Hide resolved
crates/rbuilder/src/live_builder/block_output/unfinished_block_processing.rs
Outdated
Show resolved
Hide resolved
crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs
Outdated
Show resolved
Hide resolved
crates/rbuilder/src/building/builders/parallel_builder/block_building_result_assembler.rs
Outdated
Show resolved
Hide resolved
5994eb8
to
ca3ee4d
Compare
@ZanCorDX I'll address your comments in the next PR that I create this week. I'll merge the change for now. |
📝 Summary
This PR replaces interfaces related to unfinished blocks processing and bidding service with more concrete implementations.
All logic is consolidated in one module unfinished_block_processing.
As a result logic for sealing blocks and interactive with bidding service is simplified and becomes easier to track. For example, it moves logic for handling unfinished blocks from rbuilder-operator to this repo otherwise to track path of the block you would need to jump through traits that are implemented in two different repos (while we had only one real useful implementation of the flow).
This PR removes 600 loc from this project and around 500 from rbuilder-operator without change of functionality. It also fixed one small but subtle issue with block sealing that probably caused us to seal blocks that are stale.
This is requirement for making a PR for faster bidding / sealing. This PR does not change any functionality is a significant way.
💡 Motivation and Context
Simplify flow of blocks to improve them in the next PR.
TODO
✅ I have completed the following steps:
make lint
make test