Skip to content
Ephernity

§ 03 · Tier specification

The timed-ledger spectrum.

One micro-ledger primitive runs at every horizon. Each of the eight named tiers is a triple of (retention, anchoring, signature) — or supply any duration directly. Changing the tuple changes the use-case, not the codebase.


T0

Ephemeral

CPU cache

1 s
live game tick · agent scratch-state · match session
Ed25519
01/08
T1

Session

RAM / DA blob

60 s
real-time room · checkout · per-tenant working state
Ed25519
02/08
T2

Operational

SSD

1 h
operational audit trail · monitoring windows · application events
Ed25519
03/08
T3

Daily

SSD

1 d
daily rollups · event logs · analytics aggregates
Ed25519
04/08
T4

Weekly

HDD

7 d
weekly summaries · SLA reports · feature-tracking windows
Ed25519
05/08
T5

Monthly

cold storage

30 d
monthly compliance windows · AI Act provenance · project records
Ed25519
06/08
T6

Compliance

archival storage

1 y
regulated audit / receipt · DORA-class records · 1-year retention
Falcon-1024
07/08
T7

Eternal

tape / permaweb

∞
provenance · notarization · protocol history
Falcon-1024
08/08

§ 03.01

TTL — the underlying primitive.

The eight tiers above are named presets; the wire format accepts any duration through the ttl field. Supply a preset name ("T5"), a duration string ("90d", "5m", "2h30m"), the sentinel "forever", or canonical seconds as an integer. The receipt always records the resolved canonical seconds so any verifier can check retention without knowing which form the caller used.

borz listing
{ "ttl": "T5" }           // 2 592 000 s — Monthly preset
{ "ttl": "90d" }          // 7 776 000 s — ninety days
{ "ttl": "5m" }           // 300 s — five minutes
{ "ttl": "2h30m" }        // 9 000 s — compound duration
{ "ttl": "forever" }      // 0 — unbounded (equivalent to T7)
{ "ttl": 7776000 }        // 90 days as canonical seconds
TTL field — all accepted forms

§ 03.02

Promotion. Demotion. Crypto-shred.

Three transitions are first-class. Promotion takes a short-lived ledger and durably persists it; demotion truncates retention; crypto-shred destroys per-record keys so personal data goes dark while the Merkle path remains verifiable.

borz listing
// Take the head of a T2 operational ledger, re-sign every entry with Falcon-1024,
// and emit a permanent T6 anchor. Existing T2 Ed25519 signatures remain
// valid for offline replay; the durable copy uses post-quantum cryptography.

fn promote_t2_to_t6(src: LedgerHandle, dst_spec: TierSpec) -> Result[Promotion, Error] {
    assert(dst_spec.sig_scheme == Falcon1024);
    let head = src.head();
    let checkpoint = build_checkpoint(src, head);
    let dst = open_ledger(dst_spec);
    dst.append_attested(checkpoint, hatp_host_key());
    anchor_now(dst, AnchorPolicy::MerklePermanent);
    Ok(Promotion { src_head: head, dst_head: dst.head() })
}
Promotion · T2 → T6 (Ed25519 → Falcon-1024 crossing)
borz listing
// Delete the per-record key from the vault and purge it from the node's
// storage. The header (with its hash chain & signature) survives; the payload
// can no longer be decrypted through the node. Backups taken before the shred
// are out of scope.

fn shred_entry(handle: LedgerHandle, cid: bytes32) -> Result[ShredReceipt, Error] {
    let entry_key = vault_key_for(cid);
    vault_destroy(entry_key);
    handle.mark_shredded(cid, ts_now());
    Ok(ShredReceipt { cid, ts_ms: ts_now(), proof: handle.head_attestation() })
}
Crypto-shred · single entry at T5

§ 03.03

Where the tiers meet the law.

T6 · DORA

ICT incident audit logs.

DORA (Regulation (EU) 2022/2554) places ICT record-keeping duties on financial entities; which records, and for how long, is for your compliance team to decide. T6 (one-year) is the tier meant for this kind of record; it signs with Falcon-1024, and a node refuses a Falcon-tier ledger until a Falcon key is provisioned.

T5 / T6 · EU AI Act transparency

AI provenance records.

The AI Act sets transparency duties for AI-generated content. A hash-chained record per item can support them; what must be recorded, and for how long, is for your counsel to confirm. Per-record crypto-shred preserves erasure rights.

T1 · GDPR Art. 25

Data-minimization by default.

Session state that auto-expires is state you are not retaining. Privacy-by-design is the storage policy, not a process annotation.

T0 · GDPR Art. 17

Right to erasure, structurally.

T0 ledgers are destroyed by elapsed time. There is nothing to erase because nothing was kept.


§ 03.04

Reference implementation.

The Go reference implementation ships in pkg/ttlspec (parser + preset table) and pkg/retention (expiry index). Feature-gated under EPH_TTL_V2=1; the v1 code path is byte-identical when the flag is absent.

borz listing
// Parse accepts a preset name, duration string, "forever", or raw ms integer.
// Returns the canonical TTLSpec with resolved TTLMs.

spec, err := ttlspec.Parse("T5")
// → TTLSpec{ TTLMs: 2_592_000_000, Preset: &Preset{Name:"t5"}, SourceStr:"T5" }

spec, err = ttlspec.Parse("90d")
// → TTLSpec{ TTLMs: 7_776_000_000, SourceStr:"90d" }

spec, err = ttlspec.Parse("forever")
// → TTLSpec{ TTLMs: 0, SourceStr:"forever" }   // unbounded

// Auto-bucket to nearest policy triple (RFC-EPH-TTL-001 §4)
policy := ttlspec.DeriveTierPolicyV2(spec.TTLMs)
// → AnchorPolicy, SigScheme, StoreClass derived from resolved TTL
pkg/ttlspec — parse any TTL expression
borz listing
// ExpiryHeap is a thread-safe min-heap over (expiresAtMs, ledgerID).
// O(1) peek, O(K log N) for K expired ledgers per tick.

h := retention.NewExpiryHeap()
h.Push(ledgerHex, expiresAtMs)

// Garbage-collection tick — called by the scheduler
expired := h.PopExpired(time.Now().UnixMilli())
for _, e := range expired {
    engine.GC(e.LedgerHex)
}
pkg/retention — expiry heap

Migration from the pre-v2 four-tier model is handled by ttlspec.LegacyPresetForTier(n), which maps old tier integers 0–4 to their canonical v2 TTL specs. Existing T0–T4 ledgers are unaffected; no data migration is required.