Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions LIMITATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,16 @@ mirror protects readers only against a rewrite after it first synced, and only w
compares against it. A mirror run by the operator checks almost nothing. See [MIRRORS.md](MIRRORS.md) and
[docs/mirroring.md](docs/mirroring.md).

**One checkpoint has an independently operated witness receipt.**
**Two checkpoints have witness receipts; one witness has a track record.**
Checkpoint 1's signing-body digest is included under a root signed by Action State's witness key.
The receipt returned on September 7, 2026 (Pacific time) verifies offline against an explicit
key pin, and matches the separately fetched receipt. See
[the evidence packet](docs/evidence/witness-2026-09-07/README.md).
[the evidence packet](docs/evidence/witness-2026-09-07/README.md). On October 20, 2026, a second
witness, operated by HORIZON SHIELD (which also runs a registered mirror), signed receipts for
checkpoints 1 and 2. Its key was first published that day and its log holds only those two
leaves. See [the second packet](docs/evidence/witness-2026-10-20-nenrin/README.md).

This is a one-checkpoint demonstration, not continuous or reciprocal witnessing. It does not
These are two demonstrations, not continuous or reciprocal witnessing. It does not
prove registry continuity, prevent split views, cover the June entry, or prove payload retention.
The JSON response reports `countersigned-observed`, but that grade is not signed inside this
receipt, and this receipt signs a Merkle root without a witness timestamp: the checkpoint
Expand Down Expand Up @@ -92,8 +95,17 @@ anywhere in the verifier: a signed `countersigned-observed` matching a reported
signing a grade while its response body still reports a different one leaves the field false,
correctly, because a signed value that disagrees with the untrusted one binds nothing.

The grade this registry should expect is `countersigned-observed`, and it is the honest one.
`trace-registry/v1` is enrolled with the witness as a foreign accumulator: the witness observes,
The next paragraph is about the Action State witness and its September 7 receipt. It is not a
description of the second witness. In
[the October 20 packet](docs/evidence/witness-2026-10-20-nenrin/README.md) the second witness
states that it runs both of this registry's chain checks over the files at the source commit
before it signs, and both of its receipts carry a signed `mmr-verified` equal to the grade its
response reports. That is that witness's own statement about what it did, to be read with the
limits the packet lists. It does not change what the Action State receipt carries.

The grade this registry should expect from the Action State witness is `countersigned-observed`,
and it is the honest one.
`trace-registry/v1` is enrolled with that witness as a foreign accumulator: the witness observes,
timestamps and countersigns the checkpoint bytes it is sent, and does not verify this log's own
consistency proofs, so it does not check that a checkpoint extends the one before it. Consistency
across checkpoints is computed by a verifier of this registry, not certified by the witness. The
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ one implementation.
A witness is an outside service that keeps its own record of a checkpoint, so the
registry could not later rewrite that part of its history without the witness's copy
disagreeing. Checkpoint 1 (in the 09/01 entry) has a receipt from one independently
operated witness, and anyone can verify it offline. The second checkpoint has not been
sent to a witness. One receipt shows that the witness recorded that checkpoint; it does
not show that every observer saw the same history.
operated witness, and anyone can verify it offline. Since October 20, checkpoints 1 and 2
also have receipts from a second witness, run by a different operator with its own key
([second packet](docs/evidence/witness-2026-10-20-nenrin/README.md)); that key was first
published the same day and its log holds only those two leaves. A receipt shows that the
witness recorded that checkpoint; it does not show that every observer saw the same history.

<details>
<summary>Technical detail: what the receipt binds, and capturing another one</summary>
Expand All @@ -78,7 +80,9 @@ a property of that receipt, so the verifier reports `witness_time_established` a
`grade_cryptographically_bound` rather than asserting either. Both are false for this capture
and stay false for it. Its protected header carries algorithm and tree profile only, and the
witness signature covers that header, so a receipt carrying either field is a new receipt rather
than this one re-read.
than this one re-read. The October 20 receipts are such new receipts, from the second witness:
the one for checkpoint 2 carries a signed time and a signed grade, and the one for checkpoint 1
carries a signed grade and no time.
A further capture runs through `tools/capture_witness_receipt.py`, which submits the
checkpoint, reads the receipt back by log id and by digest, and writes the response
bodies, a capture manifest, the offline verification and `SHA256SUMS` into one
Expand All @@ -103,7 +107,8 @@ and returns a receipt that is internally consistent with what it was given.
</details>

The pipeline does not yet submit future checkpoints automatically. Parallel independent
witnesses remain supported as a deployment choice; only one operator is demonstrated here.
witnesses remain supported as a deployment choice; two operators have each signed receipts once,
by hand, and neither runs in parallel with the other on every checkpoint.

