From f380ccc7c779262d76b7a182208bcab6110ab2b8 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 08:32:42 +0000 Subject: [PATCH] proving v1 harness: under --fresh-rule the second offer of segment 3's record is a duplicate, not a chain-rule refusal Co-Authored-By: Claude Fable 5.1 --- tools/proving-v1/net.mjs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/proving-v1/net.mjs b/tools/proving-v1/net.mjs index ae36027e3..df25458bb 100644 --- a/tools/proving-v1/net.mjs +++ b/tools/proving-v1/net.mjs @@ -231,7 +231,13 @@ try { const subLate = await n0.eth('igneum_submitSegmentRecord', [{ record: late2.record, proof: late2.proof }]); check('known-failed: a late record for segment 2 pays nothing (refused as unproven)', subLate.accepted === false && /unproven/.test(subLate.reason), subLate); const subRestart = await n1.eth('igneum_submitSegmentRecord', [{ record: fresh3.record, proof: fresh3.proof }]); - check('segment 3 restarts the chain with a fresh-chain record after the unproven segment', subRestart.accepted === true, subRestart); + if (FRESH_RULE === null) { + check('segment 3 restarts the chain with a fresh-chain record after the unproven segment', subRestart.accepted === true, subRestart); + } else { + // under the fresh-record rule the record was accepted while segment 2 was still pending (above) and is carried + // by now: the second offer is a duplicate or a paid segment, never a chain-rule refusal + check('fresh-record rule: the second offer of segment 3\'s record is a duplicate, not a chain-rule refusal', subRestart.accepted === true || !/does not chain/.test(subRestart.reason || ''), subRestart); + } const paid3 = await waitSegmentPaid(n0, seg3[0]); check('segment 3 paid with chain_len 4', hexn(paid3.paid.chainLen) === SEG, paid3.paid); st = await n0.eth('igneum_getProvingStatus');