Skip to content
Merged
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
2 changes: 1 addition & 1 deletion api/signer-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ paths:
scheme: "ecdsa"
responses:
"200":
description: Successs
description: Success
content:
application/json:
schema:
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/config/constants.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
///////////////////////// COMMMON /////////////////////////
///////////////////////// COMMON /////////////////////////

/// Path to the main toml config file
pub const CONFIG_ENV: &str = "CB_CONFIG";
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/signer/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl<'de> Deserialize<'de> for FileKey {
let s = String::deserialize(deserializer)?;
let s = alloy::primitives::hex::decode(s.trim_start_matches("0x"))
.map_err(de::Error::custom)?;
let bytes: [u8; 32] = s.try_into().map_err(|_| de::Error::custom("wrong lenght"))?;
let bytes: [u8; 32] = s.try_into().map_err(|_| de::Error::custom("wrong length"))?;

Ok(FileKey { secret_key: bytes })
}
Expand Down
4 changes: 2 additions & 2 deletions crates/common/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ use crate::{
const MILLIS_PER_SECOND: u64 = 1_000;

pub fn timestamp_of_slot_start_millis(slot: u64, chain: Chain) -> u64 {
let seconds_since_genesis = chain.genesis_time_sec() + slot * chain.slot_time_sec();
seconds_since_genesis * MILLIS_PER_SECOND
let slot_start_seconds = chain.genesis_time_sec() + slot * chain.slot_time_sec();
slot_start_seconds * MILLIS_PER_SECOND
}
pub fn ms_into_slot(slot: u64, chain: Chain) -> u64 {
let slot_start_ms = timestamp_of_slot_start_millis(slot, chain);
Expand Down
2 changes: 1 addition & 1 deletion crates/pbs/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub enum PbsClientError {
impl PbsClientError {
pub fn status_code(&self) -> StatusCode {
match self {
PbsClientError::NoResponse => StatusCode::SERVICE_UNAVAILABLE,
PbsClientError::NoResponse => StatusCode::BAD_GATEWAY,
PbsClientError::NoPayload => StatusCode::BAD_GATEWAY,
}
}
Expand Down
6 changes: 3 additions & 3 deletions crates/pbs/src/mev_boost/get_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ fn validate_header(
return Err(ValidationError::EmptyTxRoot);
}

if value <= minimum_bid_wei {
if value < minimum_bid_wei {
return Err(ValidationError::BidTooLow { min: minimum_bid_wei, got: value });
}

Expand Down Expand Up @@ -370,7 +370,7 @@ mod tests {

let parent_hash = B256::from_slice(&[1; 32]);
let chain = Chain::Holesky;
let min_bid = U256::ZERO;
let min_bid = U256::from(10);

let secret_key = min_pk::SecretKey::from_bytes(&[
0, 136, 227, 100, 165, 57, 106, 129, 181, 15, 235, 189, 200, 120, 70, 99, 251, 144,
Expand Down Expand Up @@ -438,7 +438,7 @@ mod tests {
Err(ValidationError::BidTooLow { min: min_bid, got: U256::ZERO })
);

mock_header.message.value = U256::from(1);
mock_header.message.value = U256::from(11);

mock_header.message.pubkey = pubkey;

Expand Down
2 changes: 1 addition & 1 deletion crates/pbs/src/mev_boost/register_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async fn send_register_validator(
code: code.as_u16(),
};

// error here since we check if any success aboves
// error here since we check if any success above
error!(%err, "failed registration");
return Err(err);
};
Expand Down
2 changes: 1 addition & 1 deletion crates/signer/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub struct SigningService;

#[derive(Clone)]
struct SigningState {
/// Mananger handling different signing methods
/// Manager handling different signing methods
manager: Arc<RwLock<SigningManager>>,
/// Map of JWTs to module ids. This also acts as registry of all modules
/// running
Expand Down