Seedelf-Wallet

Chunk 41 · Fixing the Blaster gaps ourselves

Branch verification, as chunk 40. Chunk 40 waits for upstream to fix three gaps in IOG’s tools. This chunk fixes them in our own forks of Lean-blaster and PlutusCoreBlaster instead, offers each fix upstream as a small PR, and pins the forks until the PRs merge, so WalletRegister can be tried without waiting.

Archived 2026-11-07: its Done means is met. WalletRegister is proved and in check.sh’s default list. #71 and #72 merged, and #455 and #73 are open with our pins recorded. Taking the forks out as the fixes land is chunk 46. What it did is Where it ended; below is the plan as it stood.

Status on 2026-11-03: 🚧 in progress, started 2026-11-02 at the owner’s call: “Do proper forks of those repos, make those changes and get the prs going. I would monitor it and see if anyone comments on the work you did.” Why: “being able to use oh we are formally verification and the first privacy wallet can be big marketing wins.” (A claim stays true to what’s proved: until WalletRegister lands, that’s the 29 properties, not the wallet’s spend check.)

Step Status
0 · Forks, clones, runner ✅
1 · Datatype parameter names 🚧 issue #454, PR #455 open (2026-11-03); fix 6526c4b + test 25c0ee0, the test passes (four Valid, one Expected Falsified)
2 · ByteStringToInteger alias ✅ PR PlutusCoreBlaster #71 merged 2026-11-05 (6b4260a), opened 2026-11-03; fix 3dd76d7 + 28910c6, test cfa8c53 passes (one Valid, two Expected Falsified); review round 1 f411ef6 (four Valid, three Expected Falsified, a #guard); after #72 merged, main merged in (b330749) and the review’s State equalities (c60039c, same results)
3 · Fin in Fq1 ✅ PlutusCoreBlaster #72 merged 2026-11-03 by mpetruska (squash 0c0c1b8, the same tree as 89d8c6d); opened after no reply on #29 (the owner: “seems like that pr just died”); fix ae0a7cd + test f146c10 pass; review round 1 89d8c6d
4 · WalletRegister ✅ Valid in the script’s own order (2026-11-03, 737 MB with the rebuild), in check.sh’s default list, README and chunk 40 updated
5 · Operand order (Fix 4) 🚧 PR PlutusCoreBlaster #73 open (2026-11-03), fix + test b60ff2a pass (three Falsified before, three Valid after), rebased onto round 1 as b01509a; after #72 merged, rebased onto main as 5c048b0 (the same tree, so no rerun)

Next session, in order

  1. Review round 1, 2026-11-03: answered, waiting on mpetruska. Replies and the round’s state are in ../blaster-forks/posts/review-round-1-replies.md.
    • #71 (merged 2026-11-05, 6b4260a): the alias returns a Nat and the builtin applies .ofNat; the goals are also stated over cekExecuteProgram; a #guard checks #0102 is 258 (f411ef6).
      • We kept the haltsWithInteger/haltsWithBool matches. The State equality the review suggested fails on Fin on main, and passes with #72 underneath (local-only local/state-equality, 346fe6a). Done once #72 merged: main merged into #71 (b330749), the equalities in c60039c (four Valid, three Expected Falsified), replied on both threads.
      • Open: their main point is re-modelling ByteString as ByteArray. We agreed and asked for an issue to follow; none was open on 2026-11-07.
    • #72 (“Nice work! Just a minor request”): the short doc comment and private mk :: (89d8c6d). G1.lean’s ToExpr Fq1 now builds through Fq1.ofNat, since Fq1.mk is private. #73 is rebased onto it (b01509a, force-pushed).
    • Checked (the owner’s runs): every fork test passes on its own branch. ./check.sh on the new pin matched the baseline: nine ok, WalletRegister Valid, PolicyBurn and PolicyMint on BitVec alone.
    • GitHub won’t let us re-request a review: the API refuses non-collaborators. The replies notify the reviewer instead.
    • Pins: seedelf is 1e38b23 on the fork. On lovejoin-verification, local/opaque-xor is 68c5399 (that plus the xor alias) and scalarOf applies .ofNat, from local/seedelf-repin. Lovejoin’s four calls of the alias need the same .ofNat when that lands. verification still pins c7d8741: re-pin it to 1e38b23 the same way.
  2. ✅ Fix 4 and WalletRegister, 2026-11-03. Fix 4’s test: three Falsified under the old patterns, three Valid with the fix. WalletRegister: ✅ Valid in the script’s order. The baseline and upstream were unchanged. WalletRegister is now in check.sh’s default list.
    • Before that, the model-order check confirmed the cause: wallet_register_spend_iff, with add’s and equal’s operands in the model’s order, was ✅ Valid in 1.1 s at 305 MB, and schnorrAccepts was true on the real proof and false with z changed.
    • The pinned run before it (2026-11-03) matched every expectation:
      • lake update recloned both packages from the forks.
      • upstream: ExceptParams and Fq1Fin ok, ByteStrings FAILED on its four BitVec cases, the Slice modules ok.
      • The baseline: the same eight ok, with PolicyBurn and PolicyMint failing on BitVec alone. The first build took 394 s at 1.4 GB.
      • Steps: the valid spend halts after 1281 steps, and the other signer errors after 1306.
      • WalletRegister translated for the first time and came back Falsified in 1 s, every input empty. The cause is the operand order (Fix 4).
  3. ✅ The Lean-blaster PR is #455, opened by the owner on 2026-11-03 into beta-lambda-cache-optimization, at 25c0ee0.
  4. ✅ The Fix 2 PR is PlutusCoreBlaster #71, opened by Claude on 2026-11-03 at the owner’s word (“go ahead with the Prs”), into main, at cfa8c53. Its text says the wallet’s property now proves on our forks.
  5. ✅ Fix 3 is #72 and Fix 4 is #73, opened by Claude on 2026-11-03. #29 had no reply to our question (the owner: “if 29 is just idle then we may want to kind of just do it … seems like that pr just died”). #72 says we asked first and will close in #29’s favour if #29 lands. #73 is stacked on it: its diff is b60ff2a alone once #72 merges.
  6. The #153 and #68 comments are ready, with the PR numbers in (#153, now about the policy’s slicing, with #71 as the wallet’s way around; #68, pointing at #455). The owner posts them, or says the word.
  7. WalletRegister, from step 1’s result, as Step 4 below says. If a PR’s branch changes in review, rebuild seedelf and re-pin.

