@@ -223,37 +223,34 @@ precompile `0x0000000000000000000000000000000000000802` and deploys
223223
224224### Commit-reveal flow status (Ritual Chain testnet)
225225
226- Proved ** live on-chain** (bounty 2, two participants) using ** standard
227- second-based deadlines ** — which only work because of the ms normalisation :
226+ Proved ** live on-chain on the v3 deployment ** ( ` 0x97e1907022... ` ) —
227+ bounty 1, two participants, standard second-based deadlines :
228228
229229| Step | TX Hash | Status |
230230| ------| ---------| --------|
231- | ` createBounty ` (0.001 RITUAL, second-based deadlines ) | ` 0x05a19b02e42c99ad22835fbca3a9509c02142e046d52137373cf0893e32714de ` | ✅ |
232- | ` submitCommitment ` (participant 1) | ` 0x2e50ef72865cb69cedbc55354ae97696f0bab8a178bdfe19932b749e36a3469a ` | ✅ |
233- | ` submitCommitment ` (participant 2) | ` 0xcd78b35700a6e7ccf4e39ab2b37868f2a6d8316a56531b5171cb43732cd02240 ` | ✅ |
234- | ` revealAnswer ` (participant 1, commitment verified) | ` 0xb51211e616130d5815afbfb37474036db63c7c6d35ff6b0afed413c66e186e4e ` | ✅ |
235- | ` revealAnswer ` (participant 2, commitment verified) | ` 0x6e692a3a15a69c6528331f5592134ead619ed0882f564480072ce5ef8237188d ` | ✅ |
236- | ` judgeAll ` (LLM precompile 0x0802) | blocked by Ritual billing — see note | ⏳ |
231+ | ` createBounty ` (0.0001 RITUAL) | ` 0x15485e2e29ffb417d01feb9809b9dd4fbdcfbb5387592d5f51612129ae01e75d ` | ✅ |
232+ | ` submitCommitment ` (participant 1) | ` 0xb43e3bc9051c26148c821cac80263273a85e3d9793752fc759a170ce05711949 ` | ✅ |
233+ | ` submitCommitment ` (participant 2) | ` 0x5d8857ec150b96bc1ab203d26d8017ca5adbc5c867855cf51ba93dd06a24bc85 ` | ✅ |
234+ | ` revealAnswer ` (participant 1, commitment verified) | ` 0x5229cff2d40516d996ba9535da9f5b082691978bad3ac7d0cecbe19dcf3f96c3 ` | ✅ |
235+ | ` revealAnswer ` (participant 2, commitment verified) | ` 0x5920a784a6252a7e548bcb83adcaf8c2e02618434784f4d8ee6ad806d853e4ca ` | ✅ |
236+ | ` judgeAll ` (LLM precompile 0x0802) | blocked by Ritual billing (executor 0xB42e435c..., 0.311 RITUAL reservation) — see note | ⏳ |
237237| ` finalizeWinner ` | after ` judgeAll ` | ⏳ |
238238
239- The ** commit-reveal core** (the anti-cheating mechanism the assignment asks
240- for) is proven end-to-end on Ritual: commitments are hidden during submission,
241- both reveals verified against ` keccak256(answer, salt, msg.sender, bountyId) ` ,
242- and ` revealedCount == 2 ` .
243-
244- > ** ` judgeAll ` status (honest).** The LLM precompile call was attempted live.
245- > Two Ritual-specific requirements were discovered and resolved:
246- > 1 . ** Executor must be TEE-registered** — ` executorAddress ` in the LLM request
247- > cannot be ` 0x0802 ` ; it must be a registered executor such as
248- > ` 0xB42e435c4252A5a2E7440e37B609F00c61a0c91B ` (resolved — error cleared).
249- > 2 . ** Wallet pre-payment** — Ritual reserves a fixed ` 0.311 RITUAL ` of wallet
250- > balance per inference (independent of ` maxCompletionTokens ` ). The deployer
251- > wallet had insufficient testnet RITUAL, so the live call could not
252- > complete. The contract path itself is correct (verified against the
253- > workshop's request encoding and the same 5-tuple output decode rivaleuc
254- > uses); completing it only needs a wallet funded via the Ritual testnet
255- > faucet. ` judgeAll ` /` finalizeWinner ` are fully exercised in the 46-test
256- > suite with a mocked precompile.
239+ The ** commit-reveal core** — the anti-cheating mechanism the assignment
240+ requires — is live on the current v3 contract: commitments hidden during
241+ submission, reveals verified against
242+ ` keccak256(answer, salt, msg.sender, bountyId) ` , ` revealedCount == 2 ` .
243+
244+ \> ** ` judgeAll ` status (honest).** The LLM precompile call was attempted live.
245+ \> Two Ritual-specific billing requirements were discovered:
246+ \> 1. ` executorAddress ` must be a TEE-registered executor (e.g.
247+ \> ` 0xB42e435c4252A5a2E7440e37B609F00c61a0c91B ` — resolved, error cleared).
248+ \> 2. Ritual reserves a fixed ** 0.311 RITUAL** of wallet balance per inference;
249+ \> the deployer wallet needs pre-funding via the Ritual testnet faucet.
250+ \> The contract path is correct (verified against the workshop's request
251+ \> encoding and the same output decode rivaleuc uses).
252+ \> ` judgeAll ` /` finalizeWinner ` are fully exercised in the 52-test suite
253+ \> with a mocked precompile.
257254
258255> On Ritual Chain every step is functional, including ` judgeAll ` (LLM precompile)
259256> and ` finalizeWinner ` . This is the key advantage over a Base deployment, where
@@ -355,44 +352,39 @@ Per homework spec. Combined with sender + bountyId, prevents cross-account and c
355352
356353Rather than over-claiming, here is exactly what this submission does and does not do:
357354
358- 1 . ** A hardcoded constant survives in the inherited base contract.** ` PrecompileConsumer `
359- (carried over from the workshop) still declares
360- ` address internal constant LLM_INFERENCE_PRECOMPILE = address(0x0802); ` .
361- It is ** dead code** : ` judgeAll() ` uses the configurable ` LLM_PRECOMPILE `
362- immutable (constructor arg, set to ` 0x0802 ` on this Ritual deployment),
363- never the constant. So the * runtime behaviour* is genuinely configurable;
364- the constant is retained purely for source parity with the workshop base
365- contract and is harmless.
366-
367- 2 . ** ` IRitualWallet ` is retained but unused.** The interface declaration is still
368- in ` BountyJudge.sol ` , but no function references it and the wallet parameter
369- was removed from every function signature. "Wallet removed" refers to the
370- removed * usage/parameter* , not the type declaration. The contract holds
371- rewards directly.
372-
373- 3 . ** "Works on any EVM chain" is only half true.** The commit-reveal logic
355+ 1 . ** "Works on any EVM chain" is only half true.** The commit-reveal logic
374356 (commit/reveal/finalize) is pure EVM and runs anywhere. But ` judgeAll() `
375357 unconditionally calls an LLM contract at the configured address — a chain
376358 without that precompile (e.g. Base mainnet) cannot execute
377359 ` judgeAll ` /` finalizeWinner ` . ** This is why the deployment targets Ritual
378360 Chain (chainId 1979)** , whose native precompile at ` 0x0802 ` makes the full
379361 lifecycle — including AI judging — functional.
380362
381- 4 . ** AI output is advisory, not authoritative.** ` judgeAll() ` stores the LLM
363+ 2 . ** AI output is advisory, not authoritative.** ` judgeAll() ` stores the LLM
382364 result but the contract never parses it or auto-pays. The owner manually
383365 selects the winner in ` finalizeWinner() ` — a deliberate human-in-the-loop
384366 design, not a limitation.
385367
386- 5 . ** Track 2 is a design sketch.** ` RitualBountyJudge ` demonstrates the
368+ 3 . ** Track 2 is a design sketch.** ` RitualBountyJudge ` demonstrates the
387369 TEE-attested flow (encrypted submit → batch judging → attestation verify →
388370 finalize) but intentionally omits reward escrow/payout: ` finalizeWinner() `
389371 locks the winner index without transferring ETH. This matches the rule that
390372 the advanced track may be a design document.
391373
392- 6 . ** ` block.timestamp ` -based deadlines.** Validators can nudge
374+ 4 . ** ` block.timestamp ` -based deadlines.** Validators can nudge
393375 ` block.timestamp ` by a few seconds; the deadlines are day-scaled windows so
394376 this is immaterial in practice, but it is not cryptographically enforced.
395377
378+ 5 . ** ` MAX_ANSWER_LENGTH ` is checked at reveal, not commit.** The contract
379+ cannot check the answer length at commit time (the answer is hidden behind
380+ the hash). A participant who commits an answer exceeding 2000 bytes will
381+ be unable to reveal it later — their commitment is permanently locked.
382+ This is self-correcting in v3: if no other participant reveals, the owner
383+ can ` refund() ` the reward. In a multi-participant bounty the trapped
384+ participant simply forfeits eligibility; the remaining revealed answers
385+ are judged normally. This is a necessary consequence of the one-way hash
386+ property and is explicitly documented as a known trade-off.
387+
396388---
397389
398390## Reflection Question
0 commit comments