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 <noreply@anthropic.com>
This commit is contained in:
igneum-labs 2026-10-06 08:32:42 +00:00
parent 869b0b63c5
commit 85ced57631

View file

@ -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');