Skip to main content

Crate xenith_sync

Crate xenith_sync 

Source
Expand description

State sync engine for xenith.

Provides SyncEngine, which orchestrates cross-chain state propagation by composing any xenith_core::MessagingTransport with a pluggable xenith_core::StateStore. Depends on xenith_core for traits and types, and optionally on xenith_read for on-chain quorum verification. Diverged state is never silently resolved — callers always decide.

use std::sync::Arc;
use xenith_core::{InMemoryStore, ReadStrategy, StateKey};
use xenith_sync::{SyncConfig, SyncEngine};
use bytes::Bytes;

let engine = SyncEngine::new(
    transport,
    Arc::new(InMemoryStore::default()),
    SyncConfig::default(),
);

See the xenith_core crate for core types and traits.

Re-exports§

pub use engine::SyncConfig;
pub use engine::SyncEngine;
pub use engine::SyncReceipt;
pub use json_store::JsonFileStore;
pub use subscription::SubscriptionHandle;

Modules§

engine
json_store
subscription