anychain
rusta proof-of-concept blockchain used as a vehicle for studying distributed state, persistence and integrity.
the problem
this is not a project about crypto. blockchain here is a convenient pretext: it is one of the few structures where distributed state, immutability, integrity verification and consensus all show up at once, at a scale small enough to fit into a weekend of study.
what matters is what sits underneath: how you guarantee a chain has not been tampered with, how you persist state that only grows, and where exactly the boundaries between core, transport and interface belong.
architecture
a monorepo with three crates over a shared core: anychain-core (Block, Blockchain, Transaction), anychain-cli (command-line binary) and anychain-api (axum rest server).
that separation is the architectural point of the project: two completely different interfaces (a local cli and a remote http api) over exactly the same domain library, with the core unaware that either exists.
sha-256 proof-of-work with configurable difficulty, persistence via sled, chain integrity validation, structured errors with thiserror and anyhow.
as in agni, a kotlin reference implementation is preserved in history, at tag kotlin-reference.