Skip to content

Commit d1976c5

Browse files
committed
Merge remote-tracking branch 'upstream/sigp-audit-fixes' into remove-builder-api-trait
2 parents 2d842f5 + a9a5c11 commit d1976c5

3 files changed

Lines changed: 29 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
### v0.9.4-rc1
2+
- Unifies the `pbs`, `signer`, and `cli` binaries into one: `commit-boost`. This change changes the CLI, notably the `init` command is now invoked as `commit-boost init --config <config_name>`.
3+
- Includes new quality of life testing improvements in the Justfile: unit test coverage tooling, local Kurtosis testnet, and microbenchmark diffing.
4+
- Robustifies the release process to ensure no compromised maintainer can unilaterally cut a release. Additionally all binaries are now signed during CI and can easily be verified before use.

crates/pbs/src/routes/get_header/mod.rs

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ mod validation;
33

44
use std::{collections::HashSet, sync::Arc};
55

6-
use alloy::primitives::U256;
6+
use alloy::primitives::{U256, utils::format_ether};
77
use axum::{
88
extract::{Path, State},
99
http::{HeaderMap, HeaderValue},
@@ -65,7 +65,7 @@ pub async fn handle_get_header(
6565
CompoundGetHeaderResponse::Light(light_bid) => {
6666
// Light validation mode, so just forward the raw response
6767
info!(
68-
value_eth = alloy::primitives::utils::format_ether(light_bid.value),
68+
value_eth = format_ether(light_bid.value),
6969
"received header (unvalidated)"
7070
);
7171

@@ -94,7 +94,7 @@ pub async fn handle_get_header(
9494
}
9595
CompoundGetHeaderResponse::Full(max_bid) => {
9696
// Full validation mode, so respond based on requester accept types
97-
info!(value_eth = alloy::primitives::utils::format_ether(*max_bid.data.message.value()), block_hash =% max_bid.block_hash(), "received header");
97+
info!(value_eth = format_ether(*max_bid.data.message.value()), block_hash =% max_bid.block_hash(), "received header");
9898

9999
// Handle SSZ
100100
if accepts_ssz {
@@ -288,18 +288,34 @@ pub async fn get_header(
288288
let value_gwei = (value / U256::from(1_000_000_000)).try_into().unwrap_or_default();
289289
RELAY_HEADER_VALUE.with_label_values(&[relay_id]).set(value_gwei);
290290

291-
relay_bids.push(res)
291+
relay_bids.push((relay_id, res))
292292
}
293293
Ok(_) => {}
294294
Err(err) if err.is_timeout() => error!(err = "Timed Out", relay_id),
295295
Err(err) => error!(%err, relay_id),
296296
}
297297
}
298298

299-
let max_bid = relay_bids.into_iter().max_by_key(|bid| match bid {
299+
let max_bid = relay_bids.into_iter().max_by_key(|(_, bid)| match bid {
300300
CompoundGetHeaderResponse::Full(full) => *full.value(),
301301
CompoundGetHeaderResponse::Light(light) => light.value,
302302
});
303303

304-
Ok(max_bid)
304+
if let Some((winning_relay_id, ref bid)) = max_bid {
305+
match bid {
306+
CompoundGetHeaderResponse::Full(full) => info!(
307+
relay_id = winning_relay_id,
308+
value_eth = format_ether(*full.value()),
309+
block_hash = %full.block_hash(),
310+
"auction winner"
311+
),
312+
CompoundGetHeaderResponse::Light(light) => info!(
313+
relay_id = winning_relay_id,
314+
value_eth = format_ether(light.value),
315+
"auction winner (unvalidated)"
316+
),
317+
}
318+
}
319+
320+
Ok(max_bid.map(|(_, bid)| bid))
305321
}

crates/pbs/src/routes/get_header/relay.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use cb_common::{
2222
use parking_lot::RwLock;
2323
use reqwest::{StatusCode, header::CONTENT_TYPE};
2424
use tokio::time::sleep;
25-
use tracing::{Instrument, debug, error, warn};
25+
use tracing::{Instrument, debug, error, info, warn};
2626
use url::Url;
2727

2828
use super::{
@@ -369,7 +369,7 @@ async fn send_get_header_full(
369369
};
370370

371371
// Log and return
372-
debug!(
372+
info!(
373373
relay_id = info.relay_id.as_ref(),
374374
header_size_bytes = info.response_bytes.len(),
375375
latency = ?info.request_latency,
@@ -416,7 +416,7 @@ async fn send_get_header_light(
416416
};
417417

418418
// Log and return
419-
debug!(
419+
info!(
420420
relay_id = info.relay_id.as_ref(),
421421
header_size_bytes = info.response_bytes.len(),
422422
latency = ?info.request_latency,

0 commit comments

Comments
 (0)