Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
c80bbec
add event ctx
Jan 7, 2026
585378f
setup typed event
Jan 7, 2026
cfc0576
update to include option ctx
Jan 8, 2026
38418f7
remove aggregate_id in favour of data.get_aggregate_id
Jan 8, 2026
d3a3f78
tidy up data model
Jan 8, 2026
959c93d
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 8, 2026
3f186fd
add comment
Jan 8, 2026
de4dc0b
refactor
Jan 8, 2026
96077da
tidy up methods
Jan 8, 2026
a7d7f1c
tidy up names
Jan 8, 2026
25463fe
rename producer consumer vars to be clearer
Jan 8, 2026
5cc13e8
use context manager
Jan 9, 2026
b248377
add context to persistable
Jan 9, 2026
145f617
refactor persistable
Jan 9, 2026
ff4c941
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 9, 2026
47e1e7c
remove result
Jan 9, 2026
a9f939d
add auto persist to store connector
Jan 9, 2026
72602ff
update doc comments
Jan 9, 2026
4d2ccea
insert_sync_recipient()
Jan 12, 2026
96d034d
update connector
Jan 12, 2026
75f2323
add aggregate_id to event context
Jan 12, 2026
61b3171
add hlc walltime
Jan 12, 2026
ab20fbd
add writebuffer config
Jan 12, 2026
55ee6ea
add buffering based on aggregate_id
Jan 12, 2026
bdfc7a5
add comments
Jan 12, 2026
c061694
implement time-based- batching with per-aggregate delays
Jan 12, 2026
bb2f502
extract function to be able to be unit tested
Jan 12, 2026
22fcbb0
update test to ensure delay works
Jan 12, 2026
fff85a1
fix test
Jan 12, 2026
b796ce1
fix test
Jan 12, 2026
8f986df
add staging mode to persistable
Jan 14, 2026
37942d9
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 15, 2026
37e3ea0
remove unnecessary nstaging
Jan 15, 2026
2158772
revert persistable change
Jan 15, 2026
22ce1c6
add per-chain finalization times with optimized provider usage
Jan 15, 2026
3652eac
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 16, 2026
e5b8f96
feat: add optional chain_id validation to ChainConfig
Jan 16, 2026
a0b3482
replace chain delays with aggregate configuration architecture
Jan 16, 2026
a02e43f
refactor: extract build_aggregate_config_from_chains to standalone fu…
Jan 16, 2026
a8400ae
fix: resolve non-deprecation warnings
Jan 16, 2026
842f11e
refactor: remove unused AggregateConfig methods
Jan 16, 2026
6882670
refactor: rename delay functions to use aggregate terminology
Jan 16, 2026
a1ba1e6
refactor: WriteBuffer accepts AggregateConfig instead of HashMap
Jan 16, 2026
06559a2
feat: add aggregate_config accessor method and use get_or_init pattern
Jan 16, 2026
d081620
feat: add EventStoreRouter for routing events to appropriate stores
Jan 16, 2026
4eb2c44
refactor: add enumerate_path utility and update event system to suppo…
Jan 16, 2026
0621079
feat: replace Vec with HashMap for event store addresses to support i…
Jan 16, 2026
679a300
refactor: move enumerate_path utility to utils crate and simplify Has…
Jan 16, 2026
d14c6a9
headers
Jan 16, 2026
da9f9fb
refactor: add eventstore router with caching and rename eventstore fi…
Jan 16, 2026
20a69e2
remove cached prefix from eventstores for simplicity
Jan 16, 2026
2b0f1c1
refactor: move indexed ID logic to AggregateConfig
Jan 16, 2026
66478cd
refactor: simplify sequencer initialization using eventstore router
Jan 16, 2026
2cfded8
refactor: simplify aggregate config creation and improve error handling
Jan 16, 2026
3d22047
chore: add setup to build script
Jan 16, 2026
d8761c7
feat: add GetAggregateEventsAfter message handler to EventStoreRouter
Jan 17, 2026
b0f4dc9
Refactor EventStoreRouter to accept stores in constructor
Jan 17, 2026
7997a2d
remove qualifier
Jan 17, 2026
7814cdb
feat: add trap_fut function to handle async error trapping
Jan 17, 2026
a1957cc
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 17, 2026
b81ced8
Refactor EventStoreRouter methods to return typed router addresses
Jan 17, 2026
90affd1
Refactor EventSystem: remove TryFrom implementations and rename event…
Jan 17, 2026
f4ad5f4
feat: implement event sync via libp2p request-response protocol
Jan 18, 2026
5084210
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 18, 2026
47c5882
add e3-sync crate with basic sync actor and bootstrap handler
Jan 19, 2026
0ae231d
add header
Jan 19, 2026
e0022d4
add header
Jan 20, 2026
2598912
add sync to Dockerfile
Jan 20, 2026
8b5702c
Add Log event
Jan 21, 2026
9b3a409
rename evm event reader to evm interface
Jan 22, 2026
302d7cf
rename events
Jan 22, 2026
79f93a8
rename EvmInterface -> EvmReadInterface
Jan 22, 2026
b7b9bf7
refactor evm events
Jan 24, 2026
ec5322b
evm events are working
Jan 25, 2026
9011ac9
move fake sync actor out of the way
Jan 25, 2026
0c250e3
create chain builder
Jan 26, 2026
5d1675f
events are now in order
Jan 26, 2026
3212244
test sync_gateway
Jan 26, 2026
9d65a1a
rename sync_gateway to evm_chain_gateway and update module exports
Jan 26, 2026
e7ed923
remove launch coordinator
Jan 26, 2026
38f7d4c
fix headers
Jan 26, 2026
15b358c
remove bad package
Jan 26, 2026
9d07673
add header
Jan 26, 2026
a3933d8
apply EvmSystem to CiphernodeBuilder
Jan 26, 2026
72e4ff7
Merge branch 'main' into ry/1050-event-ids
Jan 26, 2026
b6b68da
add scaffolding to sync
Jan 26, 2026
1d99a5b
add scaffolding to sync
Jan 26, 2026
a19f73c
header
Jan 26, 2026
c8063c7
add evm event config with deploy block validation - breaking change t…
Jan 27, 2026
67a3051
refactor contract address handling to use typed Address instead of st…
Jan 27, 2026
aae61bd
refactor: integrate net package into ciphernode builder
Jan 27, 2026
f67d267
handle sync evm events in synchronizer
Jan 27, 2026
ea51640
add better comment
Jan 27, 2026
4dddf82
Merge branch 'main' into ry/1050-event-ids
Jan 27, 2026
34067b0
update timestamp catching
Jan 27, 2026
eacb2a4
fix build errors
Jan 27, 2026
af074cd
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 27, 2026
2b63317
fix event forwarding to sync
Jan 27, 2026
eb7c2d6
evm_reader -> evm_parser
Jan 27, 2026
8cddbaf
update timestamp max diff
Jan 28, 2026
ee7e9b6
add test
Jan 28, 2026
5e0d627
Merge branch 'main' into ry/1050-event-ids
Jan 29, 2026
ebe9faa
fix bad merge
Jan 29, 2026
cf1af4d
fix bad test
Jan 29, 2026
f730adb
ensure all non-future ctx.notify() calls run synchronously
Jan 29, 2026
7e10b0d
refactor problematic handler causing issues with sync
Jan 29, 2026
730d47c
wait for E3Requested to be received before dispatching CommitteFinalized
Jan 29, 2026
39662f5
remove notify
Jan 29, 2026
172ab1e
revert notify sync to just use notify for async handlers
Jan 29, 2026
94819cc
rename functions
Jan 29, 2026
2bd71b7
do_send -> try_send
Jan 29, 2026
c1b7195
fix notify on future handler
Jan 29, 2026
68f1d97
Merge branch 'main' into ry/1050-event-ids
ryardley Jan 29, 2026
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 change: 0 additions & 1 deletion .husky/pre-commit

