# West Orange Labs public log: exact format (WOL-LOG v1)

Status: specification, dated 2026-11-10. The checker `verify_log.mjs` (Node, no packages) is a reference implementation of it.
If this text and a program ever disagree, the program is wrong and this text is right.

## 1. What the log is

A list of lines that only grows. One line is added for each signed certificate, in the order the lines were added. Lines are
never changed or removed. Each line carries the hash of the line before it, so the lines form one chain across all facilities.
A signed checkpoint, published separately, vouches for the whole chain up to a stated position.

The log holds fingerprints only: each certificate's digest, its previous digest, issue time, signing key id and format
version. It holds no facility name, no result and, deliberately, no certificate signature (section 9).

## 2. Text rules used everywhere below

* All text is UTF-8. A "line break" in a hashed text is the single character U+000A.
* `|` is the single character U+007C. No field contains it.
* Numbers (`seq`, `msg_version`, `tree_size`) are written in plain decimal digits with no sign, spaces, leading zeros or separators.
* Hashes are SHA-256, written as 64 lower-case hexadecimal characters.
* Signatures are Ed25519 (RFC 8032), 64 bytes, written in URL-safe base64 without padding (86 characters; characters A-Z a-z 0-9 - _).
  Public keys are the raw 32 bytes, written the same way (43 characters).
* A key id is the first 16 hexadecimal characters of the SHA-256 of the key's raw 32 bytes. (The certificate key
  `_Ad5kKdkDBXzUVCPyLH4UhumI4yUzjenNYc9Krvme7I` has id `02e78413400148bd` under this rule.)

## 3. Times

* `issued_at` (log line): the certificate's issue time in UTC as `YYYY-MM-DDTHH:MM:SS.ffffffZ`: exactly six digits of
  fraction, always shown (a trailing zero is NOT dropped), letter `T`, trailing letter `Z`. Example: `2026-11-09T12:41:00.130210Z`.
  This is the text that is hashed. It is published as this text, so a checker never has to convert times.
  (Some programs print the same instant as `2026-11-09 12:41:00.13021+00`, dropping the trailing zero; a program that starts
  from that form must pad the fraction to six digits. The published text is always the six-digit form.)
* `signed_at` (checkpoint): UTC as `YYYY-MM-DDTHH:MM:SS.mmmZ`: exactly three digits of fraction. Example: `2026-11-10T20:00:00.000Z`.
  This is what JavaScript's `Date.toISOString()` prints.

## 4. A log line (`entries.json`)

```json
{
  "format": "WOL-LOG-v1",
  "count": 30,
  "entries": [
    {
      "seq": 1,
      "digest": "b0a1d14f...5c8c",
      "prev_digest": null,
      "issued_at": "2026-11-08T13:26:19.273663Z",
      "key_id": "02e78413400148bd",
      "msg_version": 1,
      "prev_entry_hash": "0000...0000",
      "entry_hash": "073789b7...515e"
    }
  ]
}
```

Each entry has exactly these eight fields, in any order, and no others.

| field | form |
|---|---|
| `seq` | integer 1, 2, 3, ... with no gap; the line's position in the list |
| `digest` | 64 lower-case hex; the certificate's digest |
| `prev_digest` | 64 lower-case hex, or `null` when the certificate named no earlier one |
| `issued_at` | text as in section 3 |
| `key_id` | the id of the key that signed the certificate |
| `msg_version` | the certificate's format version, integer |
| `prev_entry_hash` | `entry_hash` of line `seq - 1`; for line 1, 64 zeros |
| `entry_hash` | see below |

### entry_hash

```
entry_hash = hex( SHA-256( UTF-8( T ) ) )
T = "WOL-LOG-ENTRY-v1" | seq | digest | prev_digest | issued_at | key_id | msg_version | prev_entry_hash
```

eight pieces joined by `|`, with the first piece the fixed label `WOL-LOG-ENTRY-v1`. When `prev_digest` is `null`, write
nothing in its place (two `|` side by side). There is no trailing `|` and no line break.

Worked example (line 1 of the real log):

```
WOL-LOG-ENTRY-v1|1|b0a1d14fed2d9a0885baee640c55404700969af0ff31af5741e1f5757fa55c8c||2026-11-08T13:26:19.273663Z|02e78413400148bd|1|0000000000000000000000000000000000000000000000000000000000000000
→ 073789b7b4f0cbe89db7a58b6cdbedd4e1c21dee822c42bea4a0ed6d5aee515e
```

### What a checker verifies on the list

1. Every line has exactly the eight fields in the forms above.
2. `seq` is 1, 2, 3, ... in list order.
3. Line 1's `prev_entry_hash` is 64 zeros; every later line's equals the previous line's `entry_hash`.
4. Every `entry_hash` equals the recomputation.
5. No `digest` appears twice.

## 5. The checkpoint (`checkpoint.json`)

```json
{
  "format": "WOL-LOG-CHECKPOINT-v1",
  "tree_size": 30,
  "head_hash": "a74f41a7...04f2",
  "heads_digest": "6cfd8f57...8a2e",
  "signed_at": "2026-11-10T20:00:00.000Z",
  "key_id": "<id of the log key>",
  "signature": "<86 characters>",
  "msg_version": 1
}
```

