Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
914 changes: 827 additions & 87 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ axum = { version = "0.8.1", features = ["macros"] }
axum-extra = { version = "0.10.0", features = ["typed-header"] }
base64 = "0.22.1"
bimap = { version = "0.6.3", features = ["serde"] }
blst = "^0.3.15"
blsful = "^2.5"
blst = "^0.3.15"
bytes = "1.10.1"
cb-cli = { path = "crates/cli" }
cb-common = { path = "crates/common" }
Expand All @@ -48,6 +48,7 @@ headers = "0.4.0"
indexmap = "2.2.6"
jsonwebtoken = { version = "9.3.1", default-features = false }
lazy_static = "1.5.0"
lh_eth2 = { package = "eth2", git = "https://github.com/sigp/lighthouse", tag = "v8.0.0-rc.0" }
lh_eth2_keystore = { package = "eth2_keystore", git = "https://github.com/sigp/lighthouse", tag = "v8.0.0-rc.0" }
lh_types = { package = "types", git = "https://github.com/sigp/lighthouse", tag = "v8.0.0-rc.0" }
parking_lot = "0.12.3"
Expand Down Expand Up @@ -82,4 +83,4 @@ url = { version = "2.5.0", features = ["serde"] }
uuid = { version = "1.8.0", features = ["fast-rng", "serde", "v4"] }

[patch.crates-io]
blstrs_plus = { git = "https://github.com/Commit-Boost/blstrs" }
blstrs_plus = { git = "https://github.com/Commit-Boost/blstrs" }
1 change: 1 addition & 0 deletions crates/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ethereum_ssz_derive.workspace = true
eyre.workspace = true
futures.workspace = true
jsonwebtoken.workspace = true
lh_eth2.workspace = true
lh_eth2_keystore.workspace = true
lh_types.workspace = true
pbkdf2.workspace = true
Expand Down
23 changes: 19 additions & 4 deletions crates/common/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,33 @@ impl CommitBoostConfig {
let chain = match helper_config.chain {
ChainLoader::Path { path, genesis_time_secs } => {
// check if the file path is overridden by env var
let (slot_time_secs, genesis_fork_version) =
let (slot_time_secs, genesis_fork_version, fulu_fork_slot) =
if let Some(path) = load_optional_env_var(CHAIN_SPEC_ENV) {
load_chain_from_file(path.parse()?)?
} else {
load_chain_from_file(path)?
};
Chain::Custom { genesis_time_secs, slot_time_secs, genesis_fork_version }
Chain::Custom {
genesis_time_secs,
slot_time_secs,
genesis_fork_version,
fulu_fork_slot,
}
}
ChainLoader::Known(known) => Chain::from(known),
ChainLoader::Custom { genesis_time_secs, slot_time_secs, genesis_fork_version } => {
ChainLoader::Custom {
genesis_time_secs,
slot_time_secs,
genesis_fork_version,
fulu_fork_slot,
} => {
let genesis_fork_version: ForkVersion = genesis_fork_version.as_ref().try_into()?;
Chain::Custom { genesis_time_secs, slot_time_secs, genesis_fork_version }
Chain::Custom {
genesis_time_secs,
slot_time_secs,
genesis_fork_version,
fulu_fork_slot,
}
}
};

Expand Down
1 change: 1 addition & 0 deletions crates/common/src/pbs/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub const HEADER_VERSION_KEY: &str = "X-CommitBoost-Version";
pub const HEADER_VERSION_VALUE: &str = COMMIT_BOOST_VERSION;
pub const HEADER_START_TIME_UNIX_MS: &str = "Date-Milliseconds";
pub const HEADER_TIMEOUT_MS: &str = "X-Timeout-Ms";
pub const HEADER_CONSENSUS_VERSION: &str = "Eth-Consensus-Version";

pub const DEFAULT_PBS_JWT_KEY: &str = "DEFAULT_PBS";

Expand Down
7 changes: 5 additions & 2 deletions crates/common/src/pbs/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use alloy::primitives::{B256, U256};
use thiserror::Error;

use crate::{types::BlsPublicKey, utils::ResponseReadError};
use crate::{types::BlsPublicKeyBytes, utils::ResponseReadError};

#[derive(Debug, Error)]
pub enum PbsError {
Expand Down Expand Up @@ -55,7 +55,7 @@ pub enum ValidationError {
EmptyBlockhash,

#[error("pubkey mismatch: expected {expected} got {got}")]
PubkeyMismatch { expected: Box<BlsPublicKey>, got: Box<BlsPublicKey> },
PubkeyMismatch { expected: BlsPublicKeyBytes, got: BlsPublicKeyBytes },

#[error("parent hash mismatch: expected {expected} got {got}")]
ParentHashMismatch { expected: B256, got: B256 },
Expand Down Expand Up @@ -96,4 +96,7 @@ pub enum ValidationError {

#[error("payload mismatch: request: {request} response: {response}")]
PayloadVersionMismatch { request: &'static str, response: &'static str },

#[error("unsupported fork")]
UnsupportedFork,
}
186 changes: 0 additions & 186 deletions crates/common/src/pbs/types/beacon_block.rs

This file was deleted.

Loading
Loading