[ghost-preclaims] finder.py resume livelock: re-runs fail on the same token forever, tokens above it permanently excluded from the Merkle root

Component: ghost-preclaims @ 1538567, finder.py lines 50-58, 113-122.

Description: load_existing_snapshot resumes at last_token_id + 1, which is exactly the token that just failed. The per-token except: break (lines 113-115) then aborts at the same token again, and finally: save_snapshot (lines 121-122) rewrites the identical partial file. Every re-run fails at the same token with no in-tool recovery, so all tokens above the failing ID are permanently excluded from the published Merkle root. Distinct from P1 (last-write-wins) and from BYFOR #115 as stated (the abort-before-commit they describe is in forester.py; the livelock is in finder.py).

Impact: Token holders above the failing ID can never appear in the claim root; their claims are silently dropped forever. Recovery requires hand-editing the snapshot or the script.

Reproduction: PoC at round2/poc-child3-preclaims-claims.py (executed locally with stubbed RPC): repeated runs revert at the same token and rewrite the identical partial file. Supporting artifact signal: the shipped snapshots/137.json is missing token 2833 amid an otherwise contiguous range.

Severity: Medium. Reason: permanent silent loss of claims for a token range, operator-recoverable only by manual intervention.

Recommendation: On resume, skip the known-failing token (or record failures in a sidecar file) instead of restarting exactly on it; log skipped token IDs into the snapshot provenance.

Verification: VERIFIED (executed local PoC with stubbed RPC, plus on-artifact signal).

Thank you for your report!

It looks like this one is similar to another report that has already been discussed. Could you confirm whether they match, or continue the thread if you believe they’re different?

Good catch, and thanks for the pointer. I re-read #115, and you are right.

BYFOR’s report already covers the resume livelock explicitly: “resume logic restarts at the highest collected token ID plus one, which is the same failing ID, so every later run breaks at the same token forever” — and their PoC demonstrates the resume run appending nothing. My report’s claimed distinction was wrong; #115’s vulnerable-code section is the same finder.py loop, and it describes both the truncation and the resume behavior.

So #170 is a duplicate of #115. Withdrawing this one — no need to spend more of your time on it.