feat: Implement new synchronization state management and deterministic head sorting, replacing the old vector clock module.

This commit is contained in:
2025-12-22 03:42:15 +01:00
parent 4761501ec9
commit 1943e06509
5 changed files with 606 additions and 58 deletions
+4 -4
View File
@@ -4,7 +4,7 @@
//! - **Node**: Identity with Ed25519 keypair
//! - **SigChain**: Append-only cryptographically signed log
//! - **Entry**: Atomic operations in the log
//! - **VectorClock**: Causality tracking for reconciliation
//! - **SyncState**: Per-author sequence tracking for reconciliation
//! - **HLC**: Hybrid Logical Clock for ordering
//! - **Clock**: Time abstraction for testability
//! - **Proto**: Generated protobuf types from lattice.proto
@@ -16,7 +16,7 @@
pub mod node;
pub mod sigchain;
pub mod entry;
pub mod vector_clock;
pub mod sync_state;
pub mod hlc;
pub mod clock;
pub mod proto;
@@ -33,12 +33,12 @@ pub const MAX_ENTRY_SIZE: usize = 16 * 1024 * 1024;
pub use node::Node;
pub use sigchain::SigChain;
pub use entry::Entry;
pub use vector_clock::VectorClock;
pub use sync_state::{SyncState, AuthorInfo, MissingRange};
pub use hlc::HLC;
pub use clock::{Clock, SystemClock, MockClock};
pub use data_dir::DataDir;
pub use signed_entry::{EntryBuilder, sign_entry, verify_signed_entry, hash_signed_entry};
pub use log::{append_entry, read_entries, LogReader};
pub use log::{append_entry, read_entries, read_entries_after, LogReader};
pub use store::Store;
pub use meta_store::MetaStore;
pub use proto::HeadInfo;