Privasys
Privasys Immutable Ledger

Overview

An authenticated database for confidential applications written in Go. One 32-byte root attests the whole dataset, SQL runs on top, and history can be audited and then genuinely erased.

Privasys Immutable Ledger is an open-source Go library that gives a confidential application a database it can prove. Data lives in a versioned sparse Merkle tree, so a single 32-byte root attests the entire logical state. Every read is verified against that root before the application sees it, every commit produces a new immutable version, and any key comes with a compact proof of presence or absence that anyone can check against the root alone.

On top of the store sits a MySQL-dialect SQL engine, so applications keep working with tables, joins and transactions while the root attests the whole database. An optional history chain lets an auditor verify the complete sequence of states, sign it, and then prune it, so deleted data is physically removed on a schedule a data-protection officer can write into a policy.

The library lives at github.com/Privasys/immutable-ledger under the AGPL-3.0 licence. Version 1.0.0 is the first stable release.

Where it fits

Most confidential workloads on Privasys run as containers inside attested confidential VMs on Enclave OS (Virtual), with their data on a LUKS-encrypted volume. Disk encryption keeps the data confidential. Immutable Ledger adds the other half: proof that the data coming back is complete and current, and a root a customer's auditor can check.

It is the Go counterpart of the Merkle store inside Enclave OS (Mini). The commitment scheme, record encodings and proof format are byte-identical across the two implementations: a Go store in a confidential VM and an SGX enclave sharing the same commitment key produce the same root for the same logical data, and proofs verify across implementations. A compatibility suite whose vectors are generated by the Rust implementation enforces this on every build.

ComponentLanguageRuns inUse it for
Merkle storeRustSGX enclavesAuthenticated state inside an Enclave OS (Mini) app
Enclave ClusterRustSGX enclavesThe same store, replicated through attested consensus
Immutable LedgerGoContainers in confidential VMsAuthenticated key-value data and SQL inside an application process

What you get

  • Verified reads that fail closed. A value reaches the application only after every node on its path hashes up to the in-memory root. Stale data, dropped keys and resurrected deletes surface as errors.
  • One root for the whole dataset. The root commits to keyed hashes of the logical data, independently of how bytes are stored, so replicas compare entire datasets as one (version, root) pair.
  • Proofs anyone can check. Inclusion and absence proofs verify with a pure function against the root, with no access to the store, the VM or Privasys.
  • Atomic, versioned commits. A batch of writes lands as one atomic backend write and one new immutable version. Older versions stay readable until pruned.
  • SQL over the ledger. Tables, joins, aggregation, window functions, CTEs, secondary indexes and multi-statement transactions, with rows stored as ordinary ledger entries. See SQL.
  • Auditable history with bounded erasure. The history chain makes the live root commit to every earlier root. Audit, sign, prune. See Auditable History.
  • A small dependency footprint. The core ledger package uses only the Go standard library. The production storage backend uses Pebble and the SQL layer uses go-mysql-server, both permissively licensed.

In-process by design

The library is embedded in the application process and opens no network listener. For a confidential application this is the shape that keeps the guarantees intact. Attestation proves which program is running, and every request reaches the data through that program's own business logic, consent checks and disclosure rules. The answers it gives are backed by the same root the attestation describes. The attested application stays the only way in to its data.

Packages

PackagePurposeDependencies
ledgerThe authenticated store: commits, verified reads, proofs, versions, pruning, history chainGo standard library only
backend/pebbleProduction storage backend over PebblePebble (BSD-3-Clause)
sqlledgerMySQL-dialect SQL over the ledgergo-mysql-server and vitess (Apache-2.0)

Next steps

  • Authenticated Store: the Merkle core, keys, proofs and the freshness model.
  • SQL: running SQL over the ledger, transactions and verified row reads.
  • Auditable History: the history chain and the audit, sign, prune workflow.
  • Performance: measured figures and build requirements.
Edit on GitHub