Commit 6b64339
* fix(fault-proof): warn-log L1 head regression in sync_state
Distinguish the two skip cases: log at WARN when confirmed_number
moves backwards (load-balanced RPC backend regression or deep L1
reorg) so operators can detect unhealthy backends, and keep DEBUG
for the normal equal case where L1 simply hasn't ticked.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(fault-proof): reset creation guard when tracked game is pruned
When sync_games prunes future games (above pinned_latest_index) due to
abnormal cache states like backup restore into a shorter chain or deep
L1 reorg, the duplicate-creation guard could point at a game that no
longer exists on chain. Without resetting, should_create_game blocks
indefinitely because canonical_head_l2_block cannot advance through an
orphaned game.
Reset is gated on the guarded address being among the entries this
prune actually removes (evaluated before the removal loop). Checking
"absent from post-prune cache" would over-clear in the case where the
just-created game has not yet been added to the cache and an unrelated
prune fires, allowing should_create_game to re-submit a duplicate at
the same L2 block before the cache catches up.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(fault-proof): pre-flight on-chain status check before prove/resolve/claim
With sync_l1_confirmations > 0, the pinned cache lags behind the chain
tip by sync_l1_confirmations × block_time, so a recently confirmed
prove(), resolve(), or claimCredit() tx may not yet be reflected in
should_attempt_* flags. Without a pre-flight check, the proposer would
re-submit duplicate transactions that revert on chain — wasting gas for
resolve/claim, and re-running expensive proof generation for prove.
Each path now does one eth_call at `latest` before submission:
- resolve_games: skip if GameStatus != IN_PROGRESS
- claim_bonds: skip if credit(signer) == 0
- should_skip_proving: skip if ProposalStatus is *ValidProofProvided or
Resolved (single check covers both already-proven and timeout
default-loss cases since Resolved is set whenever GameStatus moves
out of IN_PROGRESS)
On RPC failure the check logs a warn and proceeds, so transient backend
issues don't block legitimate work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(scripts): add --no-safe-head-split to cost-estimator
When SafeDB is active, cost-estimator splits the requested range at every
span batch boundary via split_range_based_on_safe_heads, producing one
zkVM execution per span batch regardless of --batch-size. That mirrors a
hypothetical "split each proposal at span batch boundaries" workload, not
what the proposer actually does (RANGE_SPLIT_COUNT-driven arithmetic split,
default 1 = single execution per proposal interval).
The new --no-safe-head-split flag forces split_range_basic so the range
is partitioned solely by --batch-size, giving a closer estimate of the
per-segment cost the proposer sees on the prover network.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: add PR 894 follow-up parity
Scope --no-safe-head-split to cost-estimator only (out of shared
HostExecutorArgs), and add challenger-side resolve/claim latest-state
pre-flight parity to the proposer changes from #894.
---------
Co-authored-by: seolaoh <osa8361@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 106e2ea commit 6b64339
3 files changed
Lines changed: 197 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
548 | 574 | | |
549 | 575 | | |
550 | 576 | | |
| |||
611 | 637 | | |
612 | 638 | | |
613 | 639 | | |
| 640 | + | |
614 | 641 | | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
615 | 667 | | |
616 | 668 | | |
617 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
657 | 662 | | |
658 | 663 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
664 | 677 | | |
665 | 678 | | |
666 | 679 | | |
| |||
734 | 747 | | |
735 | 748 | | |
736 | 749 | | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
737 | 764 | | |
738 | 765 | | |
739 | 766 | | |
| |||
747 | 774 | | |
748 | 775 | | |
749 | 776 | | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
750 | 785 | | |
751 | 786 | | |
752 | 787 | | |
| |||
1378 | 1413 | | |
1379 | 1414 | | |
1380 | 1415 | | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
1381 | 1441 | | |
1382 | 1442 | | |
1383 | 1443 | | |
| |||
1420 | 1480 | | |
1421 | 1481 | | |
1422 | 1482 | | |
| 1483 | + | |
1423 | 1484 | | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1424 | 1510 | | |
1425 | 1511 | | |
1426 | 1512 | | |
| |||
2336 | 2422 | | |
2337 | 2423 | | |
2338 | 2424 | | |
| 2425 | + | |
2339 | 2426 | | |
2340 | 2427 | | |
2341 | 2428 | | |
| |||
2364 | 2451 | | |
2365 | 2452 | | |
2366 | 2453 | | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
2367 | 2487 | | |
2368 | 2488 | | |
2369 | 2489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
| |||
227 | 243 | | |
228 | 244 | | |
229 | 245 | | |
230 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
231 | 249 | | |
232 | 250 | | |
233 | 251 | | |
| |||
261 | 279 | | |
262 | 280 | | |
263 | 281 | | |
264 | | - | |
| 282 | + | |
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
| |||
0 commit comments