Repository navigation
feat: TTL, history retention and proof-verified permanent erasure - #2280
Merged
Merged
Conversation
A branch dropped while another still forks from it stays frozen, with an index head the sweep counts as live, and blocked its purge. The purge now clears that head and sweeps the branch's ledger, which releases the index; its scan requires the branch's index folder empty.
… holders A full-text or vector index over a holder keeps its own copy of what it indexes, and a sync keeps every term it ever held, so it blocked the purge. The purge now rebuilds each from its ledger as it is, publishing the fresh index as the head even at the same t and, for full text, as the only snapshot of a new manifest; after the grace it deletes every other manifest and snapshot of the index, and its scan requires them gone. An index over a dropped ledger, which cannot be rebuilt, still blocks. A sync built on a head the rebuild has since replaced would bring back what the rebuild left out: a manifest now remembers the head it was read from, its publish checks that head is still current, under a lock the rebuild holds too, and a sync whose head moved starts over.
A value kept in an arena (a vector, a big number, a point, a triple term) has no key a leaf can be searched by, and the leaf-by-leaf erasure took it for absent: it erased nothing, and the scan then found the value and blocked the purge for good. Such a value now sends the holder to a full rebuild, as the arena fallback intends. A vector index over a purged ledger: rebuilt, its head replaced at the same t, its earlier snapshots released.
On durable storage under the write-ahead log, a pass collecting 20,000 records slowed the commits it overlapped by about a fifth: its deletes share the log and device with every commit's flush. A pass with a budget now pauses after each claim batch as long as the batch took, its claims released, so its deletes take at most half the device; the pause is cut short at the deadline. The latency probe collects that way, as housekeeping does.
A rebuild spills its runs to a session directory and a proving step to its own; a process that ended mid-way leaves them, holding the original values. Both are now tagged with the process id, and a purge removes those of processes no longer running before it reports the deletes durable.
A bulk import's session directory holds the imported data; one whose import crashed, or was kept by cleanup_local_files, outlives it. Session ids already carry the process id, so a purge removes those of the holders' imports whose process has ended, beside rebuilds' and proving steps'. The three sweeps share one helper in core.
PurgeReport carries per-phase timings (plan, index, release, scan, delete). examples/purge_perf times one pass over a ledger with a long indexed history while other ledgers commit, with a window mode for an A/B.
A file instance took itself for the only writer of its journals whatever its root lock, so one opened without the lock, possibly beside another process, could answer from a journal the other had since changed. It now does so only while it holds the lock.
Copies of a commit were found by its original's file in their folders, which a purge deletes, so a later erasure of the same commit missed every copy it had purged: the copy went on serving what the second erasure removed. A purge now records the files it deletes in the commit's erasure map entry before deleting them, and a folder named there still holds the commit.
…keep Leaf by leaf erasure rewrites the string dictionary only, so an erased reference's IRI, or the subject of an erased fact with no other, stayed in the subject dictionaries of a purged index. A holder whose erasure leaves such an IRI unused is now rebuilt, and the scan checks the subject dictionaries too. The scan also skipped erased commits when counting what is still in use, and read the folders' files, so a value or IRI that survives in a replacement (another subject's occurrence of the same string, or a commit an earlier purge emptied) counted as residue and blocked the purge for good. It now walks each holder's history, reading an erased commit as its replacement, which also reads each commit once instead of twice.
…fresh The suppression cache matched a branch's journal by name and generation, and a recreated ledger's journal starts its generations over, so a historical read could be answered from the dropped ledger's removals and serve what the new one removed. A cached suppression is now reused only for an equal journal. The worker also remembered how far it had probed an unregistered branch's chain by name, so a recreated ledger's commits up to that t were never probed for retention input and its TTLs never ran. The mark now holds the branch's fence and storage root, and counts only for the same ones.
… input A removal on a ledger no retention pass had registered yet set the activation boundary past the head, so the TTLs and noHistory intervals already committed were never processed: expired values stayed queryable and history a policy covered stayed readable. The boundary is now the first commit carrying retention input, as the worker's activation sets it.
Removing erased strings from the reverse dictionary passed over empty values, as if they were entries an earlier erasure had blanked, so erasing the only use of the empty string left it there and the purge blocked for good. The ids come through the reverse dictionary, which no blanked entry is in, so an empty value is the empty string's.
The sweep a purge runs over the originals' ledgers kept a foreign staging file whose mtime was in the future, as the startup sweep does for a write that may be live, and passed over files it could not unlink, so the purge completed with the file's plaintext still stored. The purge's sweep now takes every other process's staging file whatever its mtime, and fails when a file could not be removed or a directory read.
…exing A background build begun from the root being erased could publish after the erased root, at a higher t, bringing the erased events back; the scan then found them, and a pass past its rebuild phase blocked on them for good. The erasure now takes the hold a reindex takes, and reads the branch's record once the builds have stopped.
Before reporting completion the pass flushed the directories of the originals, transaction documents and replacements it deleted, but not those its index release, source cleanup and garbage collection deleted from, so a power loss could bring back a released index file. It now flushes every directory of every tree it deleted from: each holder's, live, retracted or dropped, and each rebuilt full-text or vector index's. The staging sweep covers the same trees, not only the originals'.
The guide still said original commit files stay on disk. It now describes the purge that follows publication, its stages and status fields, what blocks it, and what it cannot check.
A holder whose erasure left an IRI unused, as every fact of a subject erased, was rebuilt in full to drop the IRI from the subject dictionaries: the commonest erasure became a full reindex, which a large ledger cannot afford. IRIs are identifiers and stay, as the guide now says: keep personal data out of them. The purge erases such a holder leaf by leaf again, and the scan no longer checks the subject dictionaries.
The rebuilt index holds no IRI only erased facts used; the index it replaces keeps them until index garbage collection releases it.
A removal narrowed the history it refuses to its occurrence's subject by reading that subject back from the occurrence's commit. Once an erasure publishes the commit's replacement, the operation is gone, so the subject was unknown and every historical read of the predicate over the span was refused, for every subject. Each removal now records a fingerprint of its subject (a versioned, domain-separated SHA-256 of the IRI) when it is made, and restored and paired entries carry their removal's. Journal merges take a fingerprint an entry lacks, never drop one, and fail on two that disagree. Reads are matched against a lookup by predicate and fingerprint built once per journal, so a refusal is decided without reading any commit; an entry without a fingerprint still refuses every subject. Whether a removal applies to a branch is whether the branch holds its commit. An erased commit reads as its replacement from anywhere, so it is held where its original's file is, or where a purge deleted it or a write of it was refused since publication (a restored copy's), now recorded in the commit's erasure map entry beside the purged ones.
…es it reads A full-text or vector graph source lagging any removal, or the head of a ledger with any f:noHistory rule, was refused with 410, as was every earlier snapshot of one over a ledger with a journal, even when it never read the removed property and so could not hold the value. The properties an index reads now come from one place, `graph_source::helpers::indexed_properties`: its indexing query's, as the incremental sync analyzes them, and a vector index's embedding property. Both syncs use it in place of their own copies of that analysis, and the refusal counts only removals and rules of properties the index may read. A query whose properties cannot all be listed (`*`, a variable predicate, a `@path` alias, patterns on another subject) may read anything, as before.
…ed property Every full-text and vector index over a holder was rebuilt from scratch on every purge, whatever was erased, and one over a soft-dropped ledger blocked the purge even when it never read the erased property. The plan takes the erased properties from the removals that journaled the jobs' occurrences (a span-ending retraction without one has its assertion's), and keeps only the indexes that may read one of them; with none found, or one that did not decode, every index counts, as before. A dropped index was left out of the plan entirely, and a soft drop keeps its files: the purge then completed with the index's snapshots still holding the erased term. Dropped indexes over a holder that may read an erased property are now planned as `droppedSources`, every file of theirs is deleted, and the scan requires them gone.
…ts entry A generic xsd:duration is keyed by the string-dictionary id of its canonical lexical form, but leaf-by-leaf erasure counted only strings and JSON as string-keyed, a copy of `OType::is_string_keyed` without durations. Erasing a string that a surviving duration spelled the same judged the shared id unused and blanked it: the duration then read back as "". An erased duration's own entry was never collected, and the purge scan, which checked only strings, completed with it in the dictionary. Erasure now takes string-keyed types from `is_string_keyed`. The scan decides by the string a value is interned as (strings, JSON, durations), both for what is erased and for what a surviving occurrence still uses.
…s entry 4daed9a let leaf-by-leaf erasure collect a generic duration's string entry, but the fallback that protects triple terms still covered only strings and JSON. A triple term names its literal's entry too, and the usage check reads only rows and history: erasing a duration that a surviving triple term spelled the same blanked the term's literal, and the purge reported success. The fallback now takes the same string-keyed test as the dictionary cleanup, so a duration in a ledger with triple terms sends its holder to a rebuild. The scan counts a triple term's literal among the strings a surviving occurrence uses; without that, an erased string or duration a triple term spells blocked the purge for good once the rebuild kept it.
… patterns An indexing query with reasoning (`reasoning`, or `opts.reasoning`) can depend on properties its patterns never name: with ex:private rdfs:domain ex:Doc, a document's membership follows ex:private. The property analysis took the patterns alone as complete, so an incremental sync missed changes to such a property and kept a stale document, and since fa77311 a search index was served behind a removal of one. The analysis now marks reasoning (any mode, or query-time rules) as incomplete: syncs rebuild in full, as for `*`, and the removal refusal and purge count every property. `"reasoning": "none"` stays complete.
… leftover 8c96b9a chose which full-text and vector indexes to touch in two ways that could miss what an index holds: - It took the erased properties from the journals of the requesting ledger's live branches, matched by occurrence, and accepted a partial match. A property only a since-dropped branch had journaled fell out, and a copy's index of it was neither rebuilt nor released. - It used an index's current configuration to decide both its rebuild and the release of its other files. An index recreated under a dropped one's name, over another property, shares that one's folder: the old snapshots, holding the erased text, stayed. Each erasure job now records the properties it erases when it is accepted, as every branch and copy it removed from decoded them (`properties`; empty, so any property, when one did not decode or for an older job). Every index over a holder now loses the files its head does not use; only those that may read an erased property are rebuilt (`rebuiltSources`), and only they can block. A dropped index over a holder loses all of its files, whatever it read.
A lifetime was `@ttl` in JSON-LD shorthand and in Cypher but `f:ttlSeconds` in annotations, txn-meta and config, and only the shorthand took a duration: SPARQL could say `3600` but not `PT1H`. The deadline was already `expiresAt` everywhere. `f:ttlSeconds` is now `f:ttl`. Every surface takes the same values: whole seconds, or a fixed day/time duration as a string or a typed `xsd:dayTimeDuration` (an `xsd:duration` without months or years too), through one parser shared by validation, the scheduler and the config reader. Nothing had shipped under the old name. On the way: Turtle and TriG transactions built their txn-meta without the TTL check the JSON-LD and TriG-meta parsers run, so a duration, a string or an invalid default (`-5`, `"3600"`) there was silently ignored. They now validate and normalize it the same way. A test runs the duration form through a property default, a SPARQL annotation and a TriG transaction default, and has a value's own lifetime (shorter, longer, none) beat the property's.
An erased commit travels as its erasure chain at its place in the history, never as its original: new pack frames carry the chain, its latest replacement and receipts, and each request's authorization (its control commit and the occurrences its manifest named). Older decoders refuse the frame types. An archive with erased commits carries no index and no erased commit's transaction document. Publication stores each request's authorization, so the source, and any copy restored from it, can archive its erasures. A restore verifies each chain against the pinned images, checks every step's slots against the manifest its control commit records, requires the commit to be in the archived history, and refuses a chain that diverges from one the storage holds or that would newly erase an original a ledger there holds. It then publishes the chains before anything reads the history. No prover is needed to restore. Memory, S3 and cluster instances refuse, as does POST /pack until it carries erasures.
Erasure code that non-native builds reach is gated or moved: key rotation takes only the purge lock, which the erasure runtime shares, the full-text head lock is none without file storage, the purge grace (from the indexer's defaults) exists only where purges run, and store_among, which restores use everywhere, moves out of the erasure module. Items only erasure reads are allowed to be unused elsewhere.
…imes The server records a receive time only on a write that carries an event time and on later writes to that ledger, not on every write, and an embedder that backdates with `CommitOpts::with_timestamp` alone gets none: its relative lifetimes count from the backdated time.
… body it does not know Found by probing every read surface against a removal: - Under the RDF list view a pattern over `rdf:first` reads the members of every list, and the read check saw only `rdf:first`: a removed member was served at an earlier point. Such a query now counts as reading everything. - `query_connection_with_bm25` and `query_dataset_with_bm25` executed without the check that every other query entry point runs. - A removal or erasure request with a misspelled field (`objekt`, `value`) or a null `object` read as "every object" and removed every value of the subject and predicate, for good. Unknown fields and a null object are refused.
…with retention in place A soft drop copies each branch's config, and a restore reinstates each branch's retention, both by ledger id. A record kept from before the id grammar (a branch beginning with `/`) has an id no request can name, so both refused it and the whole ledger could not be dropped or restored. Nothing can have given such a branch a config or a registration: the drop copies none for it and the restore skips it.
A branch made before its source removed an occurrence keeps serving it until the removal is requested there too; only a branch made afterwards inherits the journal. The page said the second and left the first to be found out.
Contributor
Author
|
@aaj3f thanks for the second pass. Both blockers, the merge walk and the optional items are pushed, with a reply on each thread. Each fix has a test that goes red with the fix reverted. Beyond your list, the push also carries:
Still open on our side:
|
Removals are recorded per branch, by commit and position, and nothing carried them when commits moved between branches: - A merge copies the source's commits onto the target. After a fast-forward the target served the source's removed value at earlier points, and after any merge its raw content, which now held the removed commits, was not audit data. - A rebase puts the branch on the source's line without what the source removed from it. - A rebase replays the branch's own commits as new commits at new points. A removal of an occurrence in one of them no longer covered the replay, which the branch then served, and an erasure accepted before the rebase published against the originals while the replays kept the value. The target of a merge and the branch of a rebase now take the source's removals before they hold its commits. A rebase that would replay a commit one of the branch's removals names is refused with 409: merging the source into the branch keeps the commits as they are.
…ing every property The check that refuses removed history works from the patterns a query states. A Cypher query reads a node's properties where no pattern says so: `properties(n)`, `keys(n)` and a member of a list element are evaluated against the whole subject, and typed results hydrate every node returned. `MATCH (n:Person) RETURN properties(n)` at an earlier point returned a removed value. A query lowered from Cypher now counts as reading everything, as one that hydrates does.
A job that failed, at its third proving timeout or on a prover's refusal, could not be retried: the request's id is derived from what it erases, so repeating it found the failed job and returned it. The removals stood and the commits were never redacted. Made again, a failed request now goes back to proving from where it stopped, under the authorization it has.
A non-point geometry is a string row whose text its graph's spatial arena keeps too. Leaf by leaf erasure rewrites leaves, sidecars and the string dictionary and carries every arena over, so the arena kept the geometry while the job read purged. A value of a property with a spatial arena now takes the rebuild, as the page on erasure says a geometry does.
A rebase pins the commits of the line it replaces and released them once the new head was published, before the steps after it that can still fail. Their failure resets the head to the old line; a collection pass in between found that line named by nothing and could delete it. The pins are now held until the rebase returns, its rollback included.
Dropping that branch drops the job for every branch that holds the commits, with nothing reporting it. The page now says so.
Its set came from an import the wasm build does not make.
… no configuration Taking the source's removals read its registration on every merge, and the rebase check read the branch's, whether or not the ledger had ever used retention. A record that says it has no configuration answers both without a read.
…rned since it began A read of a branch's journal is recorded unless something changed the branch since the read began, and only events counted as changes. A lookup that learned a newer configuration revision did not: a read of the earlier revision, landing after it, was recorded as the newer one's. Where it held nothing and the newer one held a removal, the branch read as holding none until its configuration next changed. A lookup that learns another incarnation or revision now counts as a change.
A pass retracted one flake per fact, and a list holds a value once per position: `[1, 1, 2, 1]` under a lifetime kept two of its `1`s, with nothing scheduled to take them later. Retractions are now told apart by position too.
…t uncovers A build that reads retention input below a branch's boundary lowers the boundary, but the schedule kept its own watermark, so the commits in between were never discovered and their values never expired. That is the state of a ledger first indexed with no retention hook, the case the TTL page tells a host to repair. Lowering the boundary now drops the persisted schedule, and a schedule held in memory is used only for the boundary it was discovered from, so the next pass discovers from the new one.
…d one keeps its status A batch's idempotency key was its head and its bytes. The queue records a deferral (novelty near its limit) against the key like any outcome, and against an unmoved head the next pass builds the same bytes: it was answered "deferred" from that record, unstaged, until the record aged out an hour later, so nothing expired and `/remove` kept answering 503. The key now also carries the minute, which still deduplicates a retry after a lost response. Every other submission failure became a 500, a retryable 503 or a 404 included. It now keeps the status the write path gave it.
The page said every form refuses a date-time with no offset. A literal typed `xsd:dateTime` in SPARQL, Turtle or an `@annotation` is read as any such literal is.
…h's line An erasure located a fact's occurrences on each branch's own line. A merge that does not fast-forward copies the merged branch's commits into the target's folder, off that line, and they stay when the merged branch is dropped: the ordinary life of a feature branch. Erasing on the target then redacted the merge commit and reported the job published, while the merged branch's own commit kept the value, in a folder every clone and pack of the target carries. A request by fact now also takes the matching operations of every commit a branch reaches only through a merge's other parent, on each branch that holds an occurrence. They need no removal, since nothing the branch serves reads them; publication and the purge already followed merge parents. A branch that holds the fact only there (the merge kept the target's own value) is accepted where it answered that nothing matched. An occurrence named by commit and slot is unchanged. A signed commit of a branch dropped since is refused with 422: its signature was made for that branch's id, which nothing records, and a branch made again under the name lets it through.
…er not to hold it A peer decides which removals apply to a branch by asking whether the branch holds each one's commit. Once a ledger has a removal the server refuses its commits to a token without audit access, and the proxy client reported a refused object as absent, to existence checks as to reads. So a peer that had been serving the ledger, and had not yet been given an audit claim, concluded that no removal applied and went on serving the removed value from its caches for as long as the ledger stayed quiet. An existence check now fails for a refused object where it answered "absent", so what cannot be told applies, and the peer refuses the history within its refresh interval like a peer with the claim. A read still reports a refused object as not found, and now says why: the usual cause is a token an operator has to change.
Contributor
Author
|
@aaj3f follow-up to the comment above: what our own pass turned up, pushed since Removals and branch operations
Reads past a removal
Erasure
TTL
Other
Behaviour worth a look
Known and not addressed here
CI is green through |
The browser store asks its proxy client whether an object exists, and its test held the old answer for one the server refuses: absent.
bplatz
added a commit
that referenced
this pull request
Nov 13, 2026
next brought TTL, history retention and permanent erasure (#2280). Beyond taking both sides: - Content kinds: both branches numbered a new kind 21. The retention schedule keeps it; the reasoning manifest and derived-facts kinds are 22 and 23. - Raft state machine: both appended to positionally encoded types. The reasoning-indexes state field, PushReasoningIndexes and its two responses now follow the erasure ones, and a third snapshot shape reads a snapshot taken with erasure state and before reasoning indexes. next's damaged-snapshot tests cut into the erasure state: the last byte of a snapshot is now the empty reasoning-indexes map, and cut alone it leaves a whole snapshot of the layout before. - Drop and restore keep each branch's config and its reasoning-indexes document. A drop reads no reasoning-indexes document for a branch no request can name (a legacy branch beginning with `/`). - A view carries its commit id and its fence and erasure generation; the query path runs the reasoning refusals and the removed-history check.
bplatz
added a commit
that referenced
this pull request
Nov 13, 2026
…reads
A view policy decides each row as of the read's point, but the refusal
looked only at the query's own patterns. So a read of an innocent fact
under a policy that reads a removed one answered, and its rows told the
removed value: a condition such as {ex:alice ex:email "a@old"}, or one
filtering on a prefix, confirmed the value by guess or read it out a prefix
at a time; a class policy hid a subject at that point exactly when the
removed rdf:type had made it a member. Since #2280; anyone who can send an
inline policy, or select a stored one, could do this.
The refusal now adds what the view's policies read: each f:query
condition's patterns, parsed as the executor parses them
(for_each_condition_pattern, sharing jsonld_condition with evaluation), and
rdf:type for a class policy. ?$this stays a variable, so a condition reads
its predicates for every subject. A Cypher condition, or one that does not
parse, reads everything. The check is as lazy as before, so a ledger with
no removal pays nothing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2279 (commit-worker fix), which is stacked on #2278 (Raft read catch-up).
Adds data lifetimes, history retention and permanent erasure: values that expire, predicates whose history the index doesn't keep, occurrences hidden from every query, and occurrences removed from the commits themselves, with a zero-knowledge proof that each redacted commit is the original less exactly what was requested. Single nodes on file storage and Raft clusters sharing file storage are supported.
User docs: TTL, history retention, permanent erasure,
fluree prover.What it adds
TTL. A value can carry a lifetime (
@ttl/@expiresAtin JSON-LD, anf:ttl/f:expiresAtannotation in SPARQL or Turtle,fluree.ttl/fluree.expiresAtin Cypher, or a per-property default in the ledger'sf:retentionDefaults). A background retention worker retracts expired values with ordinary commits; history keeps them. A ledger that never uses TTL takes the same write and query paths as before.f:noHistory. A per-predicate setting under which the index keeps only current values. It reduces index churn and refuses no reads: a past read sees a current value from the transaction that asserted it. Incremental builds leave a rule's history out of each leaf they rewrite; a reindex drops it all at once.Targeted removal.
POST /v1/fluree/remove/<ledger>(andFluree::remove_occurrences) stops serving selected occurrences of a fact, now and in history, and retracts those still current. The commit log keeps the originals for audit; on a ledger with a removal, raw retrieval of its commits, transactions and index (through the storage proxy too, so a query peer serving it needs an audit token) needs the audit permission.Permanent erasure.
POST /v1/fluree/erase/<ledger>(admin) accepts a request synchronously: a removal on every branch whose history holds an occurrence, a control commit naming the request, and a job. The job then:fluree-prover, a separate binary outside the workspace (RISC Zero 3.0.6 guest and host, built reproducibly in a pinned container), proves each affected commit's redaction. The server runs it as a subprocess (its own process group at low priority, a scratch directory only the server user reads, bounded output) and verifies every receipt in-process against the pinned image ids and against the signature mode its request's control commit records (f:erasureSignatures), on every server that reads, receives or restores it.Blob garbage collection. Commit and transaction files that no branch reaches are recorded and collected (pins, records and reconciliation the purge depends on). Collection of recorded garbage applies to every locked file-backed instance, with or without retention; background reconciliation, which reads a ledger whole, is opt-in (
--garbage-reconcile-interval-secs).Hash agility. Content ids can carry SHA2-512 through
FlureeBuilder::with_content_hash. It is a builder option only: there is no server flag, and cluster members mint and admit only SHA2-256.Transfers. Archive/restore, clone/pull, push into single-node receivers, origin reconciliation and query-peer refresh carry verified replacement chains, proofs, removal journals and authorization, never erased originals. A receiver that can't take them refuses rather than receiving the original bytes.
Fluree::set_index_headnow returns whether it set the index: it declines an index received over history erased here.Raft. Replicated per-branch erasure generations fence stale writes and index publications (
WriteBasis). The leader activates replacements, members install them before serving affected history, proving can be delegated to a member, and collection uses replicated intents with lease-bounded deletes. The leader purges shared storage and waits for every voter's and learner's cleanup report. Purge and proving survive leader changes; deposed passes stop.Scope and limits
501; other commits422.Fixes to existing behaviour carried here
BranchRecordStore::thaw_record, in every backend) instead of being left frozen.mainin fix(indexer): a reindex keeps the ledger's spatial index #2274).checkpoint_walcould report a log retired that wasn't.Docs, CI and release
fluree.ledger.audit.*access to it before the first removal, or they stop serving it (seedocs/reference/compatibility.md)..github/workflows/prover.ymlrebuilds the guest when its sources change and fails unless its image id is pinned;prover-build.ymlandrelease.ymlbuildfluree-proveron release tags. The Dockerfile gains anerasuretarget that ships the server with the prover; the default target is unchanged.Performance
Ledgers that never erase showed no measurable query or commit cost. File garbage pins cost about 7 µs per commit on tmpfs and apply to every locked file-backed instance; a later three-node cluster A/B (tmpfs, three workloads, three rounds) found no throughput or p99 regression within run variation. While a proof ran on the same host as all three nodes, write throughput fell 5% and read throughput 21%; a prover on its own host was not measured.
Reviewing
The branch keeps its history (264 commits, including merges of
nextand of this stack's fixes) and should land as a merge commit, not a squash. Areas, roughly in dependency order:fluree-db-core,fluree-db-nameservice,fluree-db-indexer,fluree-db-query: hash agility, retention metadata,WriteBasisand erasure generations, history-drop keys, and the walk over every pattern a query evaluates (ir/walk.rs), which history suppression, search-source checks andGraphReadsshare.fluree-db-api/src/retention/(TTL worker, removal journal and suppression,f:noHistory),fluree-db-api/src/garbage/(blob pins, reconciliation, collection), thenretention/erasure/(requests, the proving worker, activation, transfer, purge).fluree-db-redaction,fluree-db-erasure,fluree-prover: the redaction transform and codec, the prover protocol and receipt verification, the guest.fluree-db-nameservice-sync,fluree-db-cli: transfers.fluree-db-consensus/src/raft/: replicated activation, collection and purge.fluree-db-server/src/routes/: the HTTP surface.Two things here have a counterpart elsewhere, on purpose:
prev_indexchain.fluree-db-api/src/garbage/collects commit and transaction files, which no index root names: their liveness depends on every branch's commit chain, on queued requests and their idempotency records, and on writers still storing them. So it needs writer pins, reconciliation, and on a cluster the leader's condemn-then-delete intents, none of which an index-chain walk has.fluree-db-redactioncompiles into the zkVM guest, so it carries no dependency onfluree-db-core, and its reader is the one the proof attests.fluree-db-core's reader serves every production read of a replacement. Keeping them apart keeps the guest small and its image stable across core changes;fluree-db-redaction/tests/redact.rschecks the two agree on every value kind.docs/design/zk-redaction-feasibility.mdholds the proof experiments' report and the cost measurements the production design came from. The prototype code (commit authentication, selective disclosure and ancestry proofs, which aren't production APIs) is no longer in the tree; the report names the commit that last holds it.Not in this PR
Receiving erasures into a cluster, S3 erasure and collection, a server setting for a second hash, parallel or external proving, bounded proof bookkeeping, compressed replacements, resumable garbage reconciliation (and so listing at millions of files; #2334), and creating a branch at an earlier point without replaying its history under the erasure admission lock (#2333).
Follow-up: #2327 (servers sign the commits they write, and a ledger's config names the signers it trusts; receivers then check who issued an erasure's control commit).
Follow-up: #2333 (creating a branch at a past point holds the erasure admission lock through a full replay).
Follow-up: #2334 (garbage reconciliation re-lists every file and re-reads all history each step, so it stays off in the background).
Follow-up: #2337 (on serverless hosts the TTL schedule is rewritten whole on every run; and whether erasure, whose proofs take minutes and ~10 GB, is supported there at all).
Follow-up: #2338 (explore one visibility gate for history hiding across read surfaces, or a surface × rule test matrix instead).
Follow-up: #2342 (proving bookkeeping and orphaned collection intents accumulate).
Follow-up: #2339 (erasure and collection on S3 and other object storage), #2340 (accept erased history pushed into a cluster), #2341 (parallel and external proving), #2343 (compress FCR1 replacements), #2344 (production hash selection), #2345 (proof features beyond erasure).
Follow-up: #2346 (search indexes under removal and purge), #2347 (crashed import staging, WAL harvesting), #2348 (erasure observability on clusters and query peers), #2349 (concurrency edges to investigate), #2350 (performance validation under load), #2351 (test gaps), #2352 (refactoring candidates).
Follow-up: #2353, #2354 (unrelated defects seen while building this, to confirm on
next).Coordination with open PRs
@reasoning/and its retained generations. feat(reasoning): materialized reasoning indexes #2292's body records the same requirement.main, reachednext, and merged here (d479a28). The transactor releases an envelope in one place (EnvelopeFate); where the cluster collects, that release leaves the envelope to the cluster's collection (leave_for_collection), which alone deletes blobs there, and the write-scope refusal marks the envelope turned away so it is released rather than left behind. Two tests that relied on identical requests sharing an envelope address were replaced: one pushes a commit, the one submission whose stored address is known ahead, to check a condemned address is spared; the other checks a turned-away submission's envelope is left to the collector, recorded as garbage.