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
1,193 changes: 765 additions & 428 deletions Cargo.lock

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version = "0.8.1-rc.2"

[workspace.dependencies]
aes = "0.8"
alloy = { version = "0.12", features = [
alloy = { version = "^1.0.35", features = [
"full",
"getrandom",
"providers",
Expand All @@ -18,12 +18,14 @@ alloy = { version = "0.12", features = [
"signer-local",
"ssz",
] }
alloy-primitives = "^1.3.1"
async-trait = "0.1.80"
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"] }
blsful = "2.5"
blst = "^0.3.15"
blsful = "^2.5"
bytes = "1.10.1"
cb-cli = { path = "crates/cli" }
cb-common = { path = "crates/common" }
Expand All @@ -38,16 +40,16 @@ derive_more = { version = "2.0.1", features = ["deref", "display", "from", "into
docker-compose-types = "0.16.0"
docker-image = "0.2.1"
ethereum_serde_utils = "0.7.0"
ethereum_ssz = "0.8"
ethereum_ssz_derive = "0.8"
ethereum_ssz = "0.9"
ethereum_ssz_derive = "0.9"
eyre = "0.6.12"
futures = "0.3.30"
headers = "0.4.0"
indexmap = "2.2.6"
jsonwebtoken = { version = "9.3.1", default-features = false }
lazy_static = "1.5.0"
lh_eth2_keystore = { package = "eth2_keystore", git = "https://github.com/sigp/lighthouse", tag = "v7.1.0" }
lh_types = { package = "types", git = "https://github.com/sigp/lighthouse", tag = "v7.1.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"
pbkdf2 = "0.12.2"
prometheus = "0.14.0"
Expand All @@ -59,7 +61,8 @@ serde = { version = "1.0.202", features = ["derive"] }
serde_json = "1.0.117"
serde_yaml = "0.9.33"
sha2 = "0.10.8"
ssz_types = "0.10"
ssz_types = "0.11"
subtle = "2.5"
tempfile = "3.20.0"
thiserror = "2.0.12"
tokio = { version = "1.37.0", features = ["full"] }
Expand All @@ -70,9 +73,13 @@ tower-http = { version = "0.6", features = ["trace"] }
tracing = "0.1.40"
tracing-appender = "0.2.3"
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
tree_hash = "0.9"
tracing-test = { version = "0.2.5", features = ["no-env-filter"] }
tree_hash = "^0.10"
tree_hash_derive = "0.9"
typenum = "1.17.0"
unicode-normalization = "0.1.24"
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" }
9 changes: 4 additions & 5 deletions crates/common/src/config/mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,12 @@ async fn fetch_lido_registry_keys(
let http = Http::with_client(client, rpc_url);
let is_local = http.guess_local();
let rpc_client = RpcClient::new(http, is_local);
let provider = ProviderBuilder::new().on_client(rpc_client);
let provider = ProviderBuilder::new().connect_client(rpc_client);

let registry_address = lido_registry_address(chain)?;
let registry = LidoRegistry::new(registry_address, provider);

let total_keys =
registry.getTotalSigningKeyCount(node_operator_id).call().await?._0.try_into()?;
let total_keys = registry.getTotalSigningKeyCount(node_operator_id).call().await?.try_into()?;

if total_keys == 0 {
return Ok(Vec::new());
Expand Down Expand Up @@ -449,7 +448,7 @@ mod tests {
#[tokio::test]
async fn test_lido_registry_address() -> eyre::Result<()> {
let url = Url::parse("https://ethereum-rpc.publicnode.com")?;
let provider = ProviderBuilder::new().on_http(url);
let provider = ProviderBuilder::new().connect_http(url);

let registry =
LidoRegistry::new(address!("55032650b14df07b85bF18A3a3eC8E0Af2e028d5"), provider);
Expand All @@ -458,7 +457,7 @@ mod tests {
let node_operator_id = U256::from(1);

let total_keys: u64 =
registry.getTotalSigningKeyCount(node_operator_id).call().await?._0.try_into()?;
registry.getTotalSigningKeyCount(node_operator_id).call().await?.try_into()?;

assert!(total_keys > LIMIT as u64);

Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/config/pbs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl PbsConfig {
if let Some(rpc_url) = &self.rpc_url {
// TODO: remove this once we support chain ids for custom chains
if !matches!(chain, Chain::Custom { .. }) {
let provider = ProviderBuilder::new().on_http(rpc_url.clone());
let provider = ProviderBuilder::new().connect_http(rpc_url.clone());
let chain_id = provider.get_chain_id().await?;
ensure!(
chain_id == chain.id(),
Expand Down
12 changes: 6 additions & 6 deletions crates/common/src/signer/schemes/ecdsa.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{ops::Deref, str::FromStr};

use alloy::{
primitives::{Address, B256, PrimitiveSignature},
primitives::{Address, B256, Signature},
signers::{SignerSync, local::PrivateKeySigner},
};
use eyre::ensure;
Expand All @@ -14,7 +14,7 @@ use crate::{
};

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct EcdsaSignature(PrimitiveSignature);
pub struct EcdsaSignature(Signature);

impl std::fmt::Display for EcdsaSignature {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
Expand All @@ -37,18 +37,18 @@ impl<'de> serde::Deserialize<'de> for EcdsaSignature {
D: serde::Deserializer<'de>,
{
let s = String::deserialize(deserializer)?;
Ok(Self(PrimitiveSignature::from_str(&s).map_err(serde::de::Error::custom)?))
Ok(Self(Signature::from_str(&s).map_err(serde::de::Error::custom)?))
}
}

impl From<PrimitiveSignature> for EcdsaSignature {
fn from(signature: PrimitiveSignature) -> Self {
impl From<Signature> for EcdsaSignature {
fn from(signature: Signature) -> Self {
Self(signature)
}
}

impl Deref for EcdsaSignature {
type Target = PrimitiveSignature;
type Target = Signature;

fn deref(&self) -> &Self::Target {
&self.0
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/signer/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ mod test {
.join(consensus_signer.pubkey().to_string())
.join("TEST_MODULE")
.join("bls")
.join(format!("{}.sig", proxy_signer.pubkey().to_string()))
.join(format!("{}.sig", proxy_signer.pubkey()))
)
.unwrap()
)
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ pub trait TestRandomSeed: TestRandom {
where
Self: Sized,
{
let mut rng = XorShiftRng::from_entropy();
let mut rng = XorShiftRng::from_os_rng();
Self::random_for_test(&mut rng)
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/pbs/src/mev_boost/get_header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async fn fetch_parent_block(
parent_hash: B256,
parent_block: Arc<RwLock<Option<Block>>>,
) {
let provider = alloy::providers::ProviderBuilder::new().on_http(rpc_url).to_owned();
let provider = alloy::providers::ProviderBuilder::new().connect_http(rpc_url).to_owned();

debug!(%parent_hash, "fetching parent block");

Expand Down
11 changes: 5 additions & 6 deletions tests/tests/payloads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@ fn test_missing_registration_field(field_name: &str) -> String {
let mut values: Value = serde_json::from_str(data).unwrap();

// Remove specified field from the first validator's message
if let Value::Array(arr) = &mut values {
if let Some(first_validator) = arr.get_mut(0) {
if let Some(Value::Object(msg_obj)) = first_validator.get_mut("message") {
msg_obj.remove(field_name);
}
}
if let Value::Array(arr) = &mut values &&
let Some(first_validator) = arr.get_mut(0) &&
let Some(Value::Object(msg_obj)) = first_validator.get_mut("message")
{
msg_obj.remove(field_name);
}

// This should fail since the field is required
Expand Down
Loading