Fix 4 · Operand order of the BLS12-381 builtins (PlutusCoreBlaster), found 2026-11-03 ✅ on the fork

The fork tests’ first round (2026-11-03) failed in the tests, not in the fixes. Each was fixed and passed on the second round:

The valid spend in Steps.lean and concrete/wallet_register.sh is a proof from seedelf-crypto’s own create_proof (secret 0x5eed0e1f, a 28-byte key hash), printed by a scratch crate outside the repo.

Chunk 40’s baseline, practicalities and rules and what each fix should flip hold here. They aren’t repeated.

Scope

Who does what

Step 0 · Setup ✅

Using the forks before the PRs merge

Package Fork commit PR Remove when
Blaster 25c0ee0 (fix/datatype-param-names) #455 the fix is on beta-lambda-cache-optimization, or wherever CardanoLedgerApiBlaster requires Blaster from
PlutusCore c7d8741 (seedelf: cfa8c53, f146c10 and b60ff2a merged onto 1c23de8); after review round 1, seedelf 1e38b23, which lovejoin-verification pins as local/opaque-xor 68c5399 #71, #72, #73 both PRs are on PlutusCoreBlaster main

Fix 1 · Datatype parameter names (Lean-blaster) 🚧

Done: the one-line change, 6526c4b on fix/datatype-param-names, pushed to the fork (the comment above the line says why it isn’t hash-consed). Waiting: the owner files the issue (../blaster-forks/posts/lean-blaster-issue.md), then Claude adds the IssueN test named after it, and the owner checks and opens the PR.

Fix 3 · Fin in Fq1 (PlutusCoreBlaster) 🚧

Done: ae0a7cd on fix/fq1-nat, pushed to the fork, with Co-authored-by for #29’s author.

Fix 2 · ByteStringToInteger behind an opaque alias (PlutusCoreBlaster) 🚧

Done: 3dd76d7 on feat/opaque-bytestring-to-integer, pushed to the fork: the alias as below, and the PR’s test, Tests/Bitwise/ByteStringToIntegerSymbolic.lean (two textual programs beside it, bstoi_one.uplc and bstoi_two.uplc, checked with aiken uplc eval), imported from Tests/Basic.lean. Its Falsified case (“some bytestring converts to 258”) needs the builtin’s value, so it fails on BitVec without the alias; it uses no Except. The PR text is ../blaster-forks/posts/plutuscoreblaster-pr.md. Waiting: the owner’s build, then the PR.

Step 4 · WalletRegister ✅

Stop rules

Done means

Where upstream stands

Chunk 40’s reads, plus:

# any machine, read-only
gh api 'repos/input-output-hk/Lean-blaster/contents/Blaster/Smt/Translate/Quantifier.lean?ref=beta-lambda-cache-optimization' --jq .content | base64 -d | grep -n 'hashcons indVal.type'
gh api 'repos/input-output-hk/PlutusCoreBlaster/contents/Cryptograph/BLS12_381/Basic.lean' --jq .content | base64 -d | grep -n 't : Fin fieldPrime'
gh pr view 335 -R input-output-hk/Lean-blaster --json state,isDraft,updatedAt
gh pr view 334 -R input-output-hk/Lean-blaster --json state,isDraft,updatedAt
gh pr view 155 -R input-output-hk/Lean-blaster --json state,mergedAt
gh pr view 29 -R input-output-hk/PlutusCoreBlaster --json state,isDraft,updatedAt

On 2026-11-02, both greps matched (lines 928 and 39), #335, #334 and #29 were open drafts, and #155 was open.

Checked 2026-11-06 (from chunk 45’s plan; the decisions are still the owner’s):

The owner’s decisions

Where it ended