1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! State-commit aggregation pipeline.
//!
//! Lockstep 120s BLS-aggregated `commitStateRoot` submission per chain. The
//! orchestrator runs as a background task spawned by [`crate::Aggregator`],
//! reading `(currentSequenceNo, currentStateRoot, lastTimestamp)` fresh from
//! `StateCommitRegistry` each tick and rebuilding the proposal from scratch.
//!
//! See `docs/STATE_TREE_ARCHITECTURE.md` and `docs/PRIVATE_DATA_STORAGE.md`
//! §6 (Commit Protocol) for the protocol-level specification.
//!
//! ## Track 1 scope (NEWT-1115)
//!
//! - `Pcr0Provider` trait + `StubPcr0Provider` (dev-only) live in
//! [`newton_core::pcr0_provider`] so both this crate and the
//! operator can consume the trait without an `operator → aggregator`
//! crate cross-edge. Re-exported here for ergonomic call sites.
//! - [`error`] — `StateCommitError` mirroring all typed `IStateRootCommittable`
//! reverts plus `is_poison()` classification per
//! `.claude/rules/lessons.md` "State-commit registry reverts classify as
//! poison." `from_chainio()` translates `ChainIoError` → `StateCommitError`.
//! - [`registry_view`] — `RegistryView` value snapshot and `RegistryReader`
//! trait. `OnchainRegistryReader<P, N>` is the production impl.
//! - [`proposal`] — `build_state_commit()` constructs a `StateCommit` from a
//! fresh registry view and applies the same off-chain pre-submit guards the
//! registry enforces on-chain.
//! - [`aggregator`] — `StateCommitAggregator` collects BLS G2 partial sigs,
//! checks quorum, and returns an ABI-encoded `BN254Certificate`.
//! - [`operator_client`] — `StateCommitOperatorClient` trait (Prepare/Commit
//! two-phase RPC surface).
//! - [`operator_client_http`] — `HttpStateCommitOperatorClient` production
//! JSON-RPC implementation over `reqwest`, sharing wire schemas with the
//! operator handler via [`newton_core::rpc::state_commit`].
//! - [`orchestrator`] — `StateCommitOrchestrator` drives the 120s tick loop.
//! Wired into `Aggregator::start()` via `tokio::spawn` in task #131.
pub use ;
pub use ;
pub use ;
pub use ;
pub use HttpStateCommitOperatorClient;
pub use ;
pub use ;
pub use ;
pub use ;
pub use StubPcr0Provider;
pub use StubOperatorSetSnapshotReader;