Artifact integrity
Evidence format
submitDelivery() stores one non-zero bytes32 evidence hash. The escrow does not fetch, inspect or retain the underlying artifact.
Evidence envelope
The current envelope uses SHA-256 digests for delivered files, a commit identifier, runtime fingerprint and log digest. Retrieval locations carry no integrity by themselves; downloaded bytes become evidence only when they match the digest committed in the statement.
statement files[] → path + sha256 commit → source revision predicate runtime → pinned environment log → sha256 artifact_ref / logs_ref → retrieval only
Producer procedure
- Freeze the acceptance-criteria JSON before the seller signs.
- Collect delivered bytes without newline, archive or filename transformations.
- Compute a digest for every artifact and log from the exact byte stream.
- Build the statement in the documented in-toto shape and sort subjects by UTF-8 bytes.
- RFC-8785-canonicalize the
statement, SHA-256 hash those canonical bytes and retain both forms. - Put that digest in
artifact_hashand submit the same value, 0x-prefixed, to the escrow.
Consumer procedure
- Read the on-chain evidence hash and
termsHashfrom the deal. - Resolve the envelope and underlying artifacts from the agreed locations.
- Recompute the canonical
statementdigest and require it to equal bothartifact_hashand the on-chain evidence hash. - Recompute each artifact and log digest from retrieved bytes.
- Pin the source revision and runtime before evaluating criteria.
- Record Pass only when all required checks reproduce; otherwise use the documented Fail/Inconclusive distinction.
Criteria commitment
For the current schema-validity verifier, termsHash is the SHA-256 of RFC-8785-canonical acceptance-criteria JSON. The escrow stores that value as opaque bytes; the verifier reproduces and checks it.
Dispute evidence
While a deal is disputed, buyer and seller can call submitEvidence(). The contract emits an ERC-1497-shaped Evidence event and stores nothing. Availability and interpretation remain outside the escrow.
Common failure modes
| Failure | Meaning | Response |
|---|---|---|
| Retrieval location unavailable | Availability failed; integrity is not yet known | Preserve the request failure and do not infer Pass. |
| Envelope digest mismatch | The retrieved statement is not the committed statement | Stop before evaluating nested criteria. |
| Artifact digest mismatch | Retrieved bytes differ from the statement | Record the mismatch as evidence. |
| Runtime cannot be reproduced | The result cannot be independently repeated | Use Inconclusive unless signed criteria explicitly define another result. |
| Criteria are subjective | Determinism is impossible from bytes alone | Do not manufacture an objective verifier rule; rely on the agreed challenge/arbitration path. |
submitDelivery() call is what binds the evidence hash to the seller role.