Events are immutable, personal data must be erasable. GenesisDB resolves this with reference payloads: the payload is stored outside the hash chain and the event only carries a reference to it. Erase the payload later and the event, its hash and the chain stay intact.
Store a payload as reference
{
"events": [
{
"source": "io.genesisdb.app",
"subject": "/customer/42",
"type": "io.genesisdb.app.customer-added",
"data": { "name": "Bruce Wayne", "email": "bruce@wayne.enterprises" },
"options": { "storeDataAsReference": true }
}
]
}Reads, queries and subscriptions return the payload as usual.
Erase
curl localhost:8080/api/v2/admin/erase \
-H "Authorization: Bearer $GENESISDB_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "subject": "/customer/42" }'Every reference payload of the subject and its descendants is replaced with {}, keys included. The erasure writes a requested and a completed audit event under the neutral subject /. It needs the administrator token.
| Answer | Meaning |
|---|---|
200 | Payloads erased |
404 | The subject has no events |
422 | The subject only holds inline data, which is immutable |
Boundaries
Erasure is a building block, not a compliance guarantee.
- Inline payloads, subjects, types and sources are immutable. Keep personal data out of them.
- Old backups, filesystem snapshots and physical disk remnants are outside the operation.
- The reference key that remains is a SHA-256 digest of metadata and original payload. It cannot be reversed, but a guessable payload such as an email from a small candidate list can be confirmed against it. Combine identifying values with high-entropy fields if they must be fully erasable.