Sunnie ·
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 ·
@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…
zzzz ·
@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.