Why two nodes must agree before anyone sees an answer
Commit-reveal for paid compute: what a commitment binds, the job state machine, the third-node tiebreak and the copy gap that gaussia-match v0.9.1 closed.
Paying for compute invites copying
Gaussia’s design pays nodes in USDG for verified search jobs [4]. Once results are paid, there is a cheap way to earn: skip the work and hand in someone else’s answer, or a plausible made-up one. A volunteer network has no way to look inside a stranger’s machine, so the check has to come from the results themselves.
The design sends every job to two randomly chosen nodes. Each commits to a hash of its result before it can see the other’s, and the job is verified only when the two revealed hashes are equal. If they differ, a third node decides. This is blind matching, and gaussia-match (v0.9.2, a TypeScript library and CLI) is the reference implementation of its rules [1]. Nothing in it is deployed: it is the logic a coordinator or a future contract would run.
What a commitment binds
A commitment is one keccak256 over four 32-byte words [2]:
commit = keccak256(abi.encode(bytes32 jobId, bytes32 resultHash, address wallet, bytes32 salt))- jobId ties it to one job, so it can’t be reused on another.
- wallet ties it to the node. A node that copies another node’s commitment cannot reveal it as its own.
- salt is 32 random bytes, secret until the reveal. Without it, a node could hash the likely results and test them against the other node’s commitment.
Real output from the README walkthrough, on an illustrative result file [1]:
gaussia-match commit
$ gaussia-match commit --job-label planet-hunt/example-0001 --result examples/result.node-a.json --wallet 0x1111111111111111111111111111111111111111job 0x9841a938a4dfaaed48a2fd1ce2df9fc2129b86032e976c3f39107ab380f55a74result 0xa8de9a2afcec87d4005d46126037f4df5747fb0e2185c57349254ead46536d9bwallet 0x1111111111111111111111111111111111111111salt 0x689e38404ac4a0ac74cbe93b8e821181b1cfc8ec47518a9bc346e4737abf57b1commit 0xca07b46a1a89115fafb04d75bc3f739ea8c8dc5d3b1406cfa3aa3662b44efd78Salt generated from the system CSPRNG. Keep it secret and keep it: you need it to reveal.Revealing the same four values prints PASS. Changing any of them (another wallet, another salt, another result) prints FAIL and exits 1.
The job state machine
One job holds two assigned wallets. The rules are a small state machine, driven by a clock the caller supplies, so a coordinator, a test or a contract can run the same logic [2]:
SPEC.md
commit A, commit B reveal A, reveal Bcommitting ───────────────────▶ revealing ───────────────────────▶ verified (hashes equal) │ │ └─▶ needs_tiebreak (hashes differ) │ commit deadline, │ reveal deadline, │ someone missing │ someone missing ▼ ▼needs_replacement expired │ replace(wallet) └──▶ committing (fresh commit window)The rules that make it blind:
- Reveals open only when every slot has committed. A reveal before that is refused (
early_reveal). No answer is shown while someone can still choose theirs. - A commitment equal to one already on the job is refused (
duplicate_commit): it can only be a copy. - A no-show at commit time can be replaced, because nothing has been revealed yet. A no-show at reveal time ends the job (
expired): an answer may already be public, so the round can’t continue blind and the job is re-queued.
Which two wallets get a job is also deterministic: each eligible wallet gets a score from a seed and the job id, and the lowest scores are selected. Anyone can recheck the selection from the published seed and node list [1].
When the pair disagrees
Different hashes move the job to needs_tiebreak. A third node, one that has not held a slot on this job, is picked the same deterministic way and runs the job blind [2]:
- Its hash equals one of the pair’s: the job is
verified. That pair node and the third node are paid; the other pair node is flagged as an outlier. - It equals neither:
no_majority. Nobody is paid and nobody is flagged, because no result has two votes.
Differing hashes do not always mean someone cheated. The README’s third example result found the same signal with slightly different numbers. The advisory compare command shows it, and says plainly that it decides nothing[1]:
gaussia-match compare
$ gaussia-match compare examples/result.node-a.json examples/result.node-c.json \ --period-tol 0.001 --epoch-tol 0.01 --depth-tol 0.05a examples/result.node-a.json (1 signal, result_hash a8de9a2afcec…)b examples/result.node-c.json (1 signal, result_hash ef1e053ca554…)hashes differ: this job would go to a tiebreaktolerance period 0.001 d, epoch 0.01 d, depth 5% MATCH tic 1000001 P=3.2860001 dP=0.0000399 d dT0=0.0000800 d (1 cycles) dDepth=0.630%AGREE 1 matched, 0 only in a, 0 only in b (advisory: only equal result hashes verify a job)The tolerances in that command are example values, not Gaussia parameters.
The copy gap v0.9.1 closed
A tiebreak has a weak spot. By the time the third node is assigned, the pair has already revealed. If the third node could read those two hashes before committing, it could copy one and always land in the majority, paid and never flagged, without running anything.
From v0.3.0, keeping those hashes away from the third node was left to whoever operates the job. v0.9.1 added MatchJob.publicSnapshot(): the job state and event log with every revealed result hash set to null while the job is open [3]. Commitments stay visible, because they hide the result. After the job closes, nothing is hidden.
The same idea for review votes
Signals that survive matching and filtering are planned to go to people, who vote on folded light curves. Votes are sealed the same way, so nobody can follow the crowd. Revealing a different choice than the one committed fails [1]:
gaussia-match vote
$ gaussia-match vote --signal-label signal/example-0001 --choice not_transit \ --wallet 0x3333333333333333333333333333333333333333 \ --salt 0x7777777777777777777777777777777777777777777777777777777777777777 \ --commit 0x2ab998479ec5241d90d0cc8948f632dee141d77a057086c1c342d7054e00c4adFAIL the vote reveal does not open commitment 0x2ab998479ec5241d90d0cc8948f632dee141d77a057086c1c342d7054e00c4adThe vote threshold is TBD, so the library’s tally requires you to pass one.
What's in progress
- Nodes, pools and contracts are in progress; none is live. gaussia-match is a library and a CLI; it runs no network and no job queue.
- The job coordinator, which picks the seed and serves
publicSnapshot()at launch, is in progress. solidity/src/GaussiaMatch.solis a Solidity reference library tested against the vectors, not a deployed contract.- The on-chain tiebreak order, the vote threshold and any Sybil defence beyond an allow-list are open.
- Assignment is only as fair as its seed, and a block producer has some influence over a block hash.