Skip to content
snapshot

Protocol

QUIC wire protocol, the request lifecycle, and version negotiation. Every wire variant, message body, and verdict below is the real serialized output of the Rust protocol types from this run.

The exact messages machines exchange to run a job (Offer → Bid → Dispatch → Commit → Verify → Settle) and how they negotiate versions so different builds stay compatible.

Impact: Independent implementations can talk to each other and upgrade over time without splitting or breaking the network.

Wire schema
v1
tagged-enum envelope
Protocol
1.0.0
semver, negotiated
Min supported
1.0.0
below ⇒ VersionReject
Engine
mock-1
drives quorum policy
Request lifecycle
The happy path, end to end. R = Requester, W = Worker.
  1. 1
    OfferR W

    Requester broadcasts query_hash + a fresh nonce. No SQL yet — workers bid blind on the hash and cost hint.

  2. 2
    BidW R

    Worker replies Accept with an ETA, its attestation, and recent receipts. Requester selects k by trust + ETA.

  3. 3
    DispatchR W

    Full SQL + a scoped credential, sealed to each node key. For Sensitive data a SealedKey is gated on attestation.

  4. 4
    ProgressW R

    Liveness heartbeat while executing. A stall past the deadline ⇒ the requester re-dispatches to a fresh host.

  5. 5
    CommitW R

    result_hash is sent FIRST — commit-first — binding the worker to an answer before any bytes stream.

  6. 6
    VerifyR only

    Requester waits for quorum: q matching result hashes across the racing workers before accepting.

  7. 7
    StreamW R

    Winner only sends a Manifest then Chunk/Part frames over parallel uni-streams. Losers never stream.

  8. 8
    Cancel / RESETR W

    Losing racers are cancelled and RESET — their in-flight work is discarded; they incur no fault.

  9. 9
    ReceiptR only

    Requester emits a signed receipt per worker and gossips it into the reputation trail.

Wire envelope
The Wire tagged-enum variants carried over QUIC streams — the real registered set.
VariantDirectionPurpose
HelloR↔Wconnection handshake (versions + engine build)
VersionRejectR↔Wtyped version-incompatibility rejection
OfferR→Wprobe a candidate with query_hash + nonce
BidW→Raccept (ETA + attestation + receipts) or reject
DispatchR→Wfull SQL + scoped credential to top-k
ProgressW→Rliveness heartbeat during execution
CommitW→Rresult_hash first (commit-first)
ManifestW→Rdescribes result encoding/splitting
ChunkW→Rbulk result bytes (winner only)
PartW→Rheader for one parallel stream part
CancelR→WRESET losers
AckR↔Wgeneric acknowledgement / error
Message reference
Real wire instances, serialized by the Rust message types. These are actual bodies captured from the run — not hand-authored samples.

Verdict classes
Every receipt carries a verdict that maps to a fault class — provider faults are penalised; requester/job faults carry zero provider penalty; neutral verdicts penalise no one.
VerdictFault classMeaning
Correctneutralresult agreed with quorum
Incorrectproviderdiverged from the agreed hash
Timeoutprovideraccepted then failed to commit
Malformedproviderunparseable / protocol-violating reply
ResourceExceededrequesterjob exceeded its declared budget
Infeasiblerequesterquery could not be satisfied as posed
Inconclusiveneutralno quorum reached; no party penalised
Versioning & compatibility
A single Hello handshake is exchanged per connection before any work.
Hello handshake
wire_schema_version
1
protocol_version
1.0.0
min_supported
1.0.0
engine_version
mock-1
require_matching_engine_version
false

If a peer's protocol_version < our min_supported (1.0.0), the connection is closed with a typed VersionReject{ reason, our_version, min_supported }.

engine_version drives result-determinism and quorum policy — hashes are only compared across matching engines. A match is not strictly required here, but mismatched engines never enter the same quorum.

Compatibility · our min 1.0.0
Peer protocolOutcomeWhy
1.0.0 Acceptcurrent — full feature set
1.0.0 Acceptexactly min_supported
0.9.9 Rejectbelow min_supported ⇒ VersionReject