alderconfidential DA on Solana
Core Concepts

Tunable Coded Distributed Arrays

Systematic 2D Reed-Solomon encoding over GF(256), matrix geometry, and tunable retention depth d = 1..4.

Alder encodes every encrypted blob into a Tunable Coded Distributed Array (TCDA), adapted from Minh, Huu, and Tran (arXiv:2610.22508 and arXiv:2606.16200). Instead of replicating the full ciphertext on every DA node, ciphertext is split into a k x k matrix, extended to 2k x 2k via 2D Reed-Solomon coding over GF(256), and assigned to bonded nodes at a publisher-chosen retention depth d.

Finite Field and Systematic 2D Reed-Solomon

Both @alder/sdk (backend/packages/sdk/src/tcda.ts) and the backend encoder (backend/src/crypto/tcda.ts) operate over GF(256) with the standard irreducible polynomial x^8 + x^4 + x^3 + x^2 + 1 (0x11d).

  1. Data quadrant (`k x k`): The length-prefixed ciphertext is partitioned into k * k equal-sized cells of 32..512 bytes each (MAX_CELL_BYTES = 512 enforced on chain so any cell opening fits in a Solana transaction). Valid k values are integers in 2..16, with n = 2 * k (4..32). Both @alder/sdk and anchor_blob reject any shape outside 2 <= k <= 16 and n == 2 * k (AlderError::InvalidCodingShape, code 6010).
  2. Row extension (`k -> 2k`): Each of the k data rows is extended from k symbols to n = 2k symbols using systematic Lagrange interpolation at evaluation points 1..k (data) and k+1..2k (parity).
  3. Column extension (`k -> 2k`): Each of the n resulting columns (containing k symbols) is extended to n = 2k symbols using the same systematic Reed-Solomon vector encoder, producing n * n total coded cells (4 * k^2).

Codeword Verification and Erasure Tolerance

Before anchoring a blob, the API runs verifyTcdaCodeword(cells, k, n) to confirm every row and column parity symbol matches the systematic GF(256) Reed-Solomon encoding of the k x k data quadrant.

Because every row and every column is an (n, k) Reed-Solomon codeword with n = 2k:

  • Any k cells out of 2k along a row reconstruct the entire row, and any k cells out of 2k along a column reconstruct the entire column.
  • decodeTcda deduplicates coordinates and runs iterative row + column passes until all k x k data cells are recovered, handling both row-sparse and column-sparse erasure patterns (including 100% parity-only recovery).
  • reconstructBlob verifies hashCell(row, col, raw) on every fetched cell before passing valid cells into decodeTcda, filtering out corrupted cells before decoding.

Tunable Retention Depth (d = 1..4)

Retention depth d controls how many bonded DA nodes hold copies of each coded cell shard. anchor_blob enforces 1 <= retention_depth <= 4 (AlderError::InvalidRetentionDepth, code 6008).

Retention Depth dShard Copies per CellStorage OverheadTypical Workload
d = 11x coded cell custodyLowest fee and node storageLong-term encrypted archival blobs
d = 2 (default)2x coded cell custodyBalanced fee and redundancyStandard Privacy Rings state diffs and rollup batches
d = 33x coded cell custodyHigher redundancy, faster parallel samplingActive confidential orderbooks and AI inference state
d = 44x coded cell custodyMaximum redundancy and lowest retrieval tail latencyHot institutional settlement state

Availability Fee Formula

The backend computes the escrowed SOL availability fee in computeAvailabilityFeeLamports (backend/src/crypto/tcda.ts) as a deterministic function of ciphertext size, retention depth d, and expiry duration in slots:

ts
const baseLamports = 1_000_000n // 0.001 SOL base
const kb = BigInt(Math.max(1, Math.ceil(payloadSizeBytes / 1024)))
const depthMultiplier = BigInt(Math.max(1, Math.min(4, retentionDepth)))
const epochFactor = BigInt(Math.max(1, Math.ceil(expirySlots / 216_000)))
const feeLamports = baseLamports + kb * 15_000n * depthMultiplier * epochFactor
  • Default expirySlots is 216,000 (1 epoch factor). Valid range in AnchorBlobBuildRequest is 100..50,000,000 slots; on chain, anchor_blob enforces expiry_slots >= 100.
  • Higher retention depth scales the per-KB storage term linearly (1x to 4x).

Matrix Commitments

Every cell at (row, col) is hashed with domain separation:

text
cellHash = SHA-256("alder:cell:v1:" || row || ":" || col || ":" || cellBytes)

Binary Merkle trees using SHA-256("alder:node:" || left || ":" || right) are built over:

  • Each row 0..n-1 to produce rowCommitments (n hashes)
  • Each column 0..n-1 to produce colCommitments (n hashes)
  • All n * n cell hashes in row-major order to produce the 32-byte commitmentRoot anchored on Solana in BlobRecord.commitment_root

Next Steps