Innovation Blockchain

Documentation · Coston2 testnet prototype · invented data

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#

FileContent
report.htmlThe 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.jsonThe report body and its hash. The hash is over this body, not over the page
evidence-index.jsonEvery evidence file with its size and SHA-256, and the bundle hash
match-report.jsonCounts, every exception, every matched unit with model, firmware and driver version
proof-record.jsonThe proof record only, with its signatures. Chain-neutral
onchain-encoding.jsonThe record digest and the values for a registry call

The report#

In the order of section 10 of the standard:

  1. Cover: facility, loan reference, engagement type, inspection date, inspector. The facility and the loan are named by pseudonym.
  2. Scope, and anything that could not be done and why.
  3. Result, with the count table: scheduled, system-read matched, physically sighted, exceptions.
  4. Findings register.
  5. Evidence index.
  6. Statement of independence.
  7. 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.

FieldContentSigned
schemaibc-proof-record/1As the record tag
facilityIdA pseudonym, one per engagement. No client or site nameYes, as its SHA-256
inspectorIdThe inspector's id. Required, never empty. Self-declaredYes, as its SHA-256
scheduleHashSHA-256 of the canonical JSON of the collateral scheduleYes
reportHashSHA-256 of the canonical JSON of the report bodyYes
engagementTypeF, Q or EYes
inspectionDateYYYY-MM-DDYes
issuedAtThe time the record was issued, in UTC: YYYY-MM-DDTHH:MM:SSZ. No other formYes
validUntilYYYY-MM-DD, meaning the last second of that day in UTC, or a full UTC time YYYY-MM-DDTHH:MM:SSZ. No other formYes
counts.scheduledThe number of schedule linesYes
counts.matchedSchedule lines whose serial was read exactly onceYes
counts.sightedUnits physically sighted under procedure 6.3. It is 0 unless "6.3" is in proceduresYes
counts.exceptionsSerial-match exceptions only. Findings from other procedures are in the reportYes
proceduresThe procedures of the standard that were performed: a sorted list from "6.1" to "6.8", no duplicates, at least one entryYes, as a bit mask
resultPASS, PASS_WITH_EXCEPTIONS or FAILYes
signaturesA list of signature envelopes. Empty means not signedNo. 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.

WordNameValue
0Record tagSHA-256 of the ASCII text ibc-proof-record/1
1Facility keySHA-256 of facilityId as UTF-8
2Inspector keySHA-256 of inspectorId as UTF-8
3Schedule hashscheduleHash
4Report hashreportHash
5Inspection dateUnix seconds at 00:00:00 UTC of inspectionDate
6Issued atUnix seconds of issuedAt
7Valid untilUnix seconds at 23:59:59 UTC of the date, or the exact second if a full time was given
8Scheduledcounts.scheduled
9Matchedcounts.matched
10Sightedcounts.sighted
11Exceptionscounts.exceptions
12ProceduresA 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
13Engagement typeF = 0, Q = 1, E = 2
14ResultPASS = 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#

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.

FieldContent
schemeeip191-secp256k1
keyIdThe signing address: 0x and 20 bytes in hex. The kit writes it in lower case
signature0x 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.

HashOver what
Capture hashEach capture file, byte for byte as it was captured
Schedule hashCanonical JSON of the collateral schedule
Bundle hashCanonical JSON of the list of evidence files with their hashes
Report hashCanonical JSON of the report body, which contains the file list and the bundle hash
Record digestThe 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.

FieldTypeHow it is made
facilityKeybytes32SHA-256 of the facility id
inspectorKeybytes32SHA-256 of the inspector id
scheduleHash, reportHashbytes32As above
inspectionDate, issuedAt, validUntiluint64Unix seconds, as in words 5 to 7
scheduled, matched, sighted, exceptionsuint32The four counts
proceduresuint16The bit mask
engagementTypeuint8F = 0, Q = 1, E = 2
resultuint8PASS = 1, PASS_WITH_EXCEPTIONS = 2, FAIL = 3. Zero means no record
recordDigestbytes32The digest
signer, signatureaddress, bytesThe 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 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 v1Now
Record digestSHA-256 of the canonical JSON of the record without its signature field. Stored as givenThe 15 words. Recomputed on chain
SignatureA field that was always empty. Nothing checked itThe envelope above. Checked by the kit and by registry v2
Fields on chainResult, three counts, two dates, three hashes, engagement typeThe 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.