Class MintLedgerSnapshot
- Namespace
- Excalibur.Compliance
- Assembly
- Excalibur.Compliance.Abstractions.dll
One data subject's mint-ledger rows as they stood at a single instant, split by whether the key behind each handle is known to have been created.
public sealed class MintLedgerSnapshot
- Inheritance
-
MintLedgerSnapshot
- Inherited Members
Remarks
ONE READ, ONE INSTANT, and that is why the two sets arrive together rather than from two members. Reading "which handles exist" and "is anything in flight" separately opens a window between them, and the whole purpose of the second set is to close a window. A caller holding this value holds a coherent snapshot.
Why PendingMint has to exist at all. A mint-ledger row is written BEFORE the key is created, so that a crash can never leave live key material that nothing enumerates. That ordering is correct and it has a consequence: between the row and the key, a write is invisible to both observables an erasure has. The ledger's handle set has not changed since the erasure read it, and the key material reads absent because it genuinely has not been created yet. That state is observationally identical to a writer that crashed between its row and its mint — which is safe, and which the erasure correctly ignores. The two diverge only after the erasure has signed its certificate.
So no amount of re-reading the handle set, and no number of probes of the key material, can separate the safe case from the unsafe one. The row itself has to say which side of the mint it is on. That information already exists — the write-ahead ordering creates it — and recording it is what makes the distinction observable.
This DETECTS a concurrent write; it does not EXCLUDE one. An erasure that finds a pending row reports a completed-except-concurrent-writes outcome naming the handles, which is loud and recoverable, instead of signing a clean completion over personal data that is about to become readable. Excluding the write would require mutual exclusion between the write path and the erasure, which this contract does not impose.
Constructors
MintLedgerSnapshot(IReadOnlyList<string>, IReadOnlyList<string>)
Initializes a new instance of the MintLedgerSnapshot class.
public MintLedgerSnapshot(IReadOnlyList<string> minted, IReadOnlyList<string> pendingMint)
Parameters
mintedIReadOnlyList<string>Handles whose key creation was confirmed.
pendingMintIReadOnlyList<string>Handles whose key creation was NOT confirmed.
Exceptions
- ArgumentNullException
Thrown when either argument is null.
Properties
All
Gets every handle in this snapshot, whether or not its key creation was confirmed.
public IEnumerable<string> All { get; }
Property Value
- IEnumerable<string>
The union of Minted and PendingMint — the set an erasure ATTEMPTS to destroy. A pending handle is attempted because the key may already exist: the confirmation write can be lost while the key behind it survives, so treating a pending row as "no key" would leave exactly the handle this contract exists to reach. Destroying a handle that holds nothing is harmless — the provider answers not-found and nothing is attested from the absence.
Minted
Gets the handles whose key creation was confirmed.
public IReadOnlyList<string> Minted { get; }
Property Value
- IReadOnlyList<string>
An erasure must destroy or deliberately spare every one of these before it may attest a completed erasure.
PendingMint
Gets the handles whose row exists but whose key creation was NOT confirmed.
public IReadOnlyList<string> PendingMint { get; }
Property Value
- IReadOnlyList<string>
A non-empty set means an erasure cannot honestly certify: a write is in flight and its key may come into existence after the erasure finishes.