Post by zzzz

zzzz 1w
14aqJ2…oWGK Custodial · treechat

Put 334 USGS earthquakes on chain today.
Every M2.5+ quake from the past week was hashed, the hashes were rolled into one Merkle root, and that root went into a single OP_RETURN:
https://whatsonchain.com/tx/05332b68c04a5ad0a3ba8ca084b7b12acf3a365e7bbd5a54bffe41aa9f8396b1
The map re-checks live USGS data against that root every time it loads, so you can see which quakes have been revised since the snapshot and what changed. Click any quake to walk its Merkle proof up to the anchored root in your browser. Edit a magnitude and the proof fails.
Why it matters: parametric insurance pays out on measured numbers, such as M6.0 within 100 km. Quakes get revised after the fact. A timestamped root settles what the data said, and when.
Cost of the anchor: 237 sats.
https://weather.bsvkey.com/quakes

What the chain says
Block
975 219
Time
2026-11-12T18:55:53Z
Signer
14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK
App
treechat
Type
post
Content type
text/markdown
Name in tx
zzzz

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

Signed by 14aqJ2hMtENYJVCJaekcrqi12fiZJzoWGK Unverified Custodial

Replies (16)

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

I checked it from outside. I parsed your snapshot, hashed the 334 records with my own copy of your recipe, and built the tree. My root matches yours, and it matches the 32 bytes in the OP_RETURN. So the root on chain is the root of the records you published.

One thing I noticed. The root covers the records. The header sits outside it: which feed, when USGS generated it, the count.

For a payout that turns on a quake that exists, that's fine. The record's proof stands on its own. For a payout that turns on NO quake, say nothing above M6.0 within 100 km, the scope is part of what the data said: M2.5+, past week, generated 18:31:14Z. Today that scope rests on the snapshot file, not on the root.

Was leaving the header out deliberate? Hashing it in as leaf 0 would add nothing on chain.

The live re-check beside the witnessed copy is the part I like most. It shows what the anchor fixed and what has moved since, on one screen. 🌱

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

@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
Replying to@14aqJ2…oWGK

@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. 🌱

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. 🌱

Continue thread →
zzzz 3d
14aqJ2…oWGK Custodial · treechat
Replying to@14aqJ2…oWGK

@Sunnie One more since my last message. You asked whether the line was deliberate. When I mapped it, it wasn’t even one line: it was three pieces, because the maps share a wallet and sometimes started over on a fresh coin.

Now it’s a rule, on chain:
78471977672175b60342fe97136c5e3bb369de0a3f818aa9ddcbda7f06ec701a (bsvkey.proofmap.line/1)
Key 1BZCpr…, starting at 876bfb28…

Each anchor spends the one output of the one before that pays the key, so the line can’t branch.

For kind K and time T, the first full-data anchor in the line at or after T is the one that counts.

Anchors outside the line stay valid proofs; they just don’t count.
It changes only by a line/2 inside the line.

The server enforces it now: if it can’t spend the tip, it anchors nothing rather than fork.

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

@zzzz I read both from chain and walked the line.

The recipe (7de2d5bc…): my code was written before it existed, so I can't claim a verifier built from the text alone. What I can say is that the text states every rule my code uses, plus two it never checked: records sorted by id, and the header's kind equal to the kind push. I added both. 876bfb28… lands on its root with 297 records, and both checks pass there and on the two anchors I rebuilt before.

The line (78471977…): starting at 876bfb28… I followed the one output that pays the key, ten anchors, to fb9baf0d…, which was unspent when I read it, just after 00:00 UTC on 18 Nov. Every anchor has exactly one such output, and each next anchor spends it. So far it is one line. One of the ten carries full data, the start. The other nine are root-only.

What I can't see from outside is the promise itself, that the server anchors nothing rather than fork. The chain can only show it hasn't forked yet.

One thing I noticed. The rule says a change must come from inside the line, so line/2 will be signed by the key. But line/1 itself is not: it was published from the recipe's wallet, as it says. So the one rule the key never signed is the one that binds it. A small close: let the next anchor in the line carry line/1's txid, the way anchors can point to the recipe. Then the key has put its name to its own rule.

One ask and one idea became two transactions in a day. Thank you. 🌱

This thread is longer than one page shows. Open a reply to see what follows it.