diff --git a/packages/ciphernode/aggregator/src/publickey_aggregator.rs b/packages/ciphernode/aggregator/src/publickey_aggregator.rs index c0ee0c86..05e5d3cd 100644 --- a/packages/ciphernode/aggregator/src/publickey_aggregator.rs +++ b/packages/ciphernode/aggregator/src/publickey_aggregator.rs @@ -43,7 +43,7 @@ pub struct PublicKeyAggregator { sortition: Addr, e3_id: E3id, state: PublicKeyAggregatorState, - src_chain_id: u64 + src_chain_id: u64, } /// Aggregate PublicKey for a committee of nodes. This actor listens for KeyshareCreated events @@ -60,7 +60,7 @@ impl PublicKeyAggregator { e3_id: E3id, threshold_m: usize, seed: Seed, - src_chain_id: u64 + src_chain_id: u64, ) -> Self { PublicKeyAggregator { fhe, @@ -211,7 +211,7 @@ impl Handler for PublicKeyAggregator { pubkey: msg.pubkey.clone(), e3_id: msg.e3_id.clone(), nodes: OrderedSet::from(nodes), - src_chain_id: act.src_chain_id + src_chain_id: act.src_chain_id, }); act.bus.do_send(event); Ok(()) diff --git a/packages/ciphernode/core/src/events.rs b/packages/ciphernode/core/src/events.rs index cd38512e..e6b281e3 100644 --- a/packages/ciphernode/core/src/events.rs +++ b/packages/ciphernode/core/src/events.rs @@ -310,7 +310,7 @@ pub struct PublicKeyAggregated { pub pubkey: Vec, pub e3_id: E3id, pub nodes: OrderedSet, - pub src_chain_id: u64 + pub src_chain_id: u64, } #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -320,12 +320,11 @@ pub struct E3Requested { pub threshold_m: usize, pub seed: Seed, pub params: Vec, - pub src_chain_id: u64 - // threshold: usize, // TODO: - // computation_type: ??, // TODO: - // execution_model_type: ??, // TODO: - // input_deadline: ??, // TODO: - // availability_duration: ??, // TODO: + pub src_chain_id: u64, // threshold: usize, // TODO: + // computation_type: ??, // TODO: + // execution_model_type: ??, // TODO: + // input_deadline: ??, // TODO: + // availability_duration: ??, // TODO: } #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -347,7 +346,7 @@ pub struct CiphertextOutputPublished { pub struct PlaintextAggregated { pub e3_id: E3id, pub decrypted_output: Vec, - pub src_chain_id: u64 + pub src_chain_id: u64, } #[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] diff --git a/packages/ciphernode/evm/src/ciphernode_registry_sol.rs b/packages/ciphernode/evm/src/ciphernode_registry_sol.rs index d783bd9d..efc2352b 100644 --- a/packages/ciphernode/evm/src/ciphernode_registry_sol.rs +++ b/packages/ciphernode/evm/src/ciphernode_registry_sol.rs @@ -76,7 +76,7 @@ impl From for EnclaveEvent { } } -fn extractor(data: &LogData, topic: Option<&B256>, _:u64) -> Option { +fn extractor(data: &LogData, topic: Option<&B256>, _: u64) -> Option { match topic { Some(&CiphernodeAdded::SIGNATURE_HASH) => { let Ok(event) = CiphernodeAdded::decode_log_data(data, true) else { diff --git a/packages/ciphernode/evm/src/enclave_sol_reader.rs b/packages/ciphernode/evm/src/enclave_sol_reader.rs index 4142bf83..93d2d186 100644 --- a/packages/ciphernode/evm/src/enclave_sol_reader.rs +++ b/packages/ciphernode/evm/src/enclave_sol_reader.rs @@ -50,7 +50,7 @@ impl From for enclave_core::E3Requested { threshold_m: value.0.e3.threshold[0] as usize, seed: value.0.e3.seed.into(), e3_id: value.0.e3Id.to_string().into(), - src_chain_id: value.1 + src_chain_id: value.1, } } } diff --git a/packages/ciphernode/evm/src/helpers.rs b/packages/ciphernode/evm/src/helpers.rs index 5503fa99..81a2e7d6 100644 --- a/packages/ciphernode/evm/src/helpers.rs +++ b/packages/ciphernode/evm/src/helpers.rs @@ -16,13 +16,14 @@ use anyhow::{Context, Result}; use enclave_core::{BusError, EnclaveErrorType, EnclaveEvent}; use futures_util::stream::StreamExt; -pub async fn stream_from_evm( +pub async fn stream_from_evm( provider: WithChainId

, filter: Filter, bus: Recipient, extractor: fn(&LogData, Option<&B256>, u64) -> Option, ) { - match provider.get_provider() + match provider + .get_provider() .subscribe_logs(&filter) .await .context("Could not subscribe to stream") @@ -30,7 +31,8 @@ pub async fn stream_from_evm( Ok(subscription) => { let mut stream = subscription.into_stream(); while let Some(log) = stream.next().await { - let Some(event) = extractor(log.data(), log.topic0(),provider.get_chain_id()) else { + let Some(event) = extractor(log.data(), log.topic0(), provider.get_chain_id()) + else { continue; }; bus.do_send(event); diff --git a/packages/ciphernode/router/src/hooks.rs b/packages/ciphernode/router/src/hooks.rs index 782df6a1..9e50c45a 100644 --- a/packages/ciphernode/router/src/hooks.rs +++ b/packages/ciphernode/router/src/hooks.rs @@ -104,7 +104,7 @@ impl LazyPublicKeyAggregator { data.e3_id, meta.threshold_m, meta.seed, - meta.src_chain_id + meta.src_chain_id, ) .start(), );