Skip to content

Commit

Permalink
bls crate (#69)
Browse files Browse the repository at this point in the history
closes #49

---------

Co-authored-by: supernovahs <supernovahs@proton.me>
  • Loading branch information
supernovahs and supernovahs authored Aug 13, 2024
1 parent cc23824 commit 82ab8ae
Show file tree
Hide file tree
Showing 26 changed files with 1,111 additions and 1,511 deletions.
64 changes: 27 additions & 37 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ members = [
"crates/crypto/bn254/",
"crates/utils/",
"crates/crypto/bls/",
"crates/crypto/keystore/",
"crates/eigen-cli/",
"crates/metrics/collectors/economic/",
"crates/metrics/collectors/rpc_calls/",
Expand Down Expand Up @@ -49,6 +48,8 @@ rust.rust_2018_idioms = { level = "deny", priority = -1 }
rustdoc.all = "warn"

[workspace.dependencies]
ark-bn254 = "0.4.0"
ark-ec = "0.4.2"
ark-ff = "0.4.0"
async-trait = "0.1.81"
aws-config = "1.5.4"
Expand All @@ -63,7 +64,6 @@ eigen-client-fireblocks = { path = "crates/chainio/clients/fireblocks" }
eigen-contract-bindings = { path = "crates/contracts/bindings/" }
eigen-crypto-bls = { path = "crates/crypto/bls/" }
eigen-crypto-bn254 = { path = "crates/crypto/bn254/" }
eigen-crypto-keystore = { path = "crates/crypto/keystore/" }
eigen-metrics = { version = "0.0.1-alpha", path = "crates/metrics/" }
eigen-metrics-collectors-economic = { path = "crates/metrics/collectors/economic" }
eigen-metrics-collectors-rpc-calls = { path = "crates/metrics/collectors/rpc_calls" }
Expand Down Expand Up @@ -94,14 +94,14 @@ reth = { git = "https://github.com/paradigmxyz/reth" }
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.121"
syn = "2.0"
testcontainers = "0.20.1"
thiserror = "1.0"
tokio = { version = "1.37.0", features = ["test-util", "full", "sync"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3", features = ["json"] }
url = "2.5.2"

#misc
testcontainers = "0.20.1"
rust-bls-bn254 = {git = "https://github.com/Layr-Labs/rust-bls-bn254.git", rev = "be3ef87", features = ["std"] }
#misc
parking_lot = "0.12"

#alloy
Expand Down
2 changes: 0 additions & 2 deletions crates/chainio/clients/avsregistry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ eigen-types.workspace = true
eigen-crypto-bls.workspace = true
ark-ff.workspace = true
eigen-client-elcontracts.workspace = true
eigen-chainio-utils.workspace = true
eigen-utils.workspace = true
eigen-logging.workspace = true
ark-bn254 = "0.4.0"
thiserror.workspace = true
tracing.workspace = true
alloy-network.workspace = true
Expand Down
11 changes: 11 additions & 0 deletions crates/chainio/clients/avsregistry/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use alloy_contract::Error as AlloyError;
use eigen_client_elcontracts::error::ElContractsError;
use eigen_crypto_bls::error::BlsError;
use thiserror::Error;

/// Error returned by AvsRegistry
Expand Down Expand Up @@ -136,10 +137,20 @@ pub enum AvsRegistryError {
/// ElContractsError compatibility
#[error("ElContractsError: {0}")]
ElContractsError(String),

/// BlsError compatibility
#[error("BlsError :{0}")]
BlsError(String),
}

impl From<ElContractsError> for AvsRegistryError {
fn from(err: ElContractsError) -> Self {
AvsRegistryError::ElContractsError(err.to_string())
}
}

impl From<BlsError> for AvsRegistryError {
fn from(err: BlsError) -> Self {
AvsRegistryError::BlsError(err.to_string())
}
}
Loading

0 comments on commit 82ab8ae

Please sign in to comment.