Lumoin.Verisync.Core 0.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Lumoin.Verisync.Core --version 0.0.7
                    
NuGet\Install-Package Lumoin.Verisync.Core -Version 0.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Lumoin.Verisync.Core" Version="0.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lumoin.Verisync.Core" Version="0.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Lumoin.Verisync.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Lumoin.Verisync.Core --version 0.0.7
                    
#r "nuget: Lumoin.Verisync.Core, 0.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Lumoin.Verisync.Core@0.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Lumoin.Verisync.Core&version=0.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Lumoin.Verisync.Core&version=0.0.7
                    
Install as a Cake Tool

<img style="display: block; margin-inline-start: auto; margin-inline-end: auto;" src="resources/lumoin-verisync-github-logo.svg" width="800" height="400" alt="Verisync project logo: A circular emblem in blue hues, two interlocking arrows forming a circular motion around the center evoking eventual convergence of replicas, followed by the wordmark 'verisync'.">

Lumoin.Verisync

A .NET stack for distributed state: conflict-free replicated data types, causal contexts, and leaderless consensus.

Main build workflow


What is Verisync?

Verisync is a .NET library for distributed state synchronization without a central coordinator: conflict-free replicated data types, causal context tracking, and leaderless consensus. The library is designed so that wallets, edge devices, and services can share, merge, and reconcile state with strong eventual consistency, while exposing causality and conflicts as first-class concepts rather than implementation details.

The core value proposition is local-first state that converges across replicas. Each replica can read and write without waiting on a quorum; merges are deterministic and side-effect-free; causal history is preserved so that downstream consumers can reason about happens-before relationships and concurrent updates. Where a subset of operations genuinely needs linearizability, a leaderless consensus register provides it without electing a leader.

Verisync is designed to be a peer of credential, identity, and graph stacks rather than a dependency of any one of them. Replica identifiers, version vectors, and causal contexts are semantic types; nothing in the public API is a raw integer counter or a stringly-typed identifier.

Libraries

Library Purpose NuGet
Lumoin.Verisync.Core Replica identity, causal contexts, CRDTs, Fast CASPaxos consensus, authenticated log, transport seam NuGet
Lumoin.Verisync.Json JSON serialization for channel messages, consensus protocol messages, and CRDT state records NuGet
Lumoin.Verisync.Cbor CBOR serialization for channel messages NuGet

Key capabilities

State-based CRDTs with property-tested merges. Grow-only and positive-negative counters (GCounter, PNCounter), last-writer-wins and multi-value registers (LwwRegister, MvRegister), an observed-remove set (OrSet), and a replicated growable array for collaborative sequences (Rga). Every merge is a join-semilattice operation (commutative, associative, idempotent), verified with property-based tests.

Causal contexts as first-class types. Version vectors, dots, dotted version vectors, and dotted-version-vector sets are semantic types rather than dictionaries of opaque keys. Happens-before, concurrency, and observed-remove semantics are properties of these types, not ad-hoc comparisons in user code.

Serializable state. Every CRDT exposes ToState/FromState over plain records a host can persist (a database row, a message table, a blob) and reload and merge later. JSON codecs ship in Lumoin.Verisync.Json, CBOR in Lumoin.Verisync.Cbor.

Set reconciliation. A rateless anti-entropy protocol exchanges coded symbols to recover only the differences between two replicas; traffic scales with the divergence, not the set size. Runs over the transport seam.

Leaderless consensus. Classic CASPaxos and Fast CASPaxos registers: linearizable read-modify-write without leader election. The fast path commits in a single round trip when uncontended; contention falls back to a classic recovery round that tallies the fast-round winner. The protocol layer is message-driven, so the same proposer and acceptor run over in-process calls, in-memory channels, or sockets.

Authenticated register and log replay. A layer above consensus for cryptographically accumulated history: entry classification, chain-integrity verification, proof validation, and state folding are injected by the application, so the layer carries any proof scheme without baking one in.

Pluggable transport. The channel seam is System.IO.Pipelines with serialization injected as delegates: length-prefixed frames over any duplex byte stream. JSON and CBOR implementations are provided; the library does not own sockets, schedulers, or clocks.

Architecture principles

Verisync follows the same data-oriented principles as the rest of the family: code is separate from immutable data, CRDTs are values rather than entities with hidden identity, and merges are pure functions. Domain types are agnostic to serialization format; encoding lives at serialization boundaries in the dedicated Lumoin.Verisync.Json and Lumoin.Verisync.Cbor packages.

Transport, persistence, and clock sources are wired through delegates rather than interfaces. The same CRDT or consensus register is tested against a synthetic in-memory transport (including a deterministic interleaving bench that explores message reorderings from a seed) and deployed against a real transport without changes at the call site.

Getting started

Install the packages relevant to your use case:

# Core primitives: CRDTs, causal contexts, consensus.
dotnet add package Lumoin.Verisync.Core