## Why this exists

Expand Down
18 changes: 13 additions & 5 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,23 @@ layer waiting for production traffic.
for the same reason.
- **Automated submission to independent witnesses**, with receipts retained and verified
under explicit key policies. Checkpointing itself is live since September 1;
the first external receipt is a manual demonstration, not a deployed submission loop.
the external receipts so far (September 7, and October 20 from a second operator) were
taken by hand, not by a deployed submission loop.
- **Receipt-bound witness time and grade**, if those properties are required by policy.
The captured receipt authenticates a root, not the response's grade or an observation time.
The September 7 receipt authenticates a root, not the response's grade or an observation time.
The October 20 receipts from the second operator are different: the one for checkpoint 2
binds a witness time and a grade, and the one for checkpoint 1 binds a grade and no time.
No policy here requires either property yet, and the September receipt stays as it is.

## Later

- Parallel witnesses and split-view monitoring. The September 7 receipt demonstrates
one checkpoint at one external operator; see the evidence packet linked from README.
A second operator, continuous submission and independent split-view monitoring remain open.
- Parallel witnesses and split-view monitoring. The September 7 receipt covers checkpoint 1
at one external operator. Since October 20 a second operator, HORIZON SHIELD (a party other
than the registry operator, with its own key, which also holds a registered mirror), has
receipts for checkpoints 1 and 2
([docs/evidence/witness-2026-10-20-nenrin](docs/evidence/witness-2026-10-20-nenrin/README.md)).
Nothing there shows a track record or independence beyond a different operator and key.
Continuous submission and independent split-view monitoring remain open.
- A conformance suite for third-party verifier implementations, so "I implemented
the anchor format" is checkable rather than asserted.

Expand Down
105 changes: 105 additions & 0 deletions docs/evidence/witness-2026-10-20-nenrin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Checkpoints 1 and 2: receipts from a second witness

