Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ build-deb: build-deb-bid-scraper build-deb-rbuilder-operator build-deb-rbuilder-
.PHONY: lint
lint: ## Run the linters
cargo fmt -- --check
cargo clippy --workspace --features "$(FEATURES)" -- -D warnings
cargo clippy --workspace --features "$(FEATURES)" --all-targets -- -D warnings

.PHONY: test
test: ## Run the tests for rbuilder. At reth 1.8.2 we started getting some memory errors (when creating the tmp dbs) so we had to limit the number of threads.
Expand All @@ -166,7 +166,7 @@ lt: lint test ## Run "lint" and "test"
fmt: ## Format the code
cargo fmt
cargo fix --allow-staged
cargo clippy --features "$(FEATURES)" --fix --allow-staged
cargo clippy --workspace --features "$(FEATURES)" --all-targets --fix --allow-staged

.PHONY: bench
bench: ## Run benchmarks
Expand Down
6 changes: 4 additions & 2 deletions crates/rbuilder/benches/benchmarks/txpool_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ use alloy_rpc_types::TransactionRequest;
use alloy_signer_local::PrivateKeySigner;
use criterion::{criterion_group, Criterion};
use rbuilder::live_builder::order_input::{
txpool_fetcher::subscribe_to_txpool_with_blobs, OrderInputConfig,
mempool_txs_detector::MempoolTxsDetector, txpool_fetcher::subscribe_to_txpool_with_blobs,
OrderInputConfig,
};
use std::time::Duration;
use std::{sync::Arc, time::Duration};
use tokio::sync::mpsc;
use tokio_util::sync::CancellationToken;

Expand All @@ -22,6 +23,7 @@ async fn txpool_receive_util(count: u32) {
subscribe_to_txpool_with_blobs(
OrderInputConfig::default_e2e(),
sender,
Arc::new(MempoolTxsDetector::new()),
CancellationToken::new(),
)
.await
Expand Down
2 changes: 0 additions & 2 deletions crates/rbuilder/src/building/block_orders/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod prioritized_order_store;

#[cfg(test)]
mod order_dumper;
pub mod order_priority;
mod test_data_generator;
use std::sync::Arc;
Expand Down
64 changes: 0 additions & 64 deletions crates/rbuilder/src/building/block_orders/order_dumper.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use alloy_primitives::{utils::format_ether, U256};
use crossbeam_queue::SegQueue;
use itertools::Itertools;
use rbuilder_primitives::SimulatedOrder;
use std::{sync::Arc, time::Instant};
use std::{cmp::Reverse, sync::Arc, time::Instant};
use tracing::trace;

use super::{
Expand Down Expand Up @@ -52,7 +52,7 @@ impl ConflictTaskGenerator {
/// * `new_groups` - A vector of new [ConflictGroup]s to process.
pub fn process_groups(&mut self, new_groups: Vec<ConflictGroup>) {
let mut sorted_groups = new_groups;
sorted_groups.sort_by(|a, b| b.orders.len().cmp(&a.orders.len()));
sorted_groups.sort_by_key(|b| Reverse(b.orders.len()));

let mut processed_groups = HashSet::default();
for new_group in sorted_groups {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl ConflictFinder {
let mut code_writes: Vec<Address> = used_state
.created_contracts
.into_iter()
.chain(used_state.destructed_contracts.into_iter())
.chain(used_state.destructed_contracts)
.collect();
code_writes.sort_unstable();
code_writes.dedup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ impl TestSetup {
current_value,
)
}
#[allow(clippy::result_large_err)]
fn try_commit_order(&mut self) -> eyre::Result<Result<ExecutionResult, ExecutionError>> {
let state_provider: Arc<dyn StateProvider> =
Arc::from(self.test_chain.provider_factory().latest()?);
Expand Down
4 changes: 2 additions & 2 deletions crates/rbuilder/src/live_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ where
mev_blocker_price,
payload
.relay_registrations
.iter()
.filter_map(|(_, r)| r.adjustment_fee_payer)
.values()
.filter_map(|r| r.adjustment_fee_payer)
.collect(),
mempool_detector.clone(),
) {
Expand Down
2 changes: 1 addition & 1 deletion crates/rbuilder/src/utils/receipts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub fn calculate_receipts_data(
}

let mut receipts_with_blooms = Vec::with_capacity(executed_tx_infos.len());
for (info, logs_bloom) in executed_tx_infos.iter().zip(receipts_blooms.into_iter()) {
for (info, logs_bloom) in executed_tx_infos.iter().zip(receipts_blooms) {
receipts_with_blooms.push(ReceiptWithBloom {
receipt: &info.receipt,
logs_bloom,
Expand Down
Loading