Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Oct 7, 2024
1 parent 803443e commit a361516
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 14 deletions.
5 changes: 2 additions & 3 deletions packages/ciphernode/aggregator/src/publickey_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Handler<KeyshareCreated> for PublicKeyAggregator {
if let PublicKeyAggregatorState::Computing { keyshares } = &act.state {
ctx.notify(ComputeAggregate {
keyshares: keyshares.clone(),
e3_id
e3_id,
})
}

Expand Down Expand Up @@ -207,12 +207,11 @@ impl Handler<NotifyNetwork> for PublicKeyAggregator {
let event = EnclaveEvent::from(PublicKeyAggregated {
pubkey: msg.pubkey.clone(),
e3_id: msg.e3_id.clone(),
nodes: OrderedSet::from(nodes)
nodes: OrderedSet::from(nodes),
});
act.bus.do_send(event);
Ok(())
}),
)
}
}

2 changes: 1 addition & 1 deletion packages/ciphernode/core/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pub struct DecryptionshareCreated {
pub struct PublicKeyAggregated {
pub pubkey: Vec<u8>,
pub e3_id: E3id,
pub nodes: OrderedSet<String>
pub nodes: OrderedSet<String>,
}

#[derive(Message, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
Expand Down
7 changes: 5 additions & 2 deletions packages/ciphernode/evm/src/ciphernode_registry_sol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ impl CiphernodeRegistrySolReader {
contract_address: Address,
rpc_url: &str,
) -> Result<Self> {

let provider = create_readonly_provider(rpc_url).await?;

Ok(Self {
Expand Down Expand Up @@ -155,7 +154,11 @@ impl Actor for CiphernodeRegistrySolReader {

pub struct CiphernodeRegistrySol;
impl CiphernodeRegistrySol {
pub async fn attach(bus: Addr<EventBus>, rpc_url: &str, contract_address: Address) -> Result<()> {
pub async fn attach(
bus: Addr<EventBus>,
rpc_url: &str,
contract_address: Address,
) -> Result<()> {
CiphernodeRegistrySolReader::attach(bus.clone(), rpc_url, contract_address).await?;
Ok(())
}
Expand Down
1 change: 0 additions & 1 deletion packages/ciphernode/evm/src/enclave_sol_reader.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::helpers::{self, create_readonly_provider, ReadonlyProvider};
use actix::prelude::*;
use actix::{Addr, Recipient};
Expand Down
2 changes: 1 addition & 1 deletion packages/ciphernode/evm/src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use alloy::{
transports::BoxTransport,
};
use anyhow::{Context, Result};
use enclave_core::{EnclaveErrorType, EnclaveEvent, BusError};
use enclave_core::{BusError, EnclaveErrorType, EnclaveEvent};
use futures_util::stream::StreamExt;

pub async fn stream_from_evm(
Expand Down
8 changes: 4 additions & 4 deletions packages/ciphernode/evm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
mod enclave_sol;
mod ciphernode_registry_sol;
mod registry_filter_sol;
pub mod helpers;
mod enclave_sol;
mod enclave_sol_reader;
mod enclave_sol_writer;
pub mod helpers;
mod registry_filter_sol;

pub use ciphernode_registry_sol::*;
pub use enclave_sol::*;
pub use enclave_sol_reader::*;
pub use enclave_sol_writer::*;
pub use ciphernode_registry_sol::*;
pub use registry_filter_sol::*;
6 changes: 5 additions & 1 deletion packages/ciphernode/evm/src/registry_filter_sol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ pub async fn publish_committee(

pub struct RegistryFilterSol;
impl RegistryFilterSol {
pub async fn attach(bus: Addr<EventBus>, rpc_url: &str, contract_address: Address) -> Result<()> {
pub async fn attach(
bus: Addr<EventBus>,
rpc_url: &str,
contract_address: Address,
) -> Result<()> {
RegistryFilterSolWriter::attach(bus.clone(), rpc_url, contract_address).await?;
Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use data::Data;
use enclave_core::{
CiphernodeAdded, CiphernodeSelected, CiphertextOutputPublished, DecryptionshareCreated, E3Requested, E3id, EnclaveEvent, EventBus, GetHistory, KeyshareCreated, OrderedSet, PlaintextAggregated, PublicKeyAggregated, ResetHistory, Seed
CiphernodeAdded, CiphernodeSelected, CiphertextOutputPublished, DecryptionshareCreated,
E3Requested, E3id, EnclaveEvent, EventBus, GetHistory, KeyshareCreated, OrderedSet,
PlaintextAggregated, PublicKeyAggregated, ResetHistory, Seed,
};
use fhe::{setup_crp_params, ParamsWithCrp, SharedRng};
use logger::SimpleLogger;
Expand Down

0 comments on commit a361516

Please sign in to comment.