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) |
../blaster-forks/posts/review-round-1-replies.md.
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).
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.ByteString as ByteArray. We agreed and asked for an issue to follow; none was open on 2026-11-07.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)../check.sh on the new pin matched the baseline: nine ok, WalletRegister Valid, PolicyBurn and PolicyMint on BitVec alone.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.upstream were unchanged. WalletRegister is now in check.sh’s default list.
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.lake update recloned both packages from the forks.upstream: ExceptParams and Fq1Fin ok, ByteStrings FAILED on its four BitVec cases, the Slice modules ok.ok, with PolicyBurn and PolicyMint failing on BitVec alone. The first build took 394 s at 1.4 GB.beta-lambda-cache-optimization, at 25c0ee0.main, at cfa8c53. Its text says the wallet’s property now proves on our forks.b60ff2a alone once #72 merges.seedelf and re-pin.V :: Vs), so the list is last-first. The integer builtins match [op2, op1] and call f op1 op2. bls12381G1Add, G1Equal, G2Add, G2Equal, MulMlResult and FinalVerify match [x, y] and call f x y: the operands are swapped.
scalarMul, hashToGroup and the Miller loop are in order.opaque builtins, add(a, b) and add(b, a) are different terms. A spec in the script’s order is Falsified.[y, x] => f x y (or [op2, op1], the house style), on a fork branch from fix/fq1-nat: its test needs symbolic points, which only Fix 3 allows.equal(add(a, b), a) over two G1 points, and the same over G2;finalVerify(mulMlResult(m1, m2), m1) over two Miller loops.../blaster-forks/posts/plutuscoreblaster-operand-order-pr.md; its Testing states step 1’s expected results.
cd /home/logic/Documents/LogicalMechanism/blaster-forks && gh pr create -R input-output-hk/PlutusCoreBlaster --base main --head logicalmechanism:fix/bls-operand-order --title "$(cat posts/plutuscoreblaster-operand-order-pr.title)" --body-file posts/plutuscoreblaster-operand-order-pr.md.b60ff2a on fix/bls-operand-order (from fix/fq1-nat), with its test, merged into seedelf as c7d8741 and pinned; WalletRegister is back on schnorrAccepts (e46dff8f) and Valid. Waiting: Fix 3’s PR, then this one.schnorrAcceptsAsModelled goes, wallet_register_spend_iff uses schnorrAccepts, and the expected-Falsified case is deleted.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:
/-- -/) above #blaster doesn’t parse. #blaster isn’t a declaration, so use -- there. The command still ran after the parse error.State. prop a ≠ State.Halt (…) makes Blaster declare the CEK datatype, whose Const holds BLS12-381 points, so it fails on Fin even with no point in the goal. Read the result through a match (haltsWithInteger), as PlutusCoreBlaster’s Tests/BlueprintVerify/BooleanCase.lean and our isSuccessful do.namespace Tests.Cryptograph.…, Cryptograph.BLS12_381 resolves to the test’s own parent namespace. Use TestVectors.lean’s namespace.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.
real_fiat_shamir_transform) isn’t a proof for valid_schnorr_proof’s x and r: a z made from it fails.Chunk 40’s baseline, practicalities and rules and what each fix should flip hold here. They aren’t repeated.
Fin in Fq1 (PlutusCoreBlaster).ByteStringToInteger (PlutusCoreBlaster).BitVec/Char support. That’s upstream’s design work, weeks to months. It touches feat/indexed-types, the Lean 4.35 String series (#431–#439) and #153. We don’t fork it.sliceByteString. A str.substr rewrite takes 2–4 days and collides with the 4.35 String migration and #389. An alias only helps properties that slice the same way on both sides. Only the policy’s success theorems need it, so chunk 40’s step 5.2 stays parked.set -e).gh issue create on input-output-hk (“External System Writes”), as it refused Claude’s lake build and check.sh. The owner can instead add a permission rule for those commands; until then they run them.logical-mechanism org. The owner, 2026-11-02: “having a bunch of forks on our company repo isnt look good for the optics … I usually put forks on the logicalmechanism account and not the org.”
gh repo fork (all branches).../blaster-forks/ beside Seedelf-Wallet/ (the owner: “create a folder in the parent for this work”), each with upstream set to input-output-hk:
Lean-blaster on fix/datatype-param-names, from beta 46c8479;PlutusCoreBlaster on feat/opaque-bytestring-to-integer, from main 1c23de8.../blaster-forks/check.sh <checkout> <lake target>… builds in a fork under a cap (16 GB and 60 minutes by default, since a first build compiles Blaster and PlutusCore).../blaster-forks/check-lean-blaster/ is a tiny package requiring the Lean-blaster clone by path, with our ExceptParams.lean linked in: the fix checked before any pin.../blaster-forks/posts/ holds the bodies of the posts the owner makes.require of our own in lakefile.lean, above the CardanoLedgerApi one, at the fork’s commit:
-- Chunk 41: our forks until upstream merges the fixes. Remove each when it lands.
require Blaster from git "https://github.com/logicalmechanism/Lean-blaster" @ "<commit>"
require PlutusCore from git "https://github.com/logicalmechanism/PlutusCoreBlaster" @ "<commit>"
lake update Blaster (or PlutusCore) alone, so nothing else moves off the baseline.seedelf branch in the fork, with both PR branches merged into it. Lean-blaster’s is the fix branch’s commit.lake-manifest.json: the package should show the fork’s URL, the commit, and "inherited": false.
../blaster-forks/check-lean-blaster/ does. Never commit a path require in seedelf-verification/.lake update on that package, and re-run the baseline.| 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 |
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/datatype-param-names from 46c8479.
Blaster/Smt/Translate/Quantifier.lean:928 (genIndParams), Optimize.forallTelescope (← hashcons indVal.type) becomes Optimize.forallTelescope indVal.type. That’s main’s form (main a16614e, line 946).createCtorDeclaration’s hashcons recRule.rhs). A rule’s right-hand side names the type’s own constructors, so two types’ rules are never alpha-equivalent. That comes from reading the code, not from a run: say so in the PR.Tests/FixedIssues/IssueN.lean, where N is the issue’s number, so the issue is filed first.
namespace Tests.IssueN.Issue348.lean has), and write each Falsified case as #blaster (gen-cex: 0) (solve-result: 1).import Tests.FixedIssues.IssueN at the end of Tests/FixedIssues.lean../check.sh in forks/Lean-blaster Tests.FixedIssues.IssueN should say ok. Its first build compiles Blaster, which took about 107 s and 1 GB for upstream-main../check.sh upstream should say ok Upstream.ExceptParams: the five ❌ turn ✅, as on main. Everything else should match the baseline../check.sh should match the baseline exactly: eight ok, and PolicyBurn and PolicyMint FAILED on BitVec alone.beta-lambda-cache-optimization, saying “Fixes #N”.Upstream/drafts/lean-blaster-genindparams-pr.md, on the repo’s template. It says:
Upstream.ExceptParams again. Close our PR with thanks.main. The line is the same.Fin in Fq1 (PlutusCoreBlaster) 🚧Done: ae0a7cd on fix/fq1-nat, pushed to the fork, with Co-authored-by for #29’s author.
Fq1 part line for line. That includes three uses the list below missed: Fq2.sgn₀’s two Fin.toNat (lines 660 and 662) and compressG2’s .val (802). It also has #29’s toNat_ofNat_381 beside the test vectors’ hex printers.Tests/Cryptograph/BLS12_381/SymbolicPoints.lean, with two Valid cases and one Falsified and no Except.../blaster-forks/posts/plutuscoreblaster-29-comment.md, and the PR text posts/plutuscoreblaster-fq1-pr.md.Upstream/Fq1Fin.lean has its Valid case, fq1_eq_of_t_eq.Waiting: the owner’s build and #29’s answer, then the PR.
check.sh’s upstream list. Run on 2026-11-02: the point cases fail on Fin, and the control passes.
blake2b_224), symbolic points, and bls12_381_G1_uncompress of a symbolic bytestring. Each expects Falsified../check.sh Upstream.Fq1Fin first. The point cases should fail on Fin, and the control should pass. If they fail on anything else, record it before fixing anything.∀ (x y : Fq1), x.t = y.t → x = y, so a pass isn’t only the solver finding a model.../blaster-forks/posts/plutuscoreblaster-29-comment.md, and the owner posts it.
Fq1.t : Nat part as a small PR of its own, crediting #29, or is #29 about to land?fix/fq1-nat from 1c23de8. About 50 lines, all taken from #29’s own diff:
Cryptograph/BLS12_381/Basic.lean:39: t : Fin fieldPrime becomes t : Nat.Fq1.ofNat drops its proof. #29’s Fq1.ofNat_lt keeps the bound the type used to carry.Fin.val x.t and x.t.val uses at lines 120, 121, 130, 337, 346, 349, 758, 773 and 789 become x.t.Tests/Cryptograph/BLS12_381/TestVectors.lean:116–141: the hex printers’ Fin.castLE … |> BitVec.ofFin becomes BitVec.ofNat 381 x.t. #29 edits this file at its old path, Cryptograph/; #58 moved it.binaryInversion, not the @[irreducible] Point instances, not the axioms.Fq1 can now have t ≥ fieldPrime. In our proofs, points come only from opaque builtins, so a universal property covers more values, never fewer.Tests/, imported from Tests/Basic.lean, with the symbolic Fq1 and Point cases.
Except: PlutusCoreBlaster’s own CI uses its own Blaster pin, bc03bb4, which still has bug 1.Fin before the change and passes after../check.sh in forks/PlutusCoreBlaster with that module, and then with Tests.Cryptograph.BLS12_381.TestVectors../check.sh upstream should say ok Upstream.Fq1Fin, and ./check.sh should match the baseline.ci-conformance workflow by hand in the fork’s Actions, or ask a maintainer for /run-conformance on the PR.main, after #29’s answer.
Fq1 part of #29, credited; the test; the conformance run.main.Fin (#334, on beta), then once our Blaster pin includes it, Upstream.Fq1Fin should pass on stock PlutusCoreBlaster. Drop our change then.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.
Upstream/, run as the Slice modules are. The fork’s test already shows it, so this is optional.feat/opaque-bytestring-to-integer from 1c23de8. It follows #27’s pattern, in 10–15 lines.
PlutusCore/UPLC/BuiltinFunctions/Bitwise.lean, beside the dispatch at line 43, add opaque byteStringToIntegerOpaque (e : Bool) (s : String) : Integer := PLC.byteStringToInteger e s, with a doc comment like #27’s.PlutusCore.Bitwise.byteStringToInteger stays a def, so Bitwise/Lemmas.lean’s two rfl examples (260–261) and Tests/Bitwise don’t change.bstoi_be_loop opaque (Bitwise/Basic.lean:84). It would leave our spec as it is, but:
rfl examples would have to become native_decide;List Char, which Blaster still has to declare, so it probably still reaches BitVec. That’s from the code, not a run.#eval, native_decide and conformance.IntegerToByteString isn’t on WalletRegister’s path. Do it only if reviewers want both in one PR.
opaque around the loop’s call, returning String.itobs_be_loop itself opaque: Lemmas.lean:14–70 unfold it, and Tests/Bitwise/Tests.lean proves it with rfl.#blaster file over a UPLC program that applies ByteStringToInteger to a symbolic bytestring, with one Valid case and one Falsified, imported from Tests/Basic.lean.scalarOf calls the alias, byteStringToIntegerOpaque true b.data, by whatever name upstream merges.Upstream/ByteStrings stays as it is: it calls PlutusCore.Bitwise directly../check.sh in forks/PlutusCoreBlaster with the test module../check.sh upstream should say ok Upstream.Bstoi, with Upstream.ByteStrings unchanged (four ❌)../check.sh should match the baseline. PolicyBurn and PolicyMint still fail, on slicing.main.Char, no BitVec and no substring;scalarOf with it.Steps.lean, with a real proof, and the step limit above it (2500 now)../check.sh Seedelf.WalletRegister.#prep_uplc costs with six symbolic bytestrings. Rule 4 in the README warns about this.check.sh’s default list;KILLED at the cap, split it as chunk 40 says: one direction per module, or the signer fixed to vkh.
Upstream/ explains the break.check.sh’s default list, and the README’s tables are updated.lake update, and the baseline is re-run. From there, chunk 40’s How to tell each is fixed applies.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):
6b4260a), so ByteStringToInteger is opaque upstream.serialise_data, Luivatra’s draft) has been silent since July.68c5399) differs from upstream main only by #73, #27 and the xor alias. The xor alias was never PR’d, and its commit 96a36cb conflicts with main until rebased. Slice/’s alias (96261cc) was never PR’d either.main. The local rebase 42caa53 (on 1fe209e) merges cleanly into today’s main (983f10f), which still has the bug. It needs the owner’s force-push plus blaster-forks/posts/lean-blaster-455-retarget-comment.md.main plus the three open patches, with the owner running the suite once;main once #455 merges.logicalmechanism account, not the org (“isnt look good for the optics”); the work in a folder in the parent.main in #362 (c15603d5, 2026-11-05), through chunk 42’s branch, which was cut from verification.The fixes, on 2026-11-07:
| Fix | Upstream | State |
|---|---|---|
| 1 · Datatype parameter names | Lean-blaster #455 | Open. CONFLICTING since #155 moved it to main, whose line 928 still has the bug. Rebased locally onto main 983f10f for the owner’s check and force-push (chunk 46, step 1) |
2 · ByteStringToInteger alias |
PlutusCoreBlaster #71 | Merged 6b4260a (2026-11-05). #77 would replace it with the definition |
3 · Fq1.t a Nat |
PlutusCoreBlaster #72 | Merged 0c0c1b8 (2026-11-03) |
| 4 · BLS12-381 operand order | PlutusCoreBlaster #73 | Open and mergeable, with no review since 2026-11-03 |
25c0ee0, kept on the fork’s seedelf branch.68c5399, the fork’s opaque-xor. That’s #71’s and #72’s review rounds, #73, #27’s serialise_data and the xor alias.Slice/’s PlutusCore: 96261cc, the fork’s opaque-slice.c7d8741, the verification branch’s.ByteString (#77 is its answer).