Skip to content

Repository files navigation

ModelChain

Append-only blockchain in C++20 for versioning ML models and datasets. The chain stores cryptographic hashes and metadata of ML artifacts; large weights live off-chain in a content-addressable store. Target: a trusted 3–5 node cluster that synchronizes over a coroutine-based P2P protocol.

Prerequisites (Windows 11)

  • Visual Studio 2022 with the "Desktop development with C++" workload
  • CMake 3.28 or newer
  • Git

Bootstrap

Install a local, pinned vcpkg instance and pin the dependency baseline:

./scripts/bootstrap.ps1 -VcpkgRef 2025.06.13

Omit -VcpkgRef to use the vcpkg default branch (not reproducible).

Build

./scripts/build.ps1 -Config Release

Test

./scripts/test.ps1 -Config Debug

Layout

Each library under libs/<module> is self-contained (include/, src/, CMakeLists.txt) with a single responsibility and an explicit public API:

  • serialization — zero-copy binary (de)serialization over std::span
  • crypto — SHA-256 hashing and the Hashable concept
  • storage — content-addressable store for off-chain artifacts
  • ledger — blocks, append-only Merkle tree, chain validation
  • validator — streaming chain validation via std::ranges
  • registry — MLflow-like model/version/lineage API
  • p2p — coroutine-based peer discovery and block synchronization
  • observability — structured logging and metrics

See docs/architecture.md for the single-schema diagram and docs/acceptance-criteria.md for non-functional requirements.

About

Append-only blockchain in C++20 for versioning ML models and datasets. The chain stores cryptographic hashes and metadata of ML artifacts; large weights live off-chain in a content-addressable store. Target: a trusted 3–5 node cluster that synchronizes over a coroutine-based P2P protocol.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages