From 21b6b6191e48a5357a463645d866997bfe787e89 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Fri, 18 Oct 2024 18:46:55 -0300 Subject: [PATCH 01/21] initial work for Telemetry --- Cargo.toml | 13 ++++++++++++- crates/telemetry/Cargo.toml | 12 ++++++++++++ crates/telemetry/README.md | 0 crates/telemetry/src/lib.rs | 1 + crates/telemetry/src/telemetry_config.rs | 23 +++++++++++++++++++++++ 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 crates/telemetry/Cargo.toml create mode 100644 crates/telemetry/README.md create mode 100644 crates/telemetry/src/lib.rs create mode 100644 crates/telemetry/src/telemetry_config.rs diff --git a/Cargo.toml b/Cargo.toml index aafd4f91..91bf9446 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,6 +75,7 @@ eigen-services-blsaggregation = { path = "crates/services/bls_aggregation" } eigen-services-operatorsinfo = { path = "crates/services/operatorsinfo" } eigen-signer = { path = "crates/signer/" } eigen-testing-utils = { path = "testing/testing-utils" } +eigen-telemetry = { path = "crates/telemetry/" } eigen-types = { path = "crates/types/" } eigen-utils = { path = "crates/utils/" } eigen-nodeapi = { path = "crates/nodeapi/" } @@ -152,7 +153,17 @@ alloy-transport-http = { version = "0.4.2", features = [ alloy-transport-ipc = { version = "0.4.2", default-features = false } alloy-transport-ws = { version = "0.4.2", default-features = false } alloy-trie = "0.6.0" -alloy = { version = "0.4.2", features = ["sol-types", "contract","full","signer-aws"] } +alloy = { version = "0.4.2", features = [ + "sol-types", + "contract", + "full", + "signer-aws", +] } anvil-utils = { path = "examples/anvil-utils" } avsregistry-read = { path = "examples/avsregistry-read" } avsregistry-write = { path = "examples/avsregistry-write" } + +posthog-rs = { version = "0.2.0", optional = true } + +[features] +telemetry = ["posthog-rs", "eigen-telemetry"] diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml new file mode 100644 index 00000000..4111b6b0 --- /dev/null +++ b/crates/telemetry/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "eigen-telemetry" +description = "Eigen Layer telemetry" + +version.workspace = true +edition.workspace = true +rust-version.workspace = true +repository.workspace = true +license-file.workspace = true + +[dependencies] +posthog-rs.workspace = true diff --git a/crates/telemetry/README.md b/crates/telemetry/README.md new file mode 100644 index 00000000..e69de29b diff --git a/crates/telemetry/src/lib.rs b/crates/telemetry/src/lib.rs new file mode 100644 index 00000000..2ffad851 --- /dev/null +++ b/crates/telemetry/src/lib.rs @@ -0,0 +1 @@ +pub mod telemetry_config; diff --git a/crates/telemetry/src/telemetry_config.rs b/crates/telemetry/src/telemetry_config.rs new file mode 100644 index 00000000..4dc7a1ad --- /dev/null +++ b/crates/telemetry/src/telemetry_config.rs @@ -0,0 +1,23 @@ +use posthog_rs::{Client, Event}; + +pub struct TelemetryConfig { + pub key: String, + pub user_id: String, + client: Client, +} + +impl TelemetryConfig { + pub fn new(key: String, user_id: String) -> Self { + let client = posthog_rs::client(key); + + Self { key, user_id, client } + } + + pub fn capture_event(&self) { + let event = posthog_rs::Event::new("app_started", "1234"); + self.client.capture(event).unwrap(); + } + let event = posthog_rs::Event::new("app_started", "1234"); + client.capture(event).unwrap(); + +} From e04d6e2eba14da3654ae19e1e25c2015d944d5f6 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Mon, 21 Oct 2024 13:07:51 -0300 Subject: [PATCH 02/21] TelemetryConfig with capture_event --- Cargo.lock | 21 +++++++++++++++++++ Cargo.toml | 5 +---- crates/chainio/clients/avsregistry/Cargo.toml | 9 ++++++-- crates/telemetry/src/telemetry_config.rs | 21 ++++++++++--------- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44295128..04c81bb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2319,12 +2319,14 @@ dependencies = [ "eigen-client-elcontracts", "eigen-crypto-bls", "eigen-logging", + "eigen-telemetry", "eigen-testing-utils", "eigen-types", "eigen-utils", "hex", "num-bigint 0.4.6", "once_cell", + "posthog-rs", "thiserror", "tokio", "tracing", @@ -2598,6 +2600,13 @@ dependencies = [ "url", ] +[[package]] +name = "eigen-telemetry" +version = "0.1.0" +dependencies = [ + "posthog-rs", +] + [[package]] name = "eigen-testing-utils" version = "0.1.0" @@ -5248,6 +5257,18 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +[[package]] +name = "posthog-rs" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad1b35ffe50419992615288c40ee90fbf30da4c6faf251414675ea64e1cdfa3" +dependencies = [ + "chrono", + "reqwest 0.11.27", + "serde", + "serde_json", +] + [[package]] name = "powerfmt" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 91bf9446..0b4776db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -163,7 +163,4 @@ anvil-utils = { path = "examples/anvil-utils" } avsregistry-read = { path = "examples/avsregistry-read" } avsregistry-write = { path = "examples/avsregistry-write" } -posthog-rs = { version = "0.2.0", optional = true } - -[features] -telemetry = ["posthog-rs", "eigen-telemetry"] +posthog-rs = "0.2.0" diff --git a/crates/chainio/clients/avsregistry/Cargo.toml b/crates/chainio/clients/avsregistry/Cargo.toml index bc6772ac..f84b9423 100644 --- a/crates/chainio/clients/avsregistry/Cargo.toml +++ b/crates/chainio/clients/avsregistry/Cargo.toml @@ -13,14 +13,16 @@ alloy.workspace = true alloy-primitives.workspace = true alloy-signer.workspace = true alloy-signer-local.workspace = true +ark-ff.workspace = true async-trait.workspace = true -num-bigint = "0.4.4" eigen-types.workspace = true eigen-crypto-bls.workspace = true -ark-ff.workspace = true +eigen-telemetry = { workspace = true, optional = true } eigen-client-elcontracts.workspace = true eigen-utils.workspace = true eigen-logging.workspace = true +num-bigint = "0.4.4" +posthog-rs = { workspace = true, optional = true } thiserror.workspace = true tracing.workspace = true @@ -33,3 +35,6 @@ eigen-testing-utils.workspace = true hex = "0.4.3" once_cell.workspace = true tokio = { version = "1.37.0", features = ["test-util", "full", "sync"] } + +[features] +telemetry = ["posthog-rs", "eigen-telemetry"] diff --git a/crates/telemetry/src/telemetry_config.rs b/crates/telemetry/src/telemetry_config.rs index 4dc7a1ad..c5606ad5 100644 --- a/crates/telemetry/src/telemetry_config.rs +++ b/crates/telemetry/src/telemetry_config.rs @@ -1,4 +1,4 @@ -use posthog_rs::{Client, Event}; +use posthog_rs::{client, Client, Error, Event}; pub struct TelemetryConfig { pub key: String, @@ -7,17 +7,18 @@ pub struct TelemetryConfig { } impl TelemetryConfig { - pub fn new(key: String, user_id: String) -> Self { - let client = posthog_rs::client(key); + pub fn new(key: &str, user_id: &str) -> Self { + let client = client(key); - Self { key, user_id, client } + Self { + key: key.to_owned(), + user_id: user_id.to_owned(), + client, + } } - pub fn capture_event(&self) { - let event = posthog_rs::Event::new("app_started", "1234"); - self.client.capture(event).unwrap(); + pub fn capture_event(&self, event: &str) -> Result<(), Error> { + let event = Event::new(event, &self.user_id); + self.client.capture(event) } - let event = posthog_rs::Event::new("app_started", "1234"); - client.capture(event).unwrap(); - } From 74ec9a38ec86197e7241795d0dd79646b76f2f93 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 22 Oct 2024 15:40:36 -0300 Subject: [PATCH 03/21] Telemetry in OnceCell --- Cargo.lock | 1 - crates/chainio/clients/avsregistry/Cargo.toml | 3 +-- crates/telemetry/src/telemetry_config.rs | 24 +++++++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04c81bb1..22f309e1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2326,7 +2326,6 @@ dependencies = [ "hex", "num-bigint 0.4.6", "once_cell", - "posthog-rs", "thiserror", "tokio", "tracing", diff --git a/crates/chainio/clients/avsregistry/Cargo.toml b/crates/chainio/clients/avsregistry/Cargo.toml index f84b9423..99a1b2a3 100644 --- a/crates/chainio/clients/avsregistry/Cargo.toml +++ b/crates/chainio/clients/avsregistry/Cargo.toml @@ -22,7 +22,6 @@ eigen-client-elcontracts.workspace = true eigen-utils.workspace = true eigen-logging.workspace = true num-bigint = "0.4.4" -posthog-rs = { workspace = true, optional = true } thiserror.workspace = true tracing.workspace = true @@ -37,4 +36,4 @@ once_cell.workspace = true tokio = { version = "1.37.0", features = ["test-util", "full", "sync"] } [features] -telemetry = ["posthog-rs", "eigen-telemetry"] +telemetry = ["dep:eigen-telemetry"] diff --git a/crates/telemetry/src/telemetry_config.rs b/crates/telemetry/src/telemetry_config.rs index c5606ad5..6c785c32 100644 --- a/crates/telemetry/src/telemetry_config.rs +++ b/crates/telemetry/src/telemetry_config.rs @@ -1,4 +1,9 @@ use posthog_rs::{client, Client, Error, Event}; +use std::sync::OnceLock; + +static TELEMETRY_CELL: OnceLock = OnceLock::new(); + +pub struct Telemetry {} pub struct TelemetryConfig { pub key: String, @@ -6,6 +11,20 @@ pub struct TelemetryConfig { client: Client, } +impl Telemetry { + pub fn new(key: &str, user_id: &str) -> Result<(), TelemetryConfig> { + let config = TelemetryConfig::new(key, user_id); + TELEMETRY_CELL.set(config)?; + Ok(()) + } + + pub fn capture_event(event: &str) -> Result<(), Error> { + let cell = TELEMETRY_CELL.get().unwrap(); + let event = Event::new(event, &cell.user_id); + cell.client.capture(event) + } +} + impl TelemetryConfig { pub fn new(key: &str, user_id: &str) -> Self { let client = client(key); @@ -16,9 +35,4 @@ impl TelemetryConfig { client, } } - - pub fn capture_event(&self, event: &str) -> Result<(), Error> { - let event = Event::new(event, &self.user_id); - self.client.capture(event) - } } From a784c8002fd0f0d5fc67cf52f8bf42f1b2d98748 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 22 Oct 2024 15:54:19 -0300 Subject: [PATCH 04/21] Reordering in a new file --- crates/telemetry/src/lib.rs | 6 ++++++ crates/telemetry/src/telemetry.rs | 18 +++++++++++++++++ crates/telemetry/src/telemetry_config.rs | 25 +++--------------------- 3 files changed, 27 insertions(+), 22 deletions(-) create mode 100644 crates/telemetry/src/telemetry.rs diff --git a/crates/telemetry/src/lib.rs b/crates/telemetry/src/lib.rs index 2ffad851..96bb08ec 100644 --- a/crates/telemetry/src/lib.rs +++ b/crates/telemetry/src/lib.rs @@ -1 +1,7 @@ +pub mod telemetry; pub mod telemetry_config; + +use std::sync::OnceLock; +use telemetry_config::TelemetryConfig; + +static TELEMETRY_CELL: OnceLock = OnceLock::new(); diff --git a/crates/telemetry/src/telemetry.rs b/crates/telemetry/src/telemetry.rs new file mode 100644 index 00000000..81ed80d5 --- /dev/null +++ b/crates/telemetry/src/telemetry.rs @@ -0,0 +1,18 @@ +use super::telemetry_config::TelemetryConfig; +use posthog_rs::{Error, Event}; + +pub struct Telemetry {} + +impl Telemetry { + pub fn new(key: &str, user_id: &str) -> Result<(), TelemetryConfig> { + let config = TelemetryConfig::new(key, user_id); + crate::TELEMETRY_CELL.set(config)?; + Ok(()) + } + + pub fn capture_event(event: &str) -> Result<(), Error> { + let cell = crate::TELEMETRY_CELL.get().unwrap(); + let event = Event::new(event, &cell.user_id); + cell.client.capture(event) + } +} diff --git a/crates/telemetry/src/telemetry_config.rs b/crates/telemetry/src/telemetry_config.rs index 6c785c32..95216987 100644 --- a/crates/telemetry/src/telemetry_config.rs +++ b/crates/telemetry/src/telemetry_config.rs @@ -1,32 +1,13 @@ -use posthog_rs::{client, Client, Error, Event}; -use std::sync::OnceLock; - -static TELEMETRY_CELL: OnceLock = OnceLock::new(); - -pub struct Telemetry {} +use posthog_rs::{client, Client}; pub struct TelemetryConfig { pub key: String, pub user_id: String, - client: Client, -} - -impl Telemetry { - pub fn new(key: &str, user_id: &str) -> Result<(), TelemetryConfig> { - let config = TelemetryConfig::new(key, user_id); - TELEMETRY_CELL.set(config)?; - Ok(()) - } - - pub fn capture_event(event: &str) -> Result<(), Error> { - let cell = TELEMETRY_CELL.get().unwrap(); - let event = Event::new(event, &cell.user_id); - cell.client.capture(event) - } + pub(crate) client: Client, } impl TelemetryConfig { - pub fn new(key: &str, user_id: &str) -> Self { + pub(crate) fn new(key: &str, user_id: &str) -> Self { let client = client(key); Self { From 45f64f67593c27d16f7b04189d1447d2126b7f21 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 22 Oct 2024 16:13:58 -0300 Subject: [PATCH 05/21] adding telemetry call in get_operators_stake_in_quorums_at_block --- crates/chainio/clients/avsregistry/src/error.rs | 5 +++++ crates/chainio/clients/avsregistry/src/reader.rs | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/crates/chainio/clients/avsregistry/src/error.rs b/crates/chainio/clients/avsregistry/src/error.rs index 69ffb393..96ccd1c1 100644 --- a/crates/chainio/clients/avsregistry/src/error.rs +++ b/crates/chainio/clients/avsregistry/src/error.rs @@ -157,9 +157,14 @@ pub enum AvsRegistryError { /// Invalid Signature #[error("Invalid signature")] InvalidSignature, + /// Parse BigInt #[error("big int error")] ParseBigIntError, + + /// Telemetry error + #[error("Telemetry error")] + TelemetryError(String), } impl From for AvsRegistryError { diff --git a/crates/chainio/clients/avsregistry/src/reader.rs b/crates/chainio/clients/avsregistry/src/reader.rs index 19471547..100ca3c2 100644 --- a/crates/chainio/clients/avsregistry/src/reader.rs +++ b/crates/chainio/clients/avsregistry/src/reader.rs @@ -105,6 +105,14 @@ impl AvsRegistryReader for AvsRegistryChainReader { .map_err(|_| AvsRegistryError::GetOperatorState)?; let OperatorStateRetriever::getOperatorState_0Return { _0: quorum } = operator_state; + + #[cfg(feature = "telemetry")] + { + eigen_telemetry::telemetry::Telemetry::capture_event( + "get_operators_stake_in_quorums_at_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + } Ok(quorum) } From 8f3eaf4744a2018f7f923de0ac9e9ba27232bac1 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 22 Oct 2024 16:51:16 -0300 Subject: [PATCH 06/21] Rename method new to set_config --- crates/telemetry/src/telemetry.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/telemetry/src/telemetry.rs b/crates/telemetry/src/telemetry.rs index 81ed80d5..ed4d8ee6 100644 --- a/crates/telemetry/src/telemetry.rs +++ b/crates/telemetry/src/telemetry.rs @@ -4,7 +4,7 @@ use posthog_rs::{Error, Event}; pub struct Telemetry {} impl Telemetry { - pub fn new(key: &str, user_id: &str) -> Result<(), TelemetryConfig> { + pub fn set_config(key: &str, user_id: &str) -> Result<(), TelemetryConfig> { let config = TelemetryConfig::new(key, user_id); crate::TELEMETRY_CELL.set(config)?; Ok(()) From a2fd71e208469f34f10e11ceb39962f80cdec062 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 22 Oct 2024 17:14:21 -0300 Subject: [PATCH 07/21] explanation of telemetry in README --- crates/telemetry/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/telemetry/README.md b/crates/telemetry/README.md index e69de29b..3731f125 100644 --- a/crates/telemetry/README.md +++ b/crates/telemetry/README.md @@ -0,0 +1,13 @@ +# Eigen-telemetry + +To enable and use telemetry in your avs/code, you need to include the SDK crates with the feature telemetry enabled. + +In the main function the code must set the config of the telemetry with the given parameters: + +``` rust +fn main() { + let _ = eigen_telemetry::telemetry::Telemetry::set_config("YOUR_TELEMETRY_KEY", "YOUR_USER_ID"); + // if this sentence returns an error, that's a unrecoverable error + // ... +} +``` From 2f2b82021530152a2119ca0fedf50ac6eb3d7f9f Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 23 Oct 2024 15:18:50 -0300 Subject: [PATCH 08/21] README of eigen-telemetry improved --- crates/telemetry/README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/telemetry/README.md b/crates/telemetry/README.md index 3731f125..396512d6 100644 --- a/crates/telemetry/README.md +++ b/crates/telemetry/README.md @@ -1,13 +1,18 @@ # Eigen-telemetry -To enable and use telemetry in your avs/code, you need to include the SDK crates with the feature telemetry enabled. +To enable and use telemetry in your avs/code, you need to include `eigen-telemetry` crate and the rest of the SDK crates with the feature telemetry enabled. To do so, in your `Cargo.toml` file put: + +``` toml +eigen-telemetry = "*" +eigen-client-avsregistry = { version = "*", features = "telemetry" } +``` In the main function the code must set the config of the telemetry with the given parameters: ``` rust fn main() { let _ = eigen_telemetry::telemetry::Telemetry::set_config("YOUR_TELEMETRY_KEY", "YOUR_USER_ID"); - // if this sentence returns an error, that's a unrecoverable error - // ... + + // ... the rest of the code ... } ``` From 61904107d6173c35c6361417b60732b9bd409ead Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Fri, 25 Oct 2024 15:40:27 -0300 Subject: [PATCH 09/21] telemetry in other methods --- crates/chainio/clients/avsregistry/src/reader.rs | 6 ++++++ crates/chainio/clients/avsregistry/src/writer.rs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/crates/chainio/clients/avsregistry/src/reader.rs b/crates/chainio/clients/avsregistry/src/reader.rs index 100ca3c2..339e25c7 100644 --- a/crates/chainio/clients/avsregistry/src/reader.rs +++ b/crates/chainio/clients/avsregistry/src/reader.rs @@ -460,6 +460,12 @@ impl AvsRegistryChainReader { _0: operator_status, } = operator_status_return; + #[cfg(feature = "telemetry")] + { + eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + } + Ok(operator_status == 1) } diff --git a/crates/chainio/clients/avsregistry/src/writer.rs b/crates/chainio/clients/avsregistry/src/writer.rs index 50cf0996..f0ae7010 100644 --- a/crates/chainio/clients/avsregistry/src/writer.rs +++ b/crates/chainio/clients/avsregistry/src/writer.rs @@ -222,6 +222,14 @@ impl AvsRegistryChainWriter { .map_err(AvsRegistryError::AlloyContractError)?; info!(tx_hash = ?tx,"Sent transaction to register operator in the AVS's registry coordinator" ); + + #[cfg(feature = "telemetry")] + { + eigen_telemetry::telemetry::Telemetry::capture_event( + "register_operator_in_quorum_with_avs_registry_coordinator", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + } Ok(*tx.tx_hash()) } From 0f7760e483e5343966f64b603e8110e37786cb64 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Fri, 25 Oct 2024 15:57:21 -0300 Subject: [PATCH 10/21] Run telemetry in sync context --- crates/chainio/clients/avsregistry/Cargo.toml | 3 ++- .../chainio/clients/avsregistry/src/reader.rs | 18 ++++++++++++------ .../chainio/clients/avsregistry/src/writer.rs | 12 ++++++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/crates/chainio/clients/avsregistry/Cargo.toml b/crates/chainio/clients/avsregistry/Cargo.toml index 99a1b2a3..f33ab40c 100644 --- a/crates/chainio/clients/avsregistry/Cargo.toml +++ b/crates/chainio/clients/avsregistry/Cargo.toml @@ -23,6 +23,7 @@ eigen-utils.workspace = true eigen-logging.workspace = true num-bigint = "0.4.4" thiserror.workspace = true +tokio = { workspace = true, optional = true } tracing.workspace = true [lints] @@ -36,4 +37,4 @@ once_cell.workspace = true tokio = { version = "1.37.0", features = ["test-util", "full", "sync"] } [features] -telemetry = ["dep:eigen-telemetry"] +telemetry = ["dep:eigen-telemetry", "dep:tokio"] diff --git a/crates/chainio/clients/avsregistry/src/reader.rs b/crates/chainio/clients/avsregistry/src/reader.rs index 339e25c7..eec1e3d6 100644 --- a/crates/chainio/clients/avsregistry/src/reader.rs +++ b/crates/chainio/clients/avsregistry/src/reader.rs @@ -108,10 +108,13 @@ impl AvsRegistryReader for AvsRegistryChainReader { #[cfg(feature = "telemetry")] { - eigen_telemetry::telemetry::Telemetry::capture_event( - "get_operators_stake_in_quorums_at_block", - ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + tokio::task::spawn_blocking(move || { + eigen_telemetry::telemetry::Telemetry::capture_event( + "get_operators_stake_in_quorums_at_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + }) + .await?; } Ok(quorum) } @@ -462,8 +465,11 @@ impl AvsRegistryChainReader { #[cfg(feature = "telemetry")] { - eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + tokio::task::spawn_blocking(move || { + eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + }) + .await?; } Ok(operator_status == 1) diff --git a/crates/chainio/clients/avsregistry/src/writer.rs b/crates/chainio/clients/avsregistry/src/writer.rs index f0ae7010..8ae70e48 100644 --- a/crates/chainio/clients/avsregistry/src/writer.rs +++ b/crates/chainio/clients/avsregistry/src/writer.rs @@ -225,11 +225,15 @@ impl AvsRegistryChainWriter { #[cfg(feature = "telemetry")] { - eigen_telemetry::telemetry::Telemetry::capture_event( - "register_operator_in_quorum_with_avs_registry_coordinator", - ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + tokio::task::spawn_blocking(move || { + eigen_telemetry::telemetry::Telemetry::capture_event( + "register_operator_in_quorum_with_avs_registry_coordinator", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + }) + .await?; } + Ok(*tx.tx_hash()) } From ab5029a9905ce2eaaad6edf037be608046797988 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Fri, 25 Oct 2024 18:14:47 -0300 Subject: [PATCH 11/21] fixing await error --- .../chainio/clients/avsregistry/src/reader.rs | 17 +++++++++-------- .../chainio/clients/avsregistry/src/writer.rs | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/crates/chainio/clients/avsregistry/src/reader.rs b/crates/chainio/clients/avsregistry/src/reader.rs index eec1e3d6..4aa9d4da 100644 --- a/crates/chainio/clients/avsregistry/src/reader.rs +++ b/crates/chainio/clients/avsregistry/src/reader.rs @@ -108,13 +108,13 @@ impl AvsRegistryReader for AvsRegistryChainReader { #[cfg(feature = "telemetry")] { - tokio::task::spawn_blocking(move || { - eigen_telemetry::telemetry::Telemetry::capture_event( + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "get_operators_stake_in_quorums_at_block", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); }) - .await?; + .await; } Ok(quorum) } @@ -465,11 +465,12 @@ impl AvsRegistryChainReader { #[cfg(feature = "telemetry")] { - tokio::task::spawn_blocking(move || { - eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + let _ = tokio::task::spawn_blocking(move || { + let _ = + eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); }) - .await?; + .await; } Ok(operator_status == 1) diff --git a/crates/chainio/clients/avsregistry/src/writer.rs b/crates/chainio/clients/avsregistry/src/writer.rs index 8ae70e48..10c3a49a 100644 --- a/crates/chainio/clients/avsregistry/src/writer.rs +++ b/crates/chainio/clients/avsregistry/src/writer.rs @@ -225,13 +225,13 @@ impl AvsRegistryChainWriter { #[cfg(feature = "telemetry")] { - tokio::task::spawn_blocking(move || { - eigen_telemetry::telemetry::Telemetry::capture_event( + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "register_operator_in_quorum_with_avs_registry_coordinator", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string()))?; + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); }) - .await?; + .await; } Ok(*tx.tx_hash()) From a1697491838f3bfdd4f40ddd59510251978b1c61 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 13 Nov 2024 15:19:40 -0300 Subject: [PATCH 12/21] Cargo.lock updated --- Cargo.lock | 2 -- 1 file changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a297820a..d2fba402 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2710,7 +2710,6 @@ dependencies = [ "alloy", "alloy-primitives", "alloy-signer-local", - "anyhow", "ark-bn254 0.5.0", "ark-ff 0.5.0", "ark-std 0.4.0", @@ -2781,7 +2780,6 @@ name = "eigen-types" version = "0.1.0" dependencies = [ "alloy-primitives", - "ark-serialize 0.5.0", "eigen-crypto-bls", "ethers", "num-bigint 0.4.6", From 708a5ea1b8bfdae3b8f3f5148df8ab7a9a6b2546 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 13 Nov 2024 15:20:14 -0300 Subject: [PATCH 13/21] fake_backend fixed --- crates/chainio/txmanager/src/fake_backend.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/chainio/txmanager/src/fake_backend.rs b/crates/chainio/txmanager/src/fake_backend.rs index 31189fcc..9ff07da3 100644 --- a/crates/chainio/txmanager/src/fake_backend.rs +++ b/crates/chainio/txmanager/src/fake_backend.rs @@ -123,7 +123,6 @@ impl EthBackend for FakeEthBackend { from: Address::default(), to: None, contract_address: None, - state_root: None, authorization_list: None, }) } From f8ebd5a2c5012e5b25600a1ca03fd3c6b922efab Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Fri, 15 Nov 2024 18:26:23 -0300 Subject: [PATCH 14/21] telemetry calls in all the methods of avsregistry and elcontracts --- .../chainio/clients/avsregistry/src/reader.rs | 152 ++++++++++++++++-- .../chainio/clients/avsregistry/src/writer.rs | 66 ++++++-- crates/chainio/clients/elcontracts/Cargo.toml | 4 + .../chainio/clients/elcontracts/src/reader.rs | 106 ++++++++++++ .../chainio/clients/elcontracts/src/writer.rs | 64 ++++++++ 5 files changed, 371 insertions(+), 21 deletions(-) diff --git a/crates/chainio/clients/avsregistry/src/reader.rs b/crates/chainio/clients/avsregistry/src/reader.rs index 4aa9d4da..7b4b180c 100644 --- a/crates/chainio/clients/avsregistry/src/reader.rs +++ b/crates/chainio/clients/avsregistry/src/reader.rs @@ -125,6 +125,17 @@ impl AvsRegistryReader for AvsRegistryChainReader { quorum_numbers: Vec, non_signer_operator_ids: Vec>, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_check_signatures_indices", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_operator_state_retriever = @@ -148,6 +159,17 @@ impl AvsRegistryReader for AvsRegistryChainReader { &self, operator_id: [u8; 32], ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operator_from_id", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_registry_coordinator = @@ -180,6 +202,16 @@ impl AvsRegistryChainReader { operator_state_retriever_addr: Address, http_provider_url: String, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = + eigen_telemetry::telemetry::Telemetry::capture_event("avsregistryreader.new") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&http_provider_url); let contract_registry_coordinator = @@ -220,6 +252,17 @@ impl AvsRegistryChainReader { /// /// The total quorum count read from the RegistryCoordinator. pub async fn get_quorum_count(&self) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_quorum_count", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_registry_coordinator = @@ -252,6 +295,17 @@ impl AvsRegistryChainReader { block_number: u32, operator_id: B256, ) -> Result<(U256, Vec>), AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operators_stake_in_quorums_at_block_operator_id", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_operator_state_retriever = @@ -287,6 +341,17 @@ impl AvsRegistryChainReader { &self, quorum_numbers: Bytes, ) -> Result>, AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operators_stake_in_quorums_at_current_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let current_block_number = provider @@ -321,6 +386,17 @@ impl AvsRegistryChainReader { operator_id: B256, block_number: u32, ) -> Result<(Vec, Vec>), AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operators_stake_in_quorums_of_operator_at_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let (quorum_bitmaps, operator_stakes) = self .get_operators_stake_in_quorums_at_block_operator_id(block_number, operator_id) .await @@ -346,6 +422,17 @@ impl AvsRegistryChainReader { &self, operator_id: B256, ) -> Result<(Vec, Vec>), AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operators_stake_in_quorums_of_operator_at_current_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let current_block_number = provider.get_block_number().await.map_err(|e| { @@ -377,6 +464,17 @@ impl AvsRegistryChainReader { &self, operator_id: B256, ) -> Result, AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operator_stake_in_quorums_of_operator_at_current_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let registry_coordinator = @@ -423,6 +521,17 @@ impl AvsRegistryChainReader { &self, operator_address: Address, ) -> Result, AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.get_operator_id", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_registry_coordinator = @@ -449,6 +558,17 @@ impl AvsRegistryChainReader { &self, operator_address: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.is_operator_registered", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_registry_coordinator = @@ -463,16 +583,6 @@ impl AvsRegistryChainReader { _0: operator_status, } = operator_status_return; - #[cfg(feature = "telemetry")] - { - let _ = tokio::task::spawn_blocking(move || { - let _ = - eigen_telemetry::telemetry::Telemetry::capture_event("is_operator_registered") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); - }) - .await; - } - Ok(operator_status == 1) } @@ -494,6 +604,17 @@ impl AvsRegistryChainReader { mut stop_block: u64, ws_url: String, ) -> Result<(Vec
, Vec), AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.query_existing_registered_operator_pub_keys", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_ws_provider(&ws_url).await.map_err(|e| { AvsRegistryError::AlloyContractError(alloy::contract::Error::TransportError(e)) })?; @@ -566,6 +687,17 @@ impl AvsRegistryChainReader { start_block: u64, stop_block: u64, ) -> Result, String>, AvsRegistryError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistryreader.query_existing_registered_operator_sockets", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let mut operator_id_to_socket = HashMap::new(); diff --git a/crates/chainio/clients/avsregistry/src/writer.rs b/crates/chainio/clients/avsregistry/src/writer.rs index e9919faf..fd0219f1 100644 --- a/crates/chainio/clients/avsregistry/src/writer.rs +++ b/crates/chainio/clients/avsregistry/src/writer.rs @@ -60,6 +60,17 @@ impl AvsRegistryChainWriter { registry_coordinator_addr: Address, operator_state_retriever_addr: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistrychainwriter.build_avs_registry_chain_writer", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let fill_provider = get_provider(&provider); let contract_registry_coordinator = @@ -142,6 +153,17 @@ impl AvsRegistryChainWriter { quorum_numbers: Bytes, socket: String, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistrychainwriter.register_operator_in_quorum_with_avs_registry_coordinator", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_signer(&self.signer.clone(), &self.provider); let wallet = PrivateKeySigner::from_str(&self.signer) .map_err(|_| AvsRegistryError::InvalidPrivateKey)?; @@ -223,17 +245,6 @@ impl AvsRegistryChainWriter { info!(tx_hash = ?tx,"Sent transaction to register operator in the AVS's registry coordinator" ); - #[cfg(feature = "telemetry")] - { - let _ = tokio::task::spawn_blocking(move || { - let _ = eigen_telemetry::telemetry::Telemetry::capture_event( - "register_operator_in_quorum_with_avs_registry_coordinator", - ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); - }) - .await; - } - Ok(*tx.tx_hash()) } @@ -258,6 +269,17 @@ impl AvsRegistryChainWriter { operators_per_quorum: Vec>, quorum_number: Bytes, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistrychainwriter.update_stakes_of_entire_operator_set_for_quorums", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!(quorum_numbers = %quorum_number, "updating stakes for entire operator set"); let provider = get_signer(&self.signer.clone(), &self.provider); let contract_registry_coordinator = @@ -289,6 +311,17 @@ impl AvsRegistryChainWriter { &self, operators: Vec
, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistrychainwriter.update_stakes_of_operator_subset_for_all_quorums", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!(operators = ?operators, "updating stakes of operator subset for all quorums"); let provider = get_signer(&self.signer.clone(), &self.provider); @@ -322,6 +355,17 @@ impl AvsRegistryChainWriter { &self, quorum_numbers: Bytes, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "avsregistrychainwriter.deregister_operator", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!("deregistering operator with the AVS's registry coordinator"); let provider = get_signer(&self.signer.clone(), &self.provider); diff --git a/crates/chainio/clients/elcontracts/Cargo.toml b/crates/chainio/clients/elcontracts/Cargo.toml index 841f16d7..d3789ab4 100644 --- a/crates/chainio/clients/elcontracts/Cargo.toml +++ b/crates/chainio/clients/elcontracts/Cargo.toml @@ -12,6 +12,7 @@ license-file.workspace = true alloy.workspace = true alloy-primitives.workspace = true eigen-logging.workspace = true +eigen-telemetry = { workspace = true, optional = true } eigen-types.workspace = true eigen-utils.workspace = true thiserror.workspace = true @@ -26,3 +27,6 @@ eigen-utils.workspace = true once_cell.workspace = true serial_test.workspace = true tokio.workspace = true + +[features] +telemetry = ["dep:eigen-telemetry", "dep:tokio"] diff --git a/crates/chainio/clients/elcontracts/src/reader.rs b/crates/chainio/clients/elcontracts/src/reader.rs index b2b89f80..ff71b3af 100644 --- a/crates/chainio/clients/elcontracts/src/reader.rs +++ b/crates/chainio/clients/elcontracts/src/reader.rs @@ -40,6 +40,15 @@ impl ELChainReader { avs_directory: Address, provider: String, ) -> Self { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.new") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + ELChainReader { _logger, slasher, @@ -70,6 +79,15 @@ impl ELChainReader { avs_directory: Address, client: &String, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.build") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(client); let contract_delegation_manager = DelegationManager::new(delegation_manager, provider); @@ -116,6 +134,17 @@ impl ELChainReader { approve_salt: FixedBytes<32>, expiry: U256, ) -> Result, ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.calculate_delegation_approval_digest_hash", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_delegation_manager = DelegationManager::new(self.delegation_manager, provider); let delegation_approval_digest_hash = contract_delegation_manager @@ -159,6 +188,17 @@ impl ELChainReader { salt: FixedBytes<32>, expiry: U256, ) -> Result, ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.calculate_operator_avs_registration_digest_hash", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_avs_directory = AVSDirectory::new(self.avs_directory, provider); @@ -194,6 +234,17 @@ impl ELChainReader { operator_addr: Address, strategy_addr: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.get_operator_shares_in_strategy", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_delegation_manager = DelegationManager::new(self.delegation_manager, provider); @@ -223,6 +274,17 @@ impl ELChainReader { &self, operator_addr: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.operator_is_frozen", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_slasher = ISlasher::new(self.slasher, provider); @@ -256,6 +318,17 @@ impl ELChainReader { operator_addr: Address, service_manager_addr: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.service_manager_can_slash_operator_until_block", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_slasher = ISlasher::new(self.slasher, provider); @@ -291,6 +364,17 @@ impl ELChainReader { &self, strategy_addr: Address, ) -> Result<(Address, Address, Address), ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.get_strategy_and_underlying_erc20_token", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_strategy = IStrategy::new(strategy_addr, &provider); @@ -331,6 +415,17 @@ impl ELChainReader { &self, operator: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.get_operator_details", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_delegation_manager = @@ -372,6 +467,17 @@ impl ELChainReader { &self, operator: Address, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.is_operator_registered", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_provider(&self.provider); let contract_delegation_manager = DelegationManager::new(self.delegation_manager, provider); diff --git a/crates/chainio/clients/elcontracts/src/writer.rs b/crates/chainio/clients/elcontracts/src/writer.rs index cd94ca15..325cdeb1 100644 --- a/crates/chainio/clients/elcontracts/src/writer.rs +++ b/crates/chainio/clients/elcontracts/src/writer.rs @@ -38,6 +38,15 @@ impl ELChainWriter { provider: String, signer: String, ) -> Self { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainwriter.new") + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + Self { delegation_manager, strategy_manager, @@ -65,6 +74,17 @@ impl ELChainWriter { &self, operator: Operator, ) -> Result, ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.register_as_operator", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!("registering operator {:?} to EigenLayer", operator.address); let op_details = OperatorDetails { __deprecated_earningsReceiver: operator.earnings_receiver_address, @@ -118,6 +138,17 @@ impl ELChainWriter { &self, operator: Operator, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.update_operator_details", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!( "updating operator detils of operator {:?} to EigenLayer", operator.address @@ -168,6 +199,17 @@ impl ELChainWriter { strategy_addr: Address, amount: U256, ) -> Result { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.deposit_erc20_into_strategy", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + info!("depositing {amount:?} tokens into strategy {strategy_addr:?}"); let tokens = self .el_chain_reader @@ -210,6 +252,17 @@ impl ELChainWriter { &self, claimer: Address, ) -> Result, ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.set_claimer_for", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_signer(&self.signer, &self.provider); let contract_rewards_coordinator = @@ -241,6 +294,17 @@ impl ELChainWriter { earner_address: Address, claim: RewardsMerkleClaim, ) -> Result, ElContractsError> { + #[cfg(feature = "telemetry")] + { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.process_claim", + ) + .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + }) + .await; + } + let provider = get_signer(&self.signer, &self.provider); let contract_rewards_coordinator = From 55de6b61f9480e5acfa833af682599c1098e3a7a Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 17 Dec 2024 18:06:23 -0300 Subject: [PATCH 15/21] Fixing Cargo.toml in crates/chainio/clients/elcontracts --- Cargo.lock | 8 ++++---- crates/chainio/clients/elcontracts/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aab26fbe..1b4c405d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2579,6 +2579,7 @@ dependencies = [ "alloy-provider", "alloy-signer-local", "eigen-logging", + "eigen-telemetry", "eigen-testing-utils", "eigen-types", "eigen-utils", @@ -2831,7 +2832,7 @@ dependencies = [ [[package]] name = "eigen-telemetry" -version = "0.1.0" +version = "0.1.1" dependencies = [ "posthog-rs", ] @@ -6064,9 +6065,8 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-bls-bn254" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84ab37c09dbee7ec3b610ecd703c6a79708aef66d52052ee7bfec0bbb9e7a8cd" +version = "0.2.0" +source = "git+https://github.com/Layr-Labs/rust-bls-bn254?rev=ce3313f#ce3313feb61b0512d4c65a6458aca08ccbc8ced2" dependencies = [ "aes", "ark-bn254 0.5.0", diff --git a/crates/chainio/clients/elcontracts/Cargo.toml b/crates/chainio/clients/elcontracts/Cargo.toml index d3789ab4..21ddb6e9 100644 --- a/crates/chainio/clients/elcontracts/Cargo.toml +++ b/crates/chainio/clients/elcontracts/Cargo.toml @@ -16,6 +16,7 @@ eigen-telemetry = { workspace = true, optional = true } eigen-types.workspace = true eigen-utils.workspace = true thiserror.workspace = true +tokio = { workspace = true, optional = true } tracing.workspace = true [dev-dependencies] @@ -26,7 +27,6 @@ eigen-testing-utils.workspace = true eigen-utils.workspace = true once_cell.workspace = true serial_test.workspace = true -tokio.workspace = true [features] telemetry = ["dep:eigen-telemetry", "dep:tokio"] From 93a11f1ac8084d4cb11aec7654b2e1d6f2db8b87 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 17 Dec 2024 18:24:25 -0300 Subject: [PATCH 16/21] compilation fixes with telemetry feature --- crates/chainio/clients/elcontracts/Cargo.toml | 1 + .../chainio/clients/elcontracts/src/error.rs | 4 ++++ .../chainio/clients/elcontracts/src/reader.rs | 23 +++++++++---------- .../chainio/clients/elcontracts/src/writer.rs | 15 ++++++------ 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/crates/chainio/clients/elcontracts/Cargo.toml b/crates/chainio/clients/elcontracts/Cargo.toml index 21ddb6e9..078364a4 100644 --- a/crates/chainio/clients/elcontracts/Cargo.toml +++ b/crates/chainio/clients/elcontracts/Cargo.toml @@ -27,6 +27,7 @@ eigen-testing-utils.workspace = true eigen-utils.workspace = true once_cell.workspace = true serial_test.workspace = true +tokio.workspace = true [features] telemetry = ["dep:eigen-telemetry", "dep:tokio"] diff --git a/crates/chainio/clients/elcontracts/src/error.rs b/crates/chainio/clients/elcontracts/src/error.rs index 5158c6bf..8c0073db 100644 --- a/crates/chainio/clients/elcontracts/src/error.rs +++ b/crates/chainio/clients/elcontracts/src/error.rs @@ -72,4 +72,8 @@ pub enum ElContractsError { #[error("Alloy pending Transaction error {0}")] AlloyPendingTransactionError(#[from] PendingTransactionError), + + /// Telemetry error + #[error("Telemetry error")] + TelemetryError(String), } diff --git a/crates/chainio/clients/elcontracts/src/reader.rs b/crates/chainio/clients/elcontracts/src/reader.rs index 9b7de01a..d024a2c4 100644 --- a/crates/chainio/clients/elcontracts/src/reader.rs +++ b/crates/chainio/clients/elcontracts/src/reader.rs @@ -44,9 +44,8 @@ impl ELChainReader { { let _ = tokio::task::spawn_blocking(move || { let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.new") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); - }) - .await; + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }); } ELChainReader { @@ -83,7 +82,7 @@ impl ELChainReader { { let _ = tokio::task::spawn_blocking(move || { let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.build") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -140,7 +139,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.calculate_delegation_approval_digest_hash", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -194,7 +193,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.calculate_operator_avs_registration_digest_hash", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -240,7 +239,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.get_operator_shares_in_strategy", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -280,7 +279,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.operator_is_frozen", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -324,7 +323,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.service_manager_can_slash_operator_until_block", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -370,7 +369,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.get_strategy_and_underlying_erc20_token", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -421,7 +420,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.get_operator_details", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -473,7 +472,7 @@ impl ELChainReader { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainreader.is_operator_registered", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } diff --git a/crates/chainio/clients/elcontracts/src/writer.rs b/crates/chainio/clients/elcontracts/src/writer.rs index 325cdeb1..3a14eed2 100644 --- a/crates/chainio/clients/elcontracts/src/writer.rs +++ b/crates/chainio/clients/elcontracts/src/writer.rs @@ -42,9 +42,8 @@ impl ELChainWriter { { let _ = tokio::task::spawn_blocking(move || { let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainwriter.new") - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); - }) - .await; + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }); } Self { @@ -80,7 +79,7 @@ impl ELChainWriter { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainwriter.register_as_operator", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -144,7 +143,7 @@ impl ELChainWriter { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainwriter.update_operator_details", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -205,7 +204,7 @@ impl ELChainWriter { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainwriter.deposit_erc20_into_strategy", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -258,7 +257,7 @@ impl ELChainWriter { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainwriter.set_claimer_for", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } @@ -300,7 +299,7 @@ impl ELChainWriter { let _ = eigen_telemetry::telemetry::Telemetry::capture_event( "elchainwriter.process_claim", ) - .map_err(|e| AvsRegistryError::TelemetryError(e.to_string())); + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); }) .await; } From 94b42eafa9d0182e32b6844bcaf7e8b3ae4634f9 Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Tue, 17 Dec 2024 18:38:48 -0300 Subject: [PATCH 17/21] fix methods new --- crates/chainio/clients/elcontracts/src/reader.rs | 15 +++++++++++---- crates/chainio/clients/elcontracts/src/writer.rs | 15 +++++++++++---- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/crates/chainio/clients/elcontracts/src/reader.rs b/crates/chainio/clients/elcontracts/src/reader.rs index d024a2c4..b6186a32 100644 --- a/crates/chainio/clients/elcontracts/src/reader.rs +++ b/crates/chainio/clients/elcontracts/src/reader.rs @@ -42,10 +42,17 @@ impl ELChainReader { ) -> Self { #[cfg(feature = "telemetry")] { - let _ = tokio::task::spawn_blocking(move || { - let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.new") - .map_err(|e| ElContractsError::TelemetryError(e.to_string())); - }); + if let Ok(runtime) = tokio::runtime::Runtime::new() { + runtime.block_on(async { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainreader.new", + ) + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }) + .await; + }); + } } ELChainReader { diff --git a/crates/chainio/clients/elcontracts/src/writer.rs b/crates/chainio/clients/elcontracts/src/writer.rs index 3a14eed2..09e4af8c 100644 --- a/crates/chainio/clients/elcontracts/src/writer.rs +++ b/crates/chainio/clients/elcontracts/src/writer.rs @@ -40,10 +40,17 @@ impl ELChainWriter { ) -> Self { #[cfg(feature = "telemetry")] { - let _ = tokio::task::spawn_blocking(move || { - let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainwriter.new") - .map_err(|e| ElContractsError::TelemetryError(e.to_string())); - }); + if let Ok(runtime) = tokio::runtime::Runtime::new() { + runtime.block_on(async { + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event( + "elchainwriter.new", + ) + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }) + .await; + }); + } } Self { From 5148504f9b0c436f5f3b44c351565295b5623f9d Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 18 Dec 2024 16:07:24 -0300 Subject: [PATCH 18/21] Fix ELChainReader::new and ELChainWriter::new --- .../chainio/clients/elcontracts/src/reader.rs | 19 ++++++---------- .../chainio/clients/elcontracts/src/writer.rs | 22 ++++++++----------- .../src/operatorsinfo_inmemory.rs | 6 +++-- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/crates/chainio/clients/elcontracts/src/reader.rs b/crates/chainio/clients/elcontracts/src/reader.rs index b6186a32..84feb28a 100644 --- a/crates/chainio/clients/elcontracts/src/reader.rs +++ b/crates/chainio/clients/elcontracts/src/reader.rs @@ -33,7 +33,7 @@ impl ELChainReader { /// # Returns /// /// A new `ELChainReader` instance. - pub fn new( + pub async fn new( _logger: SharedLogger, slasher: Address, delegation_manager: Address, @@ -42,17 +42,11 @@ impl ELChainReader { ) -> Self { #[cfg(feature = "telemetry")] { - if let Ok(runtime) = tokio::runtime::Runtime::new() { - runtime.block_on(async { - let _ = tokio::task::spawn_blocking(move || { - let _ = eigen_telemetry::telemetry::Telemetry::capture_event( - "elchainreader.new", - ) - .map_err(|e| ElContractsError::TelemetryError(e.to_string())); - }) - .await; - }); - } + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainreader.new") + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }) + .await; } ELChainReader { @@ -551,6 +545,7 @@ mod tests { avs_directory_address, http_endpoint, ) + .await } #[tokio::test] diff --git a/crates/chainio/clients/elcontracts/src/writer.rs b/crates/chainio/clients/elcontracts/src/writer.rs index 09e4af8c..bbb8cce4 100644 --- a/crates/chainio/clients/elcontracts/src/writer.rs +++ b/crates/chainio/clients/elcontracts/src/writer.rs @@ -30,7 +30,7 @@ pub struct ELChainWriter { } impl ELChainWriter { - pub fn new( + pub async fn new( delegation_manager: Address, strategy_manager: Address, rewards_coordinator: Address, @@ -40,17 +40,11 @@ impl ELChainWriter { ) -> Self { #[cfg(feature = "telemetry")] { - if let Ok(runtime) = tokio::runtime::Runtime::new() { - runtime.block_on(async { - let _ = tokio::task::spawn_blocking(move || { - let _ = eigen_telemetry::telemetry::Telemetry::capture_event( - "elchainwriter.new", - ) - .map_err(|e| ElContractsError::TelemetryError(e.to_string())); - }) - .await; - }); - } + let _ = tokio::task::spawn_blocking(move || { + let _ = eigen_telemetry::telemetry::Telemetry::capture_event("elchainwriter.new") + .map_err(|e| ElContractsError::TelemetryError(e.to_string())); + }) + .await; } Self { @@ -391,7 +385,8 @@ mod tests { delegation_manager_address, avs_directory_address, http_endpoint, - ), + ) + .await, delegation_manager_address, ) } @@ -412,6 +407,7 @@ mod tests { http_endpoint.clone(), operator_private_key, ) + .await } #[tokio::test] diff --git a/crates/services/operatorsinfo/src/operatorsinfo_inmemory.rs b/crates/services/operatorsinfo/src/operatorsinfo_inmemory.rs index 9876db13..61716c37 100644 --- a/crates/services/operatorsinfo/src/operatorsinfo_inmemory.rs +++ b/crates/services/operatorsinfo/src/operatorsinfo_inmemory.rs @@ -650,7 +650,8 @@ mod tests { delegation_manager_address, avs_directory_address, http_endpoint.to_string(), - ); + ) + .await; let signer = PrivateKeySigner::from_str(pvt_key).unwrap(); let el_chain_writer = ELChainWriter::new( @@ -660,7 +661,8 @@ mod tests { el_chain_reader, http_endpoint.to_string(), pvt_key.to_string(), - ); + ) + .await; let operator_details = Operator { address: signer.address(), From b68ce8ee39e5af72174a8be9bd70a7c5984d6f7e Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Wed, 18 Dec 2024 16:11:02 -0300 Subject: [PATCH 19/21] Fix in get_operator_info.rs and register_operator_in_quorum_with_avs_registry_coordinator.rs --- ...ster_operator_in_quorum_with_avs_registry_coordinator.rs | 6 ++++-- .../info-operator-service/examples/get_operator_info.rs | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/avsregistry-write/examples/register_operator_in_quorum_with_avs_registry_coordinator.rs b/examples/avsregistry-write/examples/register_operator_in_quorum_with_avs_registry_coordinator.rs index 4500799d..1f195456 100644 --- a/examples/avsregistry-write/examples/register_operator_in_quorum_with_avs_registry_coordinator.rs +++ b/examples/avsregistry-write/examples/register_operator_in_quorum_with_avs_registry_coordinator.rs @@ -66,7 +66,8 @@ async fn main() -> Result<()> { DELEGATION_MANAGER_ADDRESS, AVS_DIRECTORY_ADDRESS, "https://ethereum-holesky.blockpi.network/v1/rpc/public".to_string(), - ); + ) + .await; // A new ElChainWriter instance let el_writer = ELChainWriter::new( DELEGATION_MANAGER_ADDRESS, @@ -75,7 +76,8 @@ async fn main() -> Result<()> { el_chain_reader, "https://ethereum-holesky.blockpi.network/v1/rpc/public".to_string(), "bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8".to_string(), - ); + ) + .await; let wallet = PrivateKeySigner::from_str( "bead471191bea97fc3aeac36c9d74c895e8a6242602e144e43152f96219e96e8", diff --git a/examples/info-operator-service/examples/get_operator_info.rs b/examples/info-operator-service/examples/get_operator_info.rs index 71cf9bed..c88e3782 100644 --- a/examples/info-operator-service/examples/get_operator_info.rs +++ b/examples/info-operator-service/examples/get_operator_info.rs @@ -85,7 +85,8 @@ pub async fn register_operator(pvt_key: &str, bls_key: &str, http_endpoint: &str delegation_manager_address, avs_directory_address, http_endpoint.to_owned(), - ); + ) + .await; let el_chain_writer = ELChainWriter::new( delegation_manager_address, @@ -94,7 +95,8 @@ pub async fn register_operator(pvt_key: &str, bls_key: &str, http_endpoint: &str el_chain_reader, http_endpoint.to_string(), pvt_key.to_string(), - ); + ) + .await; let operator_details = Operator { address: signer.address(), From 083a49e7fa8fa638e13f640455fb1923c4132eac Mon Sep 17 00:00:00 2001 From: Pablo Deymonnaz Date: Thu, 19 Dec 2024 18:43:14 -0300 Subject: [PATCH 20/21] cargo.toml --- Cargo.lock | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b4c405d..3ae20696 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6065,8 +6065,9 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-bls-bn254" -version = "0.2.0" -source = "git+https://github.com/Layr-Labs/rust-bls-bn254?rev=ce3313f#ce3313feb61b0512d4c65a6458aca08ccbc8ced2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84ab37c09dbee7ec3b610ecd703c6a79708aef66d52052ee7bfec0bbb9e7a8cd" dependencies = [ "aes", "ark-bn254 0.5.0", From 60c27432813b8a28db1efe663692d38410761538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Gr=C3=BCner?= <47506558+MegaRedHand@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:56:16 -0300 Subject: [PATCH 21/21] chore: regenerate lockfile --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index c8c5661c..4ac87dce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2823,7 +2823,7 @@ dependencies = [ [[package]] name = "eigen-telemetry" -version = "0.1.1" +version = "0.1.2" dependencies = [ "posthog-rs", ]