From 25dcdd9cd00ea4d67ff2e7f2f8a7a686dad6052e Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Tue, 3 Oct 2023 15:48:41 -0600 Subject: [PATCH] boost: log which relays serve the best bid --- mev-boost-rs/src/relay_mux.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mev-boost-rs/src/relay_mux.rs b/mev-boost-rs/src/relay_mux.rs index 617e7c57..6c62734a 100644 --- a/mev-boost-rs/src/relay_mux.rs +++ b/mev-boost-rs/src/relay_mux.rs @@ -15,7 +15,7 @@ use mev_rs::{ use parking_lot::Mutex; use rand::prelude::*; use std::{cmp::Ordering, collections::HashMap, ops::Deref, sync::Arc, time::Duration}; -use tracing::warn; +use tracing::{info, warn}; // See note in the `mev-relay-rs::Relay` about this constant. // TODO likely drop this feature... @@ -189,6 +189,13 @@ impl BlindedBlockProvider for RelayMux { } } + let relays_desc = best_relays + .iter() + .map(|relay| format!("{relay}")) + .reduce(|desc, next| format!("{desc}, {next}")) + .expect("at least one relay"); + info!(slot = bid_request.slot, block_hash = %best_block_hash, relays=relays_desc, "acquired best bid"); + { let mut state = self.state.lock(); // assume the next request to open a bid corresponds to the current request