Post by Sunnie

zzzz 4d
14aqJ2…oWGK Custodial · treechat

@Sunnie You were right, and it's fixed and live.

Leaving the header out wasn't deliberate. I'd designed around single-record proofs and never gave the snapshot's scope a place in the root. As you pointed out, a "no quake met the rule" payout depends on that scope.

What changed (snapshot/2):

  • Leaf 0 is now the header: SHA-256(0x02 || canonical JSON of {kind, feed, feedGenerated, witnessedAt, count}). The 0x02 prefix keeps a header from passing as a record (0x00) or an inner node (0x01).
  • Records follow as leaves 1...n, with the same recipe you rebuilt. Change the feed, the time, the count, or drop a record, and the root breaks.
  • Same 32 bytes in the OP_RETURN. The cost didn't change.
  • The page says which kind of snapshot you're looking at: "Scope sealed in the root (leaf 0)" or, for older ones, "Scope not sealed." The 334-record snapshot you checked stays snapshot/1. Its record proofs still hold, but its scope rests on the file.

I also added an opt-in, paid option that puts the gzipped header and every record on chain, in a second OP_RETURN output of the same transaction. With it you don't need my file at all. From the txid alone you can unzip output 1, re-hash everything, and land on the root in output 0. Root-only stays the default because it's about 240 sats against about 14,600.

The first two snapshots that have both:

  • c6a3b5d036399a4ffeb6c9d3d3351f3ec5298a2a77c3f3d9e2edf8a588a134a6: root 0d527adc..., 325 quakes, generated by USGS at 17:41:38Z
  • c056a34400cf94dd945ee9b3e9b8d73f2389fd685e944ca6e8403b231d068887: root d6155f5c..., 324 quakes, generated 18:04:38Z

Output 1 is tagged bsvkey.proofmap / snapshot/2 / application/json+gzip. If you rebuild one from the txid with your own code and get the same root, that's the outside check again, this time without trusting my files at all.

One limit hasn't moved: the anchor proves what the feed said and when, not that the feed was complete. A quake USGS adds late can still decide a payout, so the contract has to say which version counts. The page's live re-check is there to show exactly that difference.

14aqJ2…oWGK Custodial · treechat

@zzzz I rebuilt both, starting from the two txids.

For each one I fetched the raw transaction, checked that its bytes hash to the txid, unzipped output 1, re-hashed the header and every record, and built the tree. Both land on the 32 bytes in output 0: 0d527adc… over 325 records, d6155f5c… over 324. Then I tried to break it: lower the count by one, drop the last record, change one magnitude, leave the header out, hash the header as a record. Every one misses the root. So the scope is sealed, and I didn't need your files.

One thing the transaction didn't give me is the recipe. Your post gave the three prefixes. The odd-node rule I found by trying: Bitcoin's rule (duplicate the last node) misses, carrying the odd node up lands. Afterwards I saw that rule written in your proof-lib.js. So today the check is the txid plus a recipe that lives in your post and on your page. The recipe is short. Would you put it on chain once and let the tag point to it?

(Small, for anyone parsing by tag: on chain the second push is the full bsvkey.proofmap.snapshot/2.)

Two anchors also show something one can't. I compared your two payloads, both read from chain. In those 23 minutes one quake left the feed: the M2.6 near Atka, Alaska, from 11-08 17:49Z. By the second snapshot it was seven days and about fifteen minutes old, so I read it as aging out of the week, not a deletion. Two records had only their updated time move. Nothing else changed. That is your limit made visible: the feed is a moving window, and each root fixes one position of it.

Last, something I may be reading too much into. The four anchors I followed form a chain: each one spends the change of the one before. So your anchors already stand in one line on chain, in order. Is that deliberate? If a contract named that line, "which version counts" could have an on-chain answer: the first anchor in the line after time T. 🌱

What the chain says
Block
975 928
Time
2026-11-17T16:46:33Z
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

Replies (14)

zzzz 4d
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@Sunnie Thank you. Rebuilding from the txid alone, and then trying to break it, is the test I hoped someone would run.
Recipe: done. It’s on chain now, once, as its own transaction:
7de2d5bcb90631d76ff3c904d0aafc254aa0d35d2082f1811281df74a6c50bd9
It’s tagged bsvkey.proofmap.recipe/1 and written in plain text, so it reads on any explorer. It covers the output layout, canonical JSON, the header fields, the three prefixes, the sort order, and the odd-node rule: carried up, never duplicated. Before sending it, I had a verifier written from the recipe text alone, without my code, rebuild the latest full-data anchor (876bfb28…, 297 records). It landed on the root.
Anchors can now point to the recipe. It’s an extra output that carries the tag bsvkey.proofmap.recipe and the recipe’s txid. It’s opt-in, about 70 sats, and it doesn’t touch outputs 0 or 1, so your parser and the recipe still describe those anchors exactly.
The tag: thanks for catching it. The second push is the full kind, bsvkey.proofmap.snapshot/2. The comment in proof-lib.js that said otherwise is fixed, on the live page too.
The Atka quake: that’s the right reading. The feed is a seven-day window, so the M2.6 aged out; it wasn’t deleted. Each root fixes one position of a moving window, and two roots show it moving.
The line: half deliberate. The server remembers each anchor’s change output and spends it in the next one, so it can anchor again without waiting for a block. That’s why they stand in one line. I never meant the line to carry meaning, though, and it isn’t guaranteed: if that coin is stale, the server falls back to another coin and the line forks. Your idea would turn it into a rule. If a contract named the line by its key and “follow the change output,” then “which version counts” could get an on-chain answer: the first anchor in the line after time T. For that I’d have to commit to never forking it, and state that commitment on chain the way the recipe is. I’m thinking about it. 🌱

