Documentation Report and proof record
Report and proof record
The report is what a person reads. The proof record is what a contract reads, and what the inspector signs. Hashes tie both to the evidence, so a record can be traced back to the files it came from.
Status. Built in the kit and tested. No record has been signed with the owner's key. All values on this page are invented sample data.
What the build writes#
| File | Content |
|---|---|
report.html | The report as one page to read or print, in the order the standard sets. It shows the inspector id, the issue time, the procedures performed and not performed, the three hashes, and who signed the record or "not signed" |
report.json | The report body and its hash. The hash is over this body, not over the page |
evidence-index.json | Every evidence file with its size and SHA-256, and the bundle hash |
match-report.json | Counts, every exception, every matched unit with model, firmware and driver version |
proof-record.json | The proof record only, with its signatures. Chain-neutral |
onchain-encoding.json | The record digest and the values for a registry call |
The report#
In the order of section 10 of the standard:
- Cover: facility, loan reference, engagement type, inspection date, inspector. The facility and the loan are named by pseudonym.
- Scope, and anything that could not be done and why.
- Result, with the count table: scheduled, system-read matched, physically sighted, exceptions.
- Findings register.
- Evidence index.
- Statement of independence.
- Hashes of the report and of the evidence bundle.
The proof record#
The record is a JSON file with the schema name ibc-proof-record/1. This one is the invented sample job, built on 23 November 2026 with a fixed issue time. It is not signed.
{
"schema": "ibc-proof-record/1",
"facilityId": "fac-7c1e",
"inspectorId": "DEMO-not-a-real-inspector",
"scheduleHash": "0xa1e95bf5c04316993754e2259bd61dd4a10256b87909eee1af78cdee5e1cc10d",
"reportHash": "0xd8316a621825b21f7cdee563c5fcdbab5846f57563a990e98908898829fb07fd",
"engagementType": "F",
"inspectionDate": "2026-12-10",
"issuedAt": "2026-12-10T15:00:00Z",
"validUntil": "2027-03-10",
"counts": { "scheduled": 16, "matched": 16, "sighted": 0, "exceptions": 0 },
"procedures": ["6.2"],
"result": "PASS",
"signatures": []
}
Its record digest is 0x489aaf5a9edfd8fc3550f4e7ed54bfee24d73df947170aad057d1764a7d4bc3f.
The fields#
Fourteen values are signed: every row below except schema and signatures, with counts holding four. The schema name enters the digest as its first word, the record tag.
| Field | Content | Signed |
|---|---|---|
schema | ibc-proof-record/1 | As the record tag |
facilityId | A pseudonym, one per engagement. No client or site name | Yes, as its SHA-256 |
inspectorId | The inspector's id. Required, never empty. Self-declared | Yes, as its SHA-256 |
scheduleHash | SHA-256 of the canonical JSON of the collateral schedule | Yes |
reportHash | SHA-256 of the canonical JSON of the report body | Yes |
engagementType | F, Q or E | Yes |
inspectionDate | YYYY-MM-DD | Yes |
issuedAt | The time the record was issued, in UTC: YYYY-MM-DDTHH:MM:SSZ. No other form | Yes |
validUntil | YYYY-MM-DD, meaning the last second of that day in UTC, or a full UTC time YYYY-MM-DDTHH:MM:SSZ. No other form | Yes |
counts.scheduled | The number of schedule lines | Yes |
counts.matched | Schedule lines whose serial was read exactly once | Yes |
counts.sighted | Units physically sighted under procedure 6.3. It is 0 unless "6.3" is in procedures | Yes |
counts.exceptions | Serial-match exceptions only. Findings from other procedures are in the report | Yes |
procedures | The procedures of the standard that were performed: a sorted list from "6.1" to "6.8", no duplicates, at least one entry | Yes, as a bit mask |
result | PASS, PASS_WITH_EXCEPTIONS or FAIL | Yes |
signatures | A list of signature envelopes. Empty means not signed | No. It is outside the digest |
The record holds no chain id, contract address or network name. A reader refuses a record whose dates, counts or procedures are in any other form. Nothing is repaired.
Today's kit emits procedures of ["6.2"] and sighted of 0, because the system read is the only procedure the tools record.
The record digest#
The digest is what the inspector signs. It is SHA-256 over 15 words. Each word is 32 bytes, so the input is exactly 480 bytes. A hash is used as its 32 bytes. A whole number is written big-endian, unsigned, and padded on the left with zeros.
| Word | Name | Value |
|---|---|---|
| 0 | Record tag | SHA-256 of the ASCII text ibc-proof-record/1 |
| 1 | Facility key | SHA-256 of facilityId as UTF-8 |
| 2 | Inspector key | SHA-256 of inspectorId as UTF-8 |
| 3 | Schedule hash | scheduleHash |
| 4 | Report hash | reportHash |
| 5 | Inspection date | Unix seconds at 00:00:00 UTC of inspectionDate |
| 6 | Issued at | Unix seconds of issuedAt |
| 7 | Valid until | Unix seconds at 23:59:59 UTC of the date, or the exact second if a full time was given |
| 8 | Scheduled | counts.scheduled |
| 9 | Matched | counts.matched |
| 10 | Sighted | counts.sighted |
| 11 | Exceptions | counts.exceptions |
| 12 | Procedures | A bit mask: bit 0 is 6.1, bit 1 is 6.2, and so on to bit 7 for 6.8. A record with only 6.2 has the value 2 |
| 13 | Engagement type | F = 0, Q = 1, E = 2 |
| 14 | Result | PASS = 1, PASS_WITH_EXCEPTIONS = 2, FAIL = 3 |
The digest is written as 0x followed by 64 lowercase hex characters. The same 480 bytes are what the registry hashes on chain, so the kit, the registry and a reader with a shell all reach the same digest. A way to compute it by hand is on Check a record yourself.
The signature#
- Scheme
eip191-secp256k1: secp256k1 ECDSA over the Keccak-256 hash of the text\x19Ethereum Signed Message:\n32followed by the 32 digest bytes. - Encoding: 65 bytes,
r(32),s(32),v(1).vis 27 or 28.sis not above half the curve order. - The inspector signs with a key that he alone holds. The kit computes the digest from the files of the inspection and never opens a key.
- Anyone can check a signature without a key, given the digest, the signature and the key id.
A signature shows who issued the record and that no field changed afterwards. It does not show that the facts are true.
The signature envelope#
Each entry in signatures has three fields.
| Field | Content |
|---|---|
scheme | eip191-secp256k1 |
keyId | The signing address: 0x and 20 bytes in hex. The kit writes it in lower case |
signature | 0x and 130 hex characters |
This envelope was made in a local test on 23 November 2026, over the digest above, by the first unlocked test account of a local development chain. That account's key is public knowledge. It is nobody's inspector key.
"signatures": [
{
"scheme": "eip191-secp256k1",
"keyId": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"signature": "0x49798c5326966c605d030a850107e0e4c766559bf4510a14dba7fcaf6ae446560018e64146aaec6ee54a1a067e9a4493b919b30afe1f8509109ecf1d050dfd2b1c"
}
]
A record carries one signature today. There is no co-signing.
How the hashes fit together#
All hashes are SHA-256. Canonical JSON means keys sorted at every level, no whitespace, UTF-8.
| Hash | Over what |
|---|---|
| Capture hash | Each capture file, byte for byte as it was captured |
| Schedule hash | Canonical JSON of the collateral schedule |
| Bundle hash | Canonical JSON of the list of evidence files with their hashes |
| Report hash | Canonical JSON of the report body, which contains the file list and the bundle hash |
| Record digest | The 15 words above. Not canonical JSON. The record contains the report hash |
So the signature fixes the digest, the digest fixes the report, and the report fixes every evidence file. Change one byte of a capture and inspect verify reports it.
Values for the registry#
onchain-encoding.json holds the record as a registry call takes it.
| Field | Type | How it is made |
|---|---|---|
facilityKey | bytes32 | SHA-256 of the facility id |
inspectorKey | bytes32 | SHA-256 of the inspector id |
scheduleHash, reportHash | bytes32 | As above |
inspectionDate, issuedAt, validUntil | uint64 | Unix seconds, as in words 5 to 7 |
scheduled, matched, sighted, exceptions | uint32 | The four counts |
procedures | uint16 | The bit mask |
engagementType | uint8 | F = 0, Q = 1, E = 2 |
result | uint8 | PASS = 1, PASS_WITH_EXCEPTIONS = 2, FAIL = 3. Zero means no record |
recordDigest | bytes32 | The digest |
signer, signature | address, bytes | The first signature's key and bytes, or null while the record is not signed |
Validity#
A record is valid from its inspection date to the end of its valid-until. After that it is stale, and a contract treats stale the same as FAIL. Nobody has to send anything for that to happen: the registry and the vault compare the time with the block time whenever they are read.
- The kit builds no record valid for more than 104 days: 90 days plus 14 days' grace.
- The registry refuses a record whose validity runs more than 105 days past its inspection date.
- A lender can set a shorter maximum age in its vault. It cannot extend a record.
The numbers of days are proposals in the standard.
Test vectors#
prototype/spec/proof-record-vectors.json in the repository holds seven invented records. For each: the JSON record, the 15 words in hex with their names, the 480-byte input and the expected digest. It also holds revocation digests, and record forms a reader must refuse.
Three implementations must agree with that file: the kit, the registry's recordDigest() in the contract tests, and later the Go code of the extension. The script that writes the vectors shares no code with the kit, on purpose. The vectors carry no signature, and no key was made or used to build them.
Registry v1, the earlier demo shown on Coston2#
Registry v1 took a smaller record and treated its digest as an opaque value.
| Registry v1 | Now | |
|---|---|---|
| Record digest | SHA-256 of the canonical JSON of the record without its signature field. Stored as given | The 15 words. Recomputed on chain |
| Signature | A field that was always empty. Nothing checked it | The envelope above. Checked by the kit and by registry v2 |
| Fields on chain | Result, three counts, two dates, three hashes, engagement type | The same, plus the inspector key, the issue time, the sighted count and the procedures |
onchain-encoding.json keeps every v1 key with its v1 meaning, so the v1 drivers read it unchanged. Registry v1 accepts the new digest because it does not look inside it.