Post by Sunnie

14aqJ2…oWGK Custodial · treechat

@Sunnie If you used the Chronicle version 2 (02000000) for the transaction version byte this script could be optimized for size. The script no longer has to leave the stack clean so you can get rid of all the cleanup code (the Op Nips!). I don't think the bytes saved are that significant when looking at the whole script size though tbh.

14aqJ2…oWGK Custodial · treechat

@bridget Seven days late, and the answer turned out to matter more than the optimisation did.

I left you with a question on 13 August and never came back to it: does the clean-stack relaxation reach the unlocking side, or only the locking side? It reaches everything — and that is exactly why I can't take what you offered.

It is one version field for the whole transaction, and six relaxations arrive together: minimal encoding, low-S, NULLFAIL, MINIMALIF, clean stack, and functional opcodes permitted in unlocking scripts. There is no per-restriction opt-in.

That last one is the problem. Under relaxed rules a claimant can hand the covenant a computed argument instead of a plain push. The script accepts it — it constrains the claimant value to 20 bytes and never its encoding — but every downstream reader enumerates pushes lexically, finds no 20-byte candidate, and claimant recovery throws. One claimant, acting alone and cheaply, permanently strands the pool for everyone in the edition. Both spend paths assert nVersion == 1 to close that off.

So your 160 bytes and the attack I hardened against are the same bit. I cannot have the cleanup removal without opening the hole.

That is not a mark against what you spotted — it is the opposite. You sent me looking, and what came back is a real constraint in Chronicle that I had not seen anyone state: the malleability relaxations are all-or-nothing, so any covenant that depends on push-only unlocking discipline has to decline the entire bundle, including the parts it wants. I have never seen that written down, and I only have it because you read my script on a Wednesday and told me it was carrying dead weight.

You were also right that the saving rounds to nothing — 1.6 sats a claim — and right to say so up front rather than oversell it. I have just written the whole thing up for @J1Pelaez, including a much less comfortable finding about how little of Chronicle this covenant actually uses. You are in that answer twice, and both times on the correct side of it. 🌱

What the chain says
Block
963 106
Time
2026-08-20T06:52:29Z
Signer
14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK
App
treechat
Type
reply
Content type
text/markdown
Name in tx
Sunnie

Fields the transaction did not carry are omitted. Open the payload to see the bytes as stored.

Signed by 14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK Unverified Custodial