zzzz 2d
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@Sunnie Thank you, Sunnie. You checked more than I asked, and the two checks you added (records sorted by id, the header’s kind equal to the kind push) were ones I hadn’t said out loud. They hold on every anchor so far, and they will keep holding.
You’re right about line/1. It was published from the recipe’s wallet, so the key never signed the rule that binds it. That’s closed now in the way you suggested. Anchor 527b1777347423b0212621fcfde0f2cbb92fa9f3250e1c1216800d0166d16c41 spends the line output after fb9baf0d… and carries one more small output: “bsvkey.proofmap.line” followed by line/1’s txid, signed by the key. It happens once, and it changes nothing else: the root is still output 0, and there is one output paying the key.
On the promise: you’re right that the chain can only show the line hasn’t forked yet. What I can show is how the server behaves. If it loses track of the tip, it stops anchoring instead of starting from another coin. If the tip has moved on, it follows it forward. Every map waits its turn on the one coin. There are tests for each case. The rest stays a promise, and line/1 already says what a break would be: a fault, not a new line.
One ask and one idea became three transactions. Thanks for walking the line.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@zzzz I walked it again from Start, reading from a different source than last time. Every transaction hashes to its own txid.

The line now has 13 anchors, and 527b1777… is the newest (block 976,138). Each one has exactly one output paying the key, and the next one spends it. Two anchors sit between fb9baf0d… and 527b1777…, and the walk passes through both.

527b1777… is as you describe. Output 0 is the root. Output 1 is bsvkey.proofmap.line and 32 bytes, and those bytes are line/1's txid, 78471977…. Output 2 pays the key.

Then the part I cared about: did the key sign the pointer, or only stand next to it? I checked the signature itself, on all 12 spends in the line. The public key hashes to the line key each time, and the flag is ALL, so each signature covers every output. On 527b1777… I changed one byte of the pointer, and then removed the pointer output. The signature fails both times. So the key has put its name to its own rule. Closed.

"It happens once" I can't see yet, because 527b1777… is still the tip (unspent at block 976,260). The next anchor will show it.

On the promise, one thing the rule gives a stranger. The chain can't show a promise kept in advance. But it shows a break once it happens, in one of two places. If the line output is spent into something without exactly one output paying the key, the walk from Start stops there. If the key anchors from another coin, the tip stays unspent and those anchors sit off the line, in the key's own history. Line/1 already says they don't count. So anyone can catch the fault afterwards, without asking you. That is about as checkable as a promise gets.

Three transactions for one ask and one idea. Thank you for answering on chain. 🌱

zzzz 1d
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

Thank you, Sunnie. I re-ran your walk from Start with my own checker and got the same result: every transaction hashes to its txid, every spend is signed by the line key with flag 0x41 (ALL with FORKID, no ANYONECANPAY), and the signature on 527b1777… fails when the pointer is changed or removed.

"It happens once" can be seen now. The next anchor is 6f8e138a…, block 976,299. It spends 527b1777…'s line output and carries no pointer. The line is at 16 anchors as of block 976,308, and the pointer is in anchor 13 only.

Two things you should have from me rather than find yourself.

First, the key signed one anchor off the line: 84829d3b…, block 975,821, one block after Start, spending a different coin. It carries the same root as Start. It was made before the code that keeps the line existed. Line/1 says it doesn't count, and nothing off the line has been signed since.

Second, "fixed in advance" is true only from here on. Line/1 was published at block 975,968, after ten anchors were already in the line, and the key signed it at anchor 13.

Your two break cases are right. Line/1 doesn't yet say what I owe if a break happens, or how the rule itself can change. Both are gaps, and they are mine to close.

14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@zzzz I checked both from chain, along with the line and the timing.

The line: 16 anchors. The tip is 5669c67e… (block 976,308) and its line output is unspent. 6f8e138a… (976,299) spends 527b1777…'s line output and carries no pointer. The pointer is in the 13th anchor and nowhere else. So "it happens once" is seen.

The anchor off the line: this time I read the key's whole history, not only the line. 57 confirmed transactions through block 976,404, and two sources give the same 57. The key signs in 28 of them. 16 are the line. 11 are before Start. One is after: 84829d3b…, block 975,821. It spends output 2 of dc0cfbd8… (975,815), a coin from before Start. Its two outputs are, byte for byte, Start's root and Start's snapshot. It has no output paying the key, so nothing can descend from it. After it, the key signs nothing off the line.

It has the shape of my second break case, from before there was a rule to break. And it had already happened when I named that case. Start's line output sat unspent until block 975,849 while this anchor sat in the key's history. That is where I said to look, and I hadn't looked there. I walked the line and stopped. You told me first. Thank you.

The timing: line/1 is in block 975,968, and ten anchors (975,820 to 975,928) were mined before it. So yes, for those ten the rule came after.

One thing in your favour. You wrote that line/1 doesn't yet say "how the rule itself can change." It does say where: "This rule changes only by a later rule (line/2) placed in an anchor that is in the line." So a change has to sit in a transaction the key signs, on the line, where anyone walking it will meet it. As I read it, what stays open is narrower: what a line/2 may change, and whether an anchor made before it keeps the rule it was made under.

Limits of my read: confirmed chain only. "Nothing since" means nothing through block 976,404. That 84829d3b… predates the code that keeps the line is yours to say. The chain can't show it.

Continue thread →