F3 and C4

Access and Evidence

A log you can edit is not evidence. It is a note. Records append and carry the hash of the one before them. The table has no update path, so correcting something means appending the correction, which is itself a record with a name and a time on it.

Hash-chainedAppend onlyAnchored externally

The chain, and what breaks it.

Each record quotes its predecessor’s hash. Remove one, or change one, and every hash after it stops agreeing. The tampering is not prevented by hope; it is detectable by arithmetic anyone can rerun.

The database also refuses the statement outright. That is invariant I-4, and it is checked in CI rather than written into a policy document that nobody executes.

LiveEvidence chain, party 8841Appending
TimeActor and changeprev_hashhash
Applicantapplication.submitted
00000000
7c41a9e2
idv.verifyidentity_standing: unverified → verified
7c41a9e2
b0d81f55
sanctions.screenoutcome: PASS
b0d81f55
3ea7c418
A. Patelapplication.accepted
3ea7c418
d9146b07
RefusedAn UPDATE on the second record. The table has no update path and the database rejects the statement. Invariant I-4, checked in CI. Correcting a record means appending the correction, which is itself a record.

A chain alone only catches the careless.

Anyone who can rewrite the chain can recompute every hash after it. A self-consistent chain proves internal consistency and nothing about time.

So the head is periodically anchored: recorded, and then published somewhere this system cannot reach. A counterparty, a notarisation service, an append-only object store. The record of where it went is kept beside the anchor.

An anchor that has not been published is a placeholder for that, not a substitute, and the system reports it as one.

  • audit.chain_intact: every record’s predecessor hash matches the record before it.
  • audit.anchors_agree: the chain still agrees with every anchor ever taken of it.
  • audit.unanchored_entries: how much history is not yet covered by a published anchor.
  • audit.anchored: an anchor has been taken recently enough to be worth anything.

What a record carries.

FieldWhy it is there
actorA named person, or a named control. Never a service account standing in for both.
atWhen, in UTC, from the database rather than the caller.
field, from, toWhat changed and what it was.The before value is the one an examiner asks for, and it is the one a system that stores only current state cannot produce.
prev_hashThe hash of the preceding record. This is the chain.
hashThis record's own, over its content and its predecessor.
sequence_noPosition in the chain, so a gap is visible as well as a mismatch.

In front of it, commands that cannot run twice.

An audit trail is only as good as the writes reaching it. Every mutation carries an idempotency key, and a repeated call replays the stored response instead of executing again, so a retried timeout produces one record rather than two.

POST/v1/transfersFirst callSent again
{
idempotency_key: “9f2b41c6-7a30-4e51-9b8e-2c4d6f1a8e55”
debit_account: “acct_01HQZ4N8K2”
credit_account: “acct_01HQZ4N8M7”
amount: {
value: “24500.00”
currency: “EUR”
}
reference: “TRF-7741-0092”
}
201200CreatedOKResponseReplayed
{
id: “txn_01HQZ55PD3”
status: “SETTLED”
posted_at: “2026-10-28T14:20:11Z”
entries: [
0: {
account: “acct_01HQZ4N8K2”
side: “DEBIT”
amount: “-24500.00”
currency: “EUR”
}
1: {
account: “acct_01HQZ4N8M7”
side: “CREDIT”
amount: “24500.00”
currency: “EUR”
}
]
}
IdempotentThe body is identical because it is the stored response, not a second execution. One transaction in the ledger, two calls in the log, and a client that may retry a timeout without knowing whether the first attempt landed.

What it guarantees.

Each of these is enforced rather than intended, and each is something you can sit down and try to break on a call. We would rather you did.

  • The evidence table has no update path. The database rejects the statement, so there is no code path, admin screen or support script that can alter a written record.
  • Every record carries its predecessor’s hash. A removed or altered entry breaks every hash after it, and the break is found by arithmetic anyone can rerun.
  • The chain head is anchored and the anchor is published outside this system, so the protection does not rest on the same database being trustworthy.
  • Every mutation carries an idempotency key, so a retried timeout produces one record rather than two.

Try to change something on the call.

The demo everyone remembers is the one where we hand over a console and the database says no.