Captured October 20, 2026, 03:36:18 UTC, from registry main `555f27a`. The witness is operated by HORIZON SHIELD (The HORIZONs Co., Ltd.), which also holds a registered mirror of this registry (MIRRORS.md). Witness code: [`registry-witness-v0`](https://github.com/ogasurfproject-jpg/horizon-shield/tree/main/workers/hs-ledger/nenrin/registry-witness-v0).

| | checkpoint 1 (`mmr_size` 1) | checkpoint 2 (`mmr_size` 3) |
|---|---|---|
| signing-body digest | `41138372…968f99a` | `8b21417c…dbc6cf22f` |
| entry hash | `dee1a92d…bed6dfab6` | `df8e89a8…d7d9372ee` |
| leaf / tree size | 0 / 1 | 1 / 2 |
| grade signed under `-65537` | `mmr-verified` | `mmr-verified` |
| CWT `iat` signed | no: the checkpoint was more than 30 days old | yes, `1792467378` (2026-10-20T03:36:18Z) |
| `grade_cryptographically_bound` | true | true |
| `witness_time_established` | false | true |

Checkpoint 1 already has the Action State receipt of September 7, so it now has two witnesses. Checkpoint 2 had none.

## How new this witness is

The witness key first appears in horizon-shield commit `65b0db6` (2026-10-20 03:48 UTC), 12 minutes before this PR was opened. The witness log holds only the two leaves in this packet. The witness is operated by a party other than the registry operator, and that party also runs one of the registered mirrors. Nothing here shows a track record, or independence beyond being a different operator with its own key.

## Verify offline

From the repository root:

```
python -m pip install --require-hashes -r requirements/witness.txt
for i in 1 2; do
python tools/verify_witness_receipt.py \
--checkpoint docs/evidence/witness-2026-10-20-nenrin/checkpoint-$i.json \
--response docs/evidence/witness-2026-10-20-nenrin/witness-response-$i.json \
--expected-log-id trace-registry/v1 \
--registry-key bc133259c094f63694b4ec48a295d7501a9a0cd536df5631fb4663c155f7bc90 \
--witness-key c7c47d073a2c8b348d12c7207aaf7a403f5a3c2695227bf8ed2963ff52f98baf
done
```

Expected: `verified: true` and seven checks for each. The limits are as in the table. `tests/test_witness_receipt_nenrin.py` runs both with sockets disabled, and tries altered bodies and swapped receipts.

## What the grade means here

`mmr-verified` is signed only after the witness has done three things itself:
- run both of this registry's chain checks over the files at the source commit, with `trace-verify`'s own functions;
- pinned the registry key;
- confirmed that every checkpoint it signed before is still present, byte for byte, on the same line.

It does not mean anything about the claims the registry anchors.

## What `iat` means here

The witness clock at the start of the run. It sits inside the signature, so it binds as a witness statement. On its own it is still the witness's assertion. The witness log's first tree head is anchored to Bitcoin, which gives an upper bound from a clock neither party controls. The proof is in this packet:

1. `witness-tree-heads.ndjson`: the SHA-256 of its first line, without the newline, is `aaf55bf7163e08c30fa22b4cf0dfe13bbbc37f6876c6c66fff5b0f776b90ef8d`.
2. `jidec-127.txt`: the JIDEC ledger's entry 127 as the ledger serves it (`https://ledger.horizonshield.dev/ledger/127?format=raw`). It names that line SHA-256 and the witness key. Its SHA-256 is `6d8ff0fbc1e2d3d0e3ef2e03b22be891c0cd380dba80d16153861894ec4ced67`.
3. `jidec-127.txt.ots`: the OpenTimestamps proof over that SHA-256 (also at `https://ledger.horizonshield.dev/ledger/127/ots`). It commits to the Bitcoin block header at height 972264 (merkle root `81b695d07d509468fab75fa9dc550808302bb6a7cf667a34058395b06d949653`, block time 2026-10-20 05:09:57 UTC).

```
python -m pip install opentimestamps-client
ots info docs/evidence/witness-2026-10-20-nenrin/jidec-127.txt.ots # shows the attestation at 972264
ots verify docs/evidence/witness-2026-10-20-nenrin/jidec-127.txt.ots # needs a Bitcoin node
ots info docs/evidence/witness-2026-10-20-nenrin/jidec-143.txt.ots # shows the attestation at 972850
```

Entry 127 describes the witness as "independent". That wording is corrected by a later entry, which cites entry 127 and does not edit it: jidec-143.txt (the ledger's entry 143 as served at https://ledger.horizonshield.dev/ledger/143?format=raw, proof also at https://ledger.horizonshield.dev/ledger/143/ots). It uses the wording of this README.

So the first tree head, the witness key and both receipts existed before 2026-10-20 05:09:57 UTC. The anchor bounds the time from above only.

## Two anchors, two heights

The packet holds two anchored ledger entries. Each has its own proof and its own Bitcoin height:

| record | role | record SHA-256 | proof | Bitcoin height |
|---|---|---|---|---|
| `jidec-127.txt` | entry 127: fixes the witness key and the first tree head | `6d8ff0fbc1e2d3d0e3ef2e03b22be891c0cd380dba80d16153861894ec4ced67` | `jidec-127.txt.ots` | 972264 |
| `jidec-143.txt` | entry 143: corrects how entry 127 describes the witness | `79837a3a2e557c34ec194f940ca2fd1f1934eb0874fed8b48d84738dde5b4eed` | `jidec-143.txt.ots` | 972850 |

Block 972850 has merkle root `bfb0efe3c54ef54dc8a7101d028b93e93be3b6e8e58fffd7ffd6cd5d27deb31c` and block time 2026-10-24 00:13:42 UTC.

Inside `jidec-143.txt`, the line `stamped to Bitcoin block 972264` sits in the "What it corrects" block. It names the anchor of entry 127, the entry being corrected. It is not the anchor of entry 143. Entry 143's own proof is `jidec-143.txt.ots`, at height 972850. `jidec-143.txt` is the anchored record and is not edited.

`tests/test_witness_receipt_nenrin.py` checks this offline, for each entry separately: the record's SHA-256, the proof's OpenTimestamps header (magic, version 1, file hash op `0x08`) and the 32-byte digest that follows it, and that the proof holds exactly one Bitcoin attestation, at the height in the table. For entry 127 it also checks steps 1 and 2 above. It checks that entry 143 cites entry 127's SHA-256, that the height named in the "What it corrects" block of `jidec-143.txt` is the height of entry 127's proof and not of entry 143's, that this table matches the proofs, and that `SHA256SUMS` matches the files. A correction proof that is swapped for entry 127's, truncated, or carries the other height fails. These are structural reads of the proof bytes. The tests do not evaluate the full operation chain, and checking the block header itself needs a node or a block explorer.

## Limits

These receipts do not establish:
- registry continuity in the receipt itself (`registry_continuity_established` stays false);
- absence of forks;
- payload retention;
- that every observer saw the same history.

Two witnesses from different operators on checkpoint 1 are a start on split-view detection, not proof of it. The June entry predates checkpointing and is outside both checkpoints.

The witness signs one receipt per checkpoint and never reissues it. Its log is append-only, and each tree head carries an RFC 9162 consistency proof from the previous one.

## Files

| file | what it is |
|---|---|
| `checkpoint-1.json`, `checkpoint-2.json` | the checkpoints as witnessed, sorted-key compact JSON (the digest is field-derived, see LIMITATIONS.md) |
| `witness-response-1.json`, `witness-response-2.json` | the witness responses, in the shape `--response` reads |
| `verification-1.json`, `verification-2.json` | `trace-verify receipt` output over those bytes |
| `witness-key.json` | the witness public key and its key id |
| `witness-tree-heads.ndjson` | the witness log's signed tree heads at capture |
| `jidec-127.txt`, `jidec-127.txt.ots` | the ledger entry that fixes the first tree head, and its OpenTimestamps proof |
| `jidec-143.txt`, `jidec-143.txt.ots` | the later ledger entry that corrects how entry 127 describes the witness, and its OpenTimestamps proof |
| `SHA256SUMS` | file integrity; not a signed statement |
13 changes: 13 additions & 0 deletions docs/evidence/witness-2026-10-20-nenrin/SHA256SUMS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
5f9aff1078ce709cde4d001b9da10f56213c13d98366c332f6ffaa8419cbfd62 README.md
96e73eecc552ff015a3bacc34889227de9df69d97f1bf3f7267ff2d5bacc5c9e checkpoint-1.json
40bf3f0307f910b235c3a9971c8753cac13d21ad68bbf77aaa154947624c5622 checkpoint-2.json
6d8ff0fbc1e2d3d0e3ef2e03b22be891c0cd380dba80d16153861894ec4ced67 jidec-127.txt
9385edf5e149c1ce6ca51e5b348e12be161658b8c1e16818b9a89e7bf11b6aad jidec-127.txt.ots
79837a3a2e557c34ec194f940ca2fd1f1934eb0874fed8b48d84738dde5b4eed jidec-143.txt
6a1945e8187aca410f3f0f914dd9a147678aa0fe89b43f528f5a30e419b78584 jidec-143.txt.ots
2889591c987ca3c010a2899c28ccd8e1c91830b98e6382240c5dc71e12a071ca verification-1.json
26a82d8f3e5be613cf68bd1b3107720960f52c918b134949e5d71ede6e4669bb verification-2.json
f51e8bc17f487edbf112e47293ef43fb4f765b172401a13560a03b4579608090 witness-key.json
e11d0d5d4abe73e1f8700759035f13af29da1f0260a0764164dab6ae32d31627 witness-response-1.json
ea5ef8e6f7edd89c7febcca9e34cf509a951d0b684b2dc37ea6dfd1c9d4ba109 witness-response-2.json
82173725ad57e32827ae399ecde8d7b2d409f89fc69865bc875cc2dd6efaad2b witness-tree-heads.ndjson
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"key_id":"bc133259c094f63694b4ec48a295d7501a9a0cd536df5631fb4663c155f7bc90","kind":"mmr_checkpoint","log_id":"trace-registry/v1","mmr_size":1,"prev_root":"","prev_size":0,"root":"3af8ddf2c1f429bb4fc670437e48640887f60de809b18f8ccea55fefb0c6639a","signature":"a1ad25e2fd8f56e9c07a345fd5bde66f950afffc9d55af91f586cef1840c4adcd992fc1e277c94f26fb673c0e0ad51a6fcff2e22cd58806133416d4c5c3e930e","timestamp":"2026-09-01T21:39:37Z","v":1}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"consistency_proof":{"kind":"consistency","new_peaks":["54a106b96982d54465745696c4c5e6210d1b794e803b834dd2c68d035dbfe610"],"old_peaks":["3af8ddf2c1f429bb4fc670437e48640887f60de809b18f8ccea55fefb0c6639a"],"size_a":1,"size_b":3,"v":1,"witness":[["75dd7ace80814feeb475f9cdafd83458db83da3bed38ba6549840183dc2ed313"]]},"key_id":"bc133259c094f63694b4ec48a295d7501a9a0cd536df5631fb4663c155f7bc90","kind":"mmr_checkpoint","log_id":"trace-registry/v1","mmr_size":3,"prev_root":"3af8ddf2c1f429bb4fc670437e48640887f60de809b18f8ccea55fefb0c6639a","prev_size":1,"root":"54a106b96982d54465745696c4c5e6210d1b794e803b834dd2c68d035dbfe610","signature":"35a107f5982d25e07675757e463fea2b5886e3d8c62765096c43e2ebb7a0f8dfe1d78f8c08f6b4551d0684d0ca296fc43ee8d97a712d332fb5d7c43e870bdf09","timestamp":"2026-09-25T18:51:29Z","v":1}
Loading