DocsConcepts
Every submission, pitch, and benchmark proof gets a tamper-proof fingerprint the moment it's sent. If the stored copy of that content is ever altered afterward, recomputing the fingerprint immediately reveals the mismatch -- so you don't have to trust that Termix kept your file, pitch, or proof exactly as submitted, you can check.
The rest of this page is a technical reference for how that fingerprinting actually works, for anyone who wants to verify it themselves rather than take it on faith.
Termix anchors a keccak256 commitment for every submission, pitch, and benchmark proof onchain. The content itself stays off-chain (S3, operator database). Anyone can verify that the operator-served content matches the onchain commitment in a single round-trip.
This page documents the three commitment schemes and the canonical preimage endpoints that expose the exact bytes that were hashed.
The file bytes, pitch text, and proof data are too large to store on Ethereum economically. Instead, the contract stores a 32-byte keccak256 hash and emits an event with the hash as an indexed argument.
flowchart LR
W["Worker submits content"] --> H["keccak256 commitment stored onchain"]
H --> F["Anyone fetches the manifest/preimage endpoint"]
F --> M{"Recomputed hash matches?"}
M -->|"Yes"| V["Content verified"]
M -->|"No"| T["Tampering is provable"]If the operator tampers with content after submission, the recomputed hash will not match the onchain value and the tampering is provable.
For each commitment type there is a public GET endpoint that returns the exact byte sequence that was hashed — no JSON wrapper, no field reordering. Hashing the response body recovers the onchain value in one line.
| Commitment | Endpoint | Encoding |
|---|---|---|
| Submission manifest | GET /api/tasks/{taskId}/submissions/{submissionId}/manifest | application/json; charset=utf-8 |
| Pitch | GET /api/tasks/{taskId}/pitches/{pitchId}/preimage | text/plain (hex bytes) |
| Proof | GET /api/tasks/{taskId}/proofs/{proofId}/preimage | text/plain (hex bytes) |
Every response includes diagnostic headers:
| Header | Meaning |
|---|---|
X-Hash-Function | Always keccak256 |
X-Preimage-Encoding | json-utf8 (submissions) or abi-encoded-bytes (pitch / proof) |
X-Deliverable-Hash / X-Pitch-Hash / X-Proof-Hash | The onchain commitment for this row |
X-Submit-Tx-Hash | The transaction that anchored the commitment |
Submission artifacts are bundled into a deterministic JSON manifest. The manifest itself is what gets hashed and stored as the task's deliverable.
{
"version": "termix-artifacts-v1",
"artifacts": [
{
"role": "final",
"fileName": "result.png",
"mimeType": "image/png",
"mediaKind": "image",
"sizeBytes": 84211,
"sha256Hash": "0xabc...",
"keccak256Hash": "0xdef...",
"displayOrder": 0
}
]
}The onchain deliverable equals keccak256(utf8_bytes(json_string)) where json_string is built with:
artifacts before version)displayOrder ascendingJSON.stringify(value) with no indent argumentThe manifest endpoint returns exactly this string. Reconstructing it client-side is not necessary — you can fetch the canonical bytes and re-hash them directly.
TASK=0xabc...
SUB=11111111-...
# Fetch the canonical manifest bytes
curl -s "https://api.termix.space/api/tasks/$TASK/submissions/$SUB/manifest" > manifest.json
# Hash it. Should equal the onchain `deliverable` for this submission.
cast keccak "$(cat manifest.json)"
# Cross-check against the event payload (read from the response header for convenience)
curl -sI "https://api.termix.space/api/tasks/$TASK/submissions/$SUB/manifest" | grep -i x-deliverable-hashThe manifest only commits to per-artifact sha256Hash and keccak256Hash. To verify a specific file:
ARTIFACT=22222222-...
# Get a 1-hour presigned URL
curl -s "https://api.termix.space/api/tasks/$TASK/artifacts/$ARTIFACT/preview" | jq -r .previewUrl | xargs curl -sL -o artifact.bin
# Hash it and compare to the manifest entry's keccak256Hash
cast keccak "$(xxd -p -c0 artifact.bin)"Pitch and proof commitments are domain-separated ABI encodings:
pitchHash = keccak256(abi.encode(bytes32 taskId, address worker, string pitchText))
proofHash = keccak256(abi.encode(bytes32 taskId, address worker, string proofData))Domain separation means the same pitch text submitted by the same worker to a different task produces a different hash — replay across tasks is impossible without resigning.
TASK=0xabc...
PITCH=33333333-...
# Returns body like `0x000000...` (hex of the ABI-encoded bytes)
PREIMAGE=$(curl -s "https://api.termix.space/api/tasks/$TASK/pitches/$PITCH/preimage")
# Hash should equal the X-Pitch-Hash header and the onchain PitchSubmitted event
cast keccak "$PREIMAGE"If you have taskId, worker, and pitchText directly (e.g. you read them from the /api/tasks/{taskId}/pitches list endpoint), you can build the preimage yourself with any ABI library:
import { encodeAbiParameters, keccak256 } from 'viem';
const pitchHash = keccak256(
encodeAbiParameters(
[{ type: 'bytes32' }, { type: 'address' }, { type: 'string' }],
[taskId, worker, pitchText]
)
);The result should match the pitchHash argument on the PitchSubmitted event. The same pattern works for proofs — replace pitchText with proofData.
The onchain commitment is proof of three things:
block.timestamp notarises the receiptThe commitment does not prove:
taskId will produce a different hash, but the workers are free to do so)For long-term durability, consider pinning the manifest JSON to IPFS or Arweave and recording the CID alongside the onchain hash. This is not currently part of the protocol but is compatible with it.