This file was deleted.

50 changes: 50 additions & 0 deletions Cargo.lock

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

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ members = [
"crates/sdk",
"crates/sortition",
"crates/support-scripts",
"crates/sync",
"crates/test-helpers",
"crates/tests",
"crates/trbfv",
Expand All @@ -51,6 +52,8 @@ exclude = [
]
resolver = "3"
msrv = "1.86.0"

[workspace.metadata.release]
shared-version = true
pre-release-commit-message = "chore: Release {{crate_name}} v{{version}}"
pre-release-replacements = [
Expand Down Expand Up @@ -98,6 +101,7 @@ e3-sortition = { version = "0.1.7", path = "./crates/sortition" }
e3-program-server = { version = "0.1.7", path = "./crates/program-server" }
e3-polynomial = { version = "0.1.7", path = "./crates/polynomial" }
e3-support-scripts = { version = "0.1.7", path = "./crates/support-scripts" }
e3-sync = { version = "0.1.7", path = "./crates/sync" }
e3-test-helpers = { version = "0.1.7", path = "./crates/test-helpers" }
e3-tests = { version = "0.1.7", path = "./crates/tests" }
e3-trbfv = { version = "0.1.7", path = "./crates/trbfv" }
Expand Down Expand Up @@ -195,6 +199,8 @@ libp2p = { version = "=0.54.1", features = [
"ping",
"quic",
"tokio",
"request-response",
"cbor"
]}
zeroize = "=1.8.1"

1 change: 1 addition & 0 deletions crates/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ COPY crates/safe/Cargo.toml ./safe/Cargo.toml
COPY crates/sdk/Cargo.toml ./sdk/Cargo.toml
COPY crates/sortition/Cargo.toml ./sortition/Cargo.toml
COPY crates/support-scripts/Cargo.toml ./support-scripts/Cargo.toml
COPY crates/sync/Cargo.toml ./sync/Cargo.toml
COPY crates/test-helpers/Cargo.toml ./test-helpers/Cargo.toml
COPY crates/tests/Cargo.toml ./tests/Cargo.toml
COPY crates/trbfv/Cargo.toml ./trbfv/Cargo.toml
Expand Down
5 changes: 3 additions & 2 deletions crates/aggregator/src/committee_finalizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use e3_events::{
prelude::*, trap, BusHandle, CommitteeFinalizeRequested, CommitteeRequested, EType,
EnclaveEvent, EnclaveEventData, EventType, Shutdown,
};
use e3_utils::NotifySync;
use std::collections::HashMap;
use std::time::Duration;
use tracing::{error, info};
Expand Down Expand Up @@ -48,8 +49,8 @@ impl Handler<EnclaveEvent> for CommitteeFinalizer {
type Result = ();
fn handle(&mut self, msg: EnclaveEvent, ctx: &mut Self::Context) -> Self::Result {
match msg.into_data() {
EnclaveEventData::CommitteeRequested(data) => ctx.notify(data),
EnclaveEventData::Shutdown(data) => ctx.notify(data),
EnclaveEventData::CommitteeRequested(data) => self.notify_sync(ctx, data),
EnclaveEventData::Shutdown(data) => self.notify_sync(ctx, data),
_ => (),
}
}
Expand Down
28 changes: 18 additions & 10 deletions crates/aggregator/src/publickey_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ use e3_events::{
prelude::*, BusHandle, Die, E3id, EnclaveEvent, EnclaveEventData, KeyshareCreated, OrderedSet,
PublicKeyAggregated, Seed,
};
use e3_events::{trap, EType};
use e3_fhe::{Fhe, GetAggregatePublicKey};
use e3_utils::ArcBytes;
use e3_utils::NotifySync;
use std::sync::Arc;
use tracing::{error, info};

Expand Down Expand Up @@ -139,11 +141,14 @@ impl Actor for PublicKeyAggregator {
impl Handler<EnclaveEvent> for PublicKeyAggregator {
type Result = ();
fn handle(&mut self, msg: EnclaveEvent, ctx: &mut Self::Context) -> Self::Result {
match msg.into_data() {
EnclaveEventData::KeyshareCreated(data) => ctx.notify(data),
EnclaveEventData::E3RequestComplete(_) => ctx.notify(Die),
_ => (),
}
trap(EType::KeyGeneration, &self.bus.clone(), || {
match msg.into_data() {
EnclaveEventData::KeyshareCreated(data) => self.notify_sync(ctx, data)?,
EnclaveEventData::E3RequestComplete(_) => self.notify_sync(ctx, Die),
_ => (),
};
Ok(())
});
}
}

Expand All @@ -163,10 +168,13 @@ impl Handler<KeyshareCreated> for PublicKeyAggregator {
self.add_keyshare(pubkey, node)?;

if let Some(PublicKeyAggregatorState::Computing { keyshares, .. }) = &self.state.get() {
ctx.notify(ComputeAggregate {
keyshares: keyshares.clone(),
e3_id,
})
self.notify_sync(
ctx,
ComputeAggregate {
keyshares: keyshares.clone(),
e3_id,
},
)?
}

Ok(())
Expand Down Expand Up @@ -215,6 +223,6 @@ impl Handler<ComputeAggregate> for PublicKeyAggregator {
impl Handler<Die> for PublicKeyAggregator {
type Result = ();
fn handle(&mut self, _: Die, ctx: &mut Self::Context) -> Self::Result {
ctx.stop()
ctx.stop();
}
}
20 changes: 12 additions & 8 deletions crates/aggregator/src/threshold_plaintext_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use e3_trbfv::{
TrBFVResponse,
};
use e3_utils::utility_types::ArcBytes;
use e3_utils::NotifySync;
use tracing::{debug, error, info, trace};

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
Expand Down Expand Up @@ -263,8 +264,8 @@ impl Handler<EnclaveEvent> for ThresholdPlaintextAggregator {
fn handle(&mut self, msg: EnclaveEvent, ctx: &mut Self::Context) -> Self::Result {
match msg.into_data() {
EnclaveEventData::DecryptionshareCreated(data) => ctx.notify(data),
EnclaveEventData::E3RequestComplete(_) => ctx.notify(Die),
EnclaveEventData::ComputeResponse(data) => ctx.notify(data),
EnclaveEventData::E3RequestComplete(_) => self.notify_sync(ctx, Die),
EnclaveEventData::ComputeResponse(data) => self.notify_sync(ctx, data),
_ => (),
}
}
Expand Down Expand Up @@ -318,12 +319,15 @@ impl Handler<DecryptionshareCreated> for ThresholdPlaintextAggregator {
..
})) = act.state.get()
{
ctx.notify(ComputeAggregate {
shares: shares.clone(),
ciphertext_output: ciphertext_output.clone(),
threshold_m,
threshold_n,
})
act.notify_sync(
ctx,
ComputeAggregate {
shares: shares.clone(),
ciphertext_output: ciphertext_output.clone(),
threshold_m,
threshold_n,
},
)
}

Ok(())
Expand Down
2 changes: 2 additions & 0 deletions crates/ciphernode-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ e3-evm.workspace = true
e3-fhe.workspace = true
e3-keyshare.workspace = true
e3-multithread.workspace = true
e3-net.workspace = true
e3-request.workspace = true
e3-sortition.workspace = true
e3-sync.workspace = true
e3-trbfv.workspace = true
e3-utils.workspace = true
rayon.workspace = true
Expand Down
16 changes: 15 additions & 1 deletion crates/ciphernode-builder/src/ciphernode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,22 @@
// or FITNESS FOR A PARTICULAR PURPOSE.

use actix::Addr;
use anyhow::Result;
use e3_data::{DataStore, InMemStore, StoreAddr};
use e3_events::{BusHandle, EnclaveEvent, HistoryCollector};
use tokio::task::JoinHandle;

#[derive(Clone, Debug)]
/// A Sharable handle to a Ciphernode. NOTE: clones are available for use in the CiphernodeSystem
/// but they cannot await the task.
#[derive(Debug)]
pub struct CiphernodeHandle {
Comment thread
ryardley marked this conversation as resolved.
pub address: String,
pub store: DataStore,
pub bus: BusHandle,
pub history: Option<Addr<HistoryCollector<EnclaveEvent>>>,
pub errors: Option<Addr<HistoryCollector<EnclaveEvent>>>,
pub peer_id: String,
pub join_handle: JoinHandle<Result<()>>,
}

impl CiphernodeHandle {
Expand All @@ -24,13 +30,17 @@ impl CiphernodeHandle {
bus: BusHandle,
history: Option<Addr<HistoryCollector<EnclaveEvent>>>,
errors: Option<Addr<HistoryCollector<EnclaveEvent>>>,
peer_id: String,
join_handle: JoinHandle<Result<()>>,
) -> Self {
Self {
address,
store,
bus,
history,
errors,
peer_id,
join_handle,
}
}

Expand All @@ -54,6 +64,10 @@ impl CiphernodeHandle {
&self.store
}

pub fn split(self) -> (BusHandle, JoinHandle<Result<()>>) {
(self.bus, self.join_handle)
}
Comment thread
ryardley marked this conversation as resolved.

pub fn in_mem_store(&self) -> Option<&Addr<InMemStore>> {
let addr = self.store.get_addr();
if let StoreAddr::InMem(ref store) = addr {
Expand Down
Loading
Loading