Skip to content

Conversation

dvush
Copy link
Contributor

@dvush dvush commented Sep 8, 2025

📝 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

  • change block flow docs

✅ I have completed the following steps:

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

@Copilot Copilot AI review requested due to automatic review settings September 8, 2025 18:36
@dvush dvush requested a review from ZanCorDX as a code owner September 8, 2025 18:36
Copy link
Contributor

@Copilot Copilot AI left a 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 to ScrapedRelayBlockBid 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.

@dvush dvush force-pushed the streamline_bidding_interface branch from 5994eb8 to ca3ee4d Compare September 9, 2025 10:13
@dvush
Copy link
Contributor Author

dvush commented Sep 11, 2025

@ZanCorDX I'll address your comments in the next PR that I create this week. I'll merge the change for now.

@dvush dvush merged commit ae641a0 into develop Sep 11, 2025
2 of 3 checks passed
@dvush dvush deleted the streamline_bidding_interface branch September 11, 2025 11:30
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