# JSON serialization for state records and protocol messages.
dotnet add package Lumoin.Verisync.Json

# CBOR serialization for channel messages.
dotnet add package Lumoin.Verisync.Cbor

Development

The codebase runs on Windows, Linux, and macOS.

Press . on the repository page to open the codebase in VS Code web editor for quick exploration.

Vulnerability disclosure

Please report suspected security vulnerabilities privately through GitHub security advisories, not through public issues.

Contributing

Open issues for bugs, suggestions, or improvements, or create pull requests. Especially welcome:

  • Convergence and commutativity tests using property-based testing.
  • New CRDT shapes or transport adapters.
  • Improvements to causal-history reasoning and delivery-interleaving test scenarios.

Acknowledgements

Work of Reuben Bond on Fast CASPaxos and the CASPaxos write-up has influenced the design of this library. Verisync's leaderless consensus follows the shape laid out there: a value-agnostic, rewritable register; the fast-round optimization that lets any proposer commit in one round trip when uncontended, recovering through a classic ballot under contention; and a message-driven acceptor/proposer split with the transport injected. The reference implementation, paper, and TLA+ model in that repository were the load-bearing guide for the ballot ordering and recovery logic.

License

See the LICENSE file for details.


Note: This library is under active development ahead of its first release. APIs may change between versions.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Lumoin.Verisync.Core:

Package Downloads
Lumoin.Verisync.Cbor

System.Formats.Cbor serialization adapters for Lumoin.Verisync message channels. Deterministic canonical CBOR for digest-stable encoding.

Lumoin.Verisync.Json

System.Text.Json serialization adapters for Lumoin.Verisync message channels and the QuePaxa consensus wire messages. AOT-safe; channel records use source-generated JsonTypeInfo.

Lumoin.Veritas.Replication

Active-active replication and distributed repair for Lumoin.Veritas: cross-replica rateless anti-entropy reconciliation that recovers the exact symmetric difference between two replicas of one dataset and converges them by idempotent repair-as-ingest, and the peer-reconciliation repair rung that heals a detected system-of-record loss from a peer. It binds the Lumoin.Verisync rateless tier to the core's host-bound sketch seams, so the transport-free core never takes a replication dependency.

Lumoin.Veritas.Database

The Veritas database facade: composes storage, SPARQL query, OWL reasoning, and the compute lane into one engine you open over data and query. The command-line, MCP, and HTTP surfaces are thin transports over it.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.16 216 11/11/2026
0.0.15 151 10/18/2026
0.0.14 154 9/15/2026
0.0.13 151 9/2/2026
0.0.12 140 9/2/2026
0.0.11 149 9/1/2026
0.0.10 235 8/23/2026
0.0.9 175 8/15/2026
0.0.8 165 8/14/2026
0.0.7 158 7/29/2026
0.0.6 169 7/13/2026
0.0.5 188 7/2/2026
0.0.4 163 6/28/2026
0.0.3 173 6/15/2026
0.0.2 159 6/11/2026
0.0.1 157 6/9/2026

Changes since version 0.0.6

Changed:
- Dependency refresh across the toolchain; no library code or wire-format changes. The packages now depend on `Lumoin.Base` 0.0.8 (from 0.0.6), and `Lumoin.Verisync.Cbor` on `System.Formats.Cbor` 10.0.10. The build moves to .NET SDK 10.0.302 and MSTest.Sdk 4.3.3; because MSTest.Sdk 4.3.x injects its own central `PackageVersion` items, the MSTest and `Microsoft.Testing.Extensions.*` pins move out of `Directory.Packages.props` and are steered through the SDK version properties in the test project. `Microsoft.CodeAnalysis.BannedApiAnalyzers` moves from the 3.12 beta line to the stable 5.6.0, the `Microsoft.Extensions.*.Testing` packages to 10.8.0, the code-coverage extension and `dotnet-coverage` tool to 18.9.0, and the CI action pins to their current releases (`actions/checkout` v7.0.1, `actions/setup-dotnet` v6.0.0, `step-security/harden-runner` v2.20.0, `NuGet/login` v1.2.0). The test suite adopts the MSTest 4.3.3 assertion surface (`Assert.AreSequenceEqual`/`AreNotSequenceEqual`/`HasCount`) in place of `CollectionAssert`.

Security:
- The pinned `System.Security.Cryptography.Xml` transitive override rises from 10.0.9 to 10.0.10, clearing the high-severity advisories published against 10.0.9 (GHSA-23rf-6693-g89p, GHSA-8q5v-6pqq-x66h, GHSA-cvvh-rhrc-wg4q, GHSA-g8r8-53c2-pm3f, GHSA-mmjf-rqrv-855v) that `NuGetAudit` fails the restore on.

See full changelog at https://github.com/lumoin/Verisync/blob/main/CHANGELOG.md.