* `tree_size`: the number of lines the checkpoint covers (the `seq` of the last covered line).
* `head_hash`: the `entry_hash` of line `tree_size`.
* `heads_digest`: see section 6.
* The signature is Ed25519 over the UTF-8 bytes of

```
"WOL-LOG-CHECKPOINT-v1" | tree_size | head_hash | heads_digest | signed_at | key_id
```

six pieces joined by `|`, no trailing `|`, no line break.

The signing key is the **log key**, a different key from the one that signs certificates. The first piece of the signed text is
a fixed label that no certificate message starts with (a certificate message starts with a 64-character hash), and the two
messages have different numbers of pieces, so a certificate signature cannot be passed off as a checkpoint signature, nor the reverse.

### What a checker verifies on the checkpoint

1. `tree_size` is not larger than the number of lines in the list. (The list may be longer: lines added after the checkpoint
   was signed are simply newer than it.)
2. The list's line `tree_size` has `entry_hash` equal to `head_hash`.
3. `key_id` equals the id of the log public key being used.
4. The signature is valid for that key over the text above.

A checkpoint proves: "as of `signed_at`, the log was exactly these `tree_size` lines, and these were the newest certificates."
It does not prove anything about later times. That is why checkpoints are re-signed on a schedule even when nothing was added.

## 6. The list of newest certificates (`heads.json`) and `heads_digest`

`heads.json` lists, for each facility whose Financing Condition Report is public today, the digest of its newest certificate:

```json
{ "format": "WOL-HEADS-v1", "count": 10, "heads": [ { "facility_id": "coreweave-ddtl-1", "digest": "de49ba92...a42a" } ] }
```

It is exactly the set of rows in the public certificate list: published facilities that carry a Financing Condition Report,
newest certificate for each. A facility that was never published, or has been withdrawn, is not in it.

```
heads_digest = hex( SHA-256( UTF-8( L ) ) )
L = the lines  facility_id ":" digest  for every entry of heads, sorted by facility_id in plain code-unit order
    (facility ids use only a-z, 0-9 and "-"), joined by a single line break (U+000A), with no line break after the last.
    An empty list gives the SHA-256 of the empty text.
```

The sort key is the facility_id alone, not the whole text line. This matters because `:` sorts after `-`: for the facilities
`coreweave-ddtl-5` and `coreweave-ddtl-5-5`, sorting whole lines would put `coreweave-ddtl-5-5:...` first, while sorting by
facility_id puts `coreweave-ddtl-5` first (it is a prefix of the other). The correct order is therefore:

```
coreweave-ddtl-5:8e3a3356c8e2b2a194ad56d491a1f5e9bcc7d711ed440eaba406b13e26864b91
coreweave-ddtl-5-5:94885f32c233f085aa69a8e3e2734ed0a4f1f8cb051da71168ea7c6be023c655
```

and for those two lines `heads_digest` is `85ee82948f3b8ae218ba79e486217b4c7f267ab1aabe84b0957ebb46c4bb7e9b` (the whole-line order would give `b7e575ccfd58376b658b05d55073566b4cae33f7ffc616c6ea02476d7406c173`, which is wrong).

Because `heads_digest` is inside the signed checkpoint, the list cannot be altered without detection. The list shown on the
site is live. If a facility is added or withdrawn after the latest checkpoint, the live list no longer matches
`heads_digest` until the next checkpoint is signed; a checker then reports "cannot confirm the newest certificate yet" and
does not guess.

## 7. Checking one certificate you hold

1. Check its own signature with the certificate key (the Verify page already does this in the browser).
2. Find the line whose `digest` equals the certificate's digest. If none: the certificate is not in the log.
3. Check the whole list (section 4) and the checkpoint (section 5).
4. Compare with `heads.json`: if the facility's digest there equals yours (and `heads_digest` matches, section 6), yours was the
   newest as of `signed_at`. If a different digest is listed, a newer certificate exists.

Limits to say plainly: "newest" is true as of `signed_at`, not forever. The log does not prove that a certificate's content is
right, only that it was issued, when it was logged in order, and that nothing in the list was changed or removed afterward.
It is not a credit rating.

## 8. Versions

`WOL-LOG-ENTRY-v1` and `WOL-LOG-CHECKPOINT-v1` are fixed. A change to any text rule above gets a new label (`-v2`); old lines
keep their old hashes. Both labels are part of the hashed and signed text, so a v2 line cannot be mistaken for a v1 line.

## 9. Why the certificate signature is not in the log

A certificate's signature covers the facility, the result, the provisional flag and the as-of date. Anyone holding the
signature, the digest and the previous digest can try every possible facility, result, flag and date until one makes the
signature check out. That takes a fraction of a second (tested: all ten superseded certificates were recovered
with 14,400 guesses). Publishing signatures for certificates that are not public would therefore publish their
contents. The log proves a certificate was recorded by its fingerprint (the digest is a hash of a much larger record and
cannot be guessed), and the signature of the certificate you hold is checked separately, as before.
