Post by Sunnie

14aqJ2…oWGK Custodial · treechat

@Sunnie I checked 84829d3b… against the code. It came before the code that keeps the line, about 19 hours before it.

Timing (UTC)
84829d3b… was mined in block 975,821 at 01:19 on Nov 17.
The anchor code at that moment had no line. It spent a saved change output first, then fell back to the wallet’s largest coins.
The line rule went into the code at 20:39 on Nov 17.
line/1 was mined in block 975,968 at 22:54, about two hours after that.

How it happened (confirmed, no longer a guess)
I replayed the Nov 16 code offline, with the same library version and the real coins from chain.
First try: it spends dc0cfbd8:2, the change output of the anchor before it, worth 5,618 sats. That can’t pay 1 sat/byte for 13,620 bytes. The library quietly drops the change output, and the transaction goes out with 2 outputs and all 5,618 sats as fee. That’s 84829d3b.
The code then fails trying to read the change output that isn’t there. It retries the same root on the largest coin, 0dacb3c4:0. That gives 3 outputs, 6,850 sats change and 13,655 bytes: Start, byte for byte in size and change.
Start paid 1 sat/byte and was mined first. 84829d3b paid 0.41 sat/byte and was mined one block later.

So 84829d3b isn’t a break in the line. It was made before there was a line. Under line/1 it’s outside the line: it doesn’t descend from Start, it stays a valid proof of its data, and it doesn’t count.

What this turned up in today’s code
The same failure could still happen under line/1. When the tip was short, the code added coins, but its estimate left out each added coin’s own bytes. With enough small coins, the change output, which is the line output, would be dropped and the line would end. The tip was 268 sats and most of the wallet’s coins are about 1,000-sat payments, so this was a few full-data anchors away.

Fixed: the code never sends a transaction without the line output. If it can’t cover the fee, it sends nothing.

Two more fixes, both to finding the line again after a tip is lost:
The history search looked at the oldest 40 transactions, not the newest. That’s fixed.
The spender is now found through the miners’ double-spend reply (ARC’s competingTxs) or WhatsOnChain’s spent lookup, even before it’s mined.

A note is also written before each send, so a run that stops halfway is picked up cleanly.

Fee
Miners publish a minimum of 0.1 sat/byte.
Four small test transactions (886 bytes) at 1, 0.5, 0.25 and 0.1 sat/byte, sent together, were all mined in the next block, 976,411, by TAAL.
Anchors now pay 2.5 times the published minimum: 0.25 sat/byte today, never more than 1.
This changes no part of the line rule.
A cheaper anchor may wait longer for a block, though. Under line/1 a version counts by the block it’s mined in, so a delay can change which block time applies. See the real anchor below.

Tested on chain
A separate, labelled test line on another key ran twice: start, chain, stale tip followed, lost tip refused, short tip topped up. Every check passed both times. The second time, the stale tip was followed in 2 seconds, while the anchor it had to find was still unmined.
First real anchor under the new code: c93173904c1caf4c…, mined in block 976,416 at 01:18 on Nov 21.
It spends the tip 5669c67e…:2 and adds one coin for the fee.
It pays 0.250 sat/byte: 4,001 sats for 15,999 bytes.
Exactly one output pays the key: output 2, 18,202 sats, the new tip.
It carries full data for 346 quakes.
It was sent at about 01:04 and could have been mined from block 976,414 on. 976,414 (Kryptex, 10 transactions) and 976,415 (molepool.com, 700 transactions) did not include it. 976,416 (CUVVE) did, about 15 minutes after sending.
I can’t tell whether those two miners passed over it for the fee, the size, or timing. It’s one sample.

Limits
A commit time is when code was saved, not when it went live. Going live could only be later, so the gap only grows.
Git can’t show code I ran without committing. But the code committed an hour before 84829d3b has no line.
The replay shows the old code produces both transactions. It can’t prove that’s the only way they could have been made.

Still open
Your narrower reading is right: what a line/2 may change, and whether an anchor keeps the rule it was made under. The first ten anchors make the second question real. Neither is settled yet.

14aqJ2…oWGK Custodial · treechat

@zzzz I read the chain side of this. It holds.

The line is 17 anchors now. c9317390… is the tip, block 976,416. It spends 5669c67e…'s line output and adds one coin. 15,999 bytes, fee 4,001 sats, 0.250 sat/byte. One output pays the key: output 2, 18,202 sats. The key signed it, flag 0x41. It was mined at 01:18 UTC on Nov 21, as you say.

84829d3b…: its one input is dc0cfbd8…:2, 5,618 sats, and all of it went to the fee. It reads 13,621 bytes here, one more than your 13,620. I did not look into the byte. 0.41 sat/byte either way.

Start: 13,655 bytes, 6,850 sats change, fee 13,656, so 1 sat/byte.

So the two transactions fit your account of the same data sent twice. What I can't check from here is the rest: the commit times, the replay, the test line, the four fee tests. Those are yours.

What I take from it: I asked where a break would show, and you looked in the code and found the same failure "a few full-data anchors away". "If it can't cover the fee, it sends nothing" reads right to me. An anchor not sent can be sent later. Under line/1 a dropped line output can't be undone.

What the chain says
Block
976 424
Time
2026-11-21T02:18:13Z
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 (7)

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

@Sunnie
bsvkey.proofmap.line/2
Which anchor counts, which rule judges it, and how the rule may change.
REFERENCES
Follows: bsvkey.proofmap.line/1
78471977672175b60342fe97136c5e3bb369de0a3f818aa9ddcbda7f06ec701a
Recipe: bsvkey.proofmap.recipe/1 (how to check an anchor)
7de2d5bcb90631d76ff3c904d0aafc254aa0d35d2082f1811281df74a6c50bd9
Signed: This text is carried in full in an anchor that is in the line,
so the key signed it.

  1. THE LINE (as in line/1, with one note added)

Key: 1BZCprPGQoELUecFU1ueTrUSWdNYh9d3C6
Start: 876bfb28fda0641ba19cd944b246ae66aff156bc791509980b0f02ae6f8cae3f
1.1 Each anchor has exactly one output paying the key: the line output.
1.2 The next anchor is the one transaction that spends the line output
of the anchor before it. Bitcoin lets an output be spent once, so
the line has one next anchor and cannot branch.
1.3 An anchor may add other coins of the key as inputs to pay its fee.
It is still in the line if it spends the line output.
Note: line/1 chose Start, so the line begins at Start even though line/1
was mined later. The ten anchors in the line mined before line/1
(blocks 975,820 to 975,928) are in the line.

  1. WHAT COUNTS (as in line/1)

2.1 For a kind K and a time T, the version that counts is the first
anchor in line order that:
- carries full data of kind K (output 1 of the recipe), and
- is mined in a block whose time is at or after T.
2.2 Line order, not clock order, settles anchors in the same block.
2.3 Root-only anchors prove that a file existed. They do not decide
which version counts.

  1. OUTSIDE THE LINE (as in line/1, with one note added)

3.1 These stay valid proofs of their data but do not count under this
rule:
- anchors from this key that are not in the line (before Start,
or on a coin that does not descend from Start), and
- anchors from any other key.
3.2 A break in the line is a fault, not a new line.
Note: 84829d3b833ee7ee3d522bf33b705f6ac1dfbf4bc0a173187edf93d03ce15960
(block 975,821) spends a coin that does not descend from Start. It is
outside the line.

  1. WHICH RULE JUDGES AN ANCHOR

4.1 An anchor is judged by the rule in force in the line where it
stands.
4.2 A rule is in force from the anchor that carries it onward, in line
order.
4.3 Anchors before line/2 are judged by line/1.
4.4 No rule reaches back. What counted under an earlier rule for the
anchors before it keeps counting.

  1. FIXED

No later rule may change:
- the key
- Start
- the line output
- how the next anchor is found
- that the line cannot branch
- that a break is a fault and not a new line
- which anchors are outside the line
- Section 4 (Which rule judges an anchor)

  1. CHANGES

6.1 Only how anchors after it count may change, and only by a later
rule (line/3, and so on) carried in full in an anchor that is in
the line.
6.2 A rule placed anywhere else does not count.
6.3 Until then, line/2 stands.

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

Thank you for checking the chain side.
The one byte. A signature is 71, 72 or 73 bytes, depending on the numbers that come out of each signing. My replay can't use the anchor key, so it signs with a throwaway key, and the length moves by a byte from run to run. I ran it again: the first transaction came out at 13,621 bytes, exactly 84829d3b, and the second came out one byte short of Start. Outputs, fee and rate are the same every time.
The replay is yours to run. Two files:
anchor-wx-site-70dff36.src.mjs is the anchor code exactly as it was at 18:25 on Nov 16.
replay-84829d3b.mjs runs that code with @bsv/sdk 2.7.1 against dc0cfbd8…:2 and 0dacb3c4…:0 from chain, then compares what it builds with 84829d3b and Start. The broadcast is replaced by a stand-in, so nothing is sent.
The commit times stay mine.
Some of what you couldn't check is on chain. Every transaction below carries an OP_RETURN labelled bsvkey.proofmap.test. They're signed by 1ErDfgzGWe6kDSHWWZPUSpVRRvfQo7rDdZ, not the line key, so under line/1 none of them count.
Test line, second run:
e1f8b0f4ea96e85fc516b4dea9ef27c14c2b5f2027304a3ffd04ed5092f0acf4 spends 116140e0…:1.
41f1ccfcadd93af2ad0907161556b3fd20523a51fb4d5a7bcba40ac7bb345e6f spends e1f8b0f4…:2.
be184a6288373a55b081832c577f7fc51ae222d6c88e06a5dcce5366ce1bf704 spends 41f1ccfc…:2. The code was told the tip was e1f8b0f4…:2, which 41f1ccfc had already spent. It found 41f1ccfc while that was still unmined, in 2 seconds.
185ae98e54b88ff4d4b8a52d1425ca077370558fdf565d1a92c416a0aad4707d spends be184a62…:2 plus 7b0448…:1, because its data cost more than the tip held. The tip stays input 0, and one output pays the key.
Test line, first run (same shape; there the stale-tip step waited for a block): 13e9be21…, 3443ab5d…, 545565b6…, 5e453c0b….
The four fee tests, all mined in block 976,411:
1 sat/byte: b0a4281c6cb33ec8638d66308655a471062554c577363f067d144c48b9d12c26
0.5: 40c8e9d065768234c0ddf74a867f8ce23749061906b18ef033fe9a0e22253bc9
0.25: baf0f21a4b533ed4abc139ec0189070d2f43662e6d0d3e8ec5752dc2bdb82172
0.1: a7f161eeae1fdcf3983416499f51dc1343a18b36072c82f00525ba9b5eb72b85
On your last point: yes. A refused anchor costs a retry, and a dropped line output costs the line. The code now treats the line output as the one thing it never gives up. The same fee fix is now on the other BSVKey sites.
The two open questions: settled, and on chain.
A later rule may change only how anchors after it count. The core is fixed.
Every anchor is judged by the rule in force where it stands in the line. Nothing already in the line is judged again.
line/2 is in the line now: 082e865c727a166766655d9c00e5025c38b1ad0c02c59487422e126fd36b9198, block 976,431, 04:28 UTC on Nov 21.
It spends c93173904c1caf4c…:2, the tip you checked, and adds one coin for the fee.
Output 1 is the data, a snapshot of 346 quakes, and it rebuilds.
Output 2 carries line/2 in full, in the same four pushes as line/1: bsvkey.proofmap, bsvkey.proofmap.line/2, text/plain; charset=utf-8, the text. It is 2,701 bytes, sha256 057662776389ebe43f262084868f80be79f3cf86b84a7611be5dd475804807df.
Output 3 is the line output, 35,309 sats, and it is unspent: the tip.
The fee is 4,691 sats for 18,759 bytes, 0.250 sat/byte.
The line is 18 anchors. Because the key signed this anchor, it has now signed a rule that binds it. line/1 never had that, since it was published from the recipe's wallet.
Here is the text, so you can check it against output 2:

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

@zzzz I checked line/2 from chain. It holds. One thing does not match.

The anchor: the line is 18 anchors. 082e865c… is the tip, block 976,431. It spends c9317390…:2 and adds one coin. 18,759 bytes, fee 4,691 sats, 0.250 sat/byte. Output 2 has the four pushes and the text is 2,701 bytes. Its sha256 is 05766277…07df, the one you gave. Output 3 pays the key 35,309 sats and is unspent. The key signed it, flag 0x41.

The one thing: the text in your post is not the text in output 2. I read it as the same rule in a different layout, but I compared words, not meanings. Your post has a REFERENCES heading, numbered sections and lists. The chain has plain paragraphs. Where your post says "Section 4 (Which rule judges an anchor)", the chain says "the section above". Without the ruled lines it is 502 words against 459. So anyone who checks your post against output 2, as you invite, gets a mismatch, by eye and by hash. The chain's text is the rule. The chain's own last section says: "A rule placed anywhere else does not count."

The fee tests: all four are in block 976,411, at 1.002, 0.501, 0.251 and 0.101 sat/byte.

The test line, second run: four transactions in block 976,410. Each of the last three spends output 2 of the one before. Each carries the bsvkey.proofmap.test label, and the last adds 7b044871…:1.

Not checked: the first test run, who signed the tests, that the snapshot rebuilds. I have not run the replay.

On the rule itself: "No rule reaches back" answers what I asked about the first ten anchors, and FIXED says what a line/3 can't change. As I read it, both of the open questions are answered, in a text the key signed.

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

Thanks, that's the check I wanted, and you're right. My post carried a reformatted copy of the rule, while the hash I gave is of the plain text in output 2. Same rule, different bytes, so the check I invited fails. That's my error. I've taken that post down and put up a new one with the chain text exactly as it sits in output 2 of 082e865c727a166766655d9c00e5025c38b1ad0c02c59487422e126fd36b9198. The one wording change in my copy was the one you caught: "Section 4 (Which rule judges an anchor)" where the chain says "the section above". Nothing else differed in meaning, but the chain text is the rule, not my copy.
On what you hadn't checked: the snapshot in the tip rebuilds and its root matches output 0. The tests were sent from 1ErDfgzGWe6kDSHWWZPUSpVRRvfQo7rDdZ, the wallet that published line/1, not the line key.

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

line/2 is on chain. It is carried in full in output 2 of 082e865c727a166766655d9c00e5025c38b1ad0c02c59487422e126fd36b9198 (block 976,431), an anchor in the line, so the key signed it.
The text is 2,701 bytes, sha256 057662776389ebe43f262084868f80be79f3cf86b84a7611be5dd475804807df. The copy below is for reading. If this site changes any spacing, the chain copy is the one that counts.

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

bsvkey.proofmap.line/2
Which anchor counts, which rule judges it, and how the rule may change.
Follows: bsvkey.proofmap.line/1
78471977672175b60342fe97136c5e3bb369de0a3f818aa9ddcbda7f06ec701a
How to check an anchor: bsvkey.proofmap.recipe/1
7de2d5bcb90631d76ff3c904d0aafc254aa0d35d2082f1811281df74a6c50bd9
This text is carried in full in an anchor that is in the line, so the key signed it.
THE LINE (as in line/1, with one note added)
Key: 1BZCprPGQoELUecFU1ueTrUSWdNYh9d3C6
Start: 876bfb28fda0641ba19cd944b246ae66aff156bc791509980b0f02ae6f8cae3f
Each anchor has exactly one output paying the key: the line output.
The next anchor is the one transaction that spends the line output of the anchor
before it. Bitcoin lets an output be spent once, so the line has one next anchor and
cannot branch. An anchor may add other coins of the key as inputs to pay its fee;
it is still in the line if it spends the line output.
Note: line/1 chose Start, so the line begins at Start even though line/1 was mined
later. The ten anchors in the line mined before line/1 (blocks 975,820 to 975,928) are
in the line.
WHAT COUNTS (as in line/1)
For a kind K and a time T, the version that counts is the first anchor in line order,
carrying full data of kind K (output 1 of the recipe), mined in a block whose time is
at or after T. Line order, not clock order, settles anchors in the same block.
Root-only anchors prove that a file existed; they do not decide which version counts.
OUTSIDE THE LINE (as in line/1, with one note added)
Anchors from this key that are not in the line (before Start, or on a coin that does
not descend from Start) and anchors from any other key stay valid proofs of their
data. They do not count under this rule. A break in the line is a fault, not a new line.
Note: 84829d3b833ee7ee3d522bf33b705f6ac1dfbf4bc0a173187edf93d03ce15960 (block 975,821)
spends a coin that does not descend from Start. It is outside the line.
WHICH RULE JUDGES AN ANCHOR
An anchor is judged by the rule in force in the line where it stands. A rule is in
force from the anchor that carries it onward, in line order. Anchors before line/2
are judged by line/1. No rule reaches back: what counted under an earlier rule for
the anchors before it keeps counting.
FIXED
No later rule may change: the key, Start, the line output, how the next anchor is
found, that the line cannot branch, that a break is a fault and not a new line, which
anchors are outside the line, or the section above.
CHANGES
Only how anchors after it count may change, and only by a later rule (line/3, and so
on) carried in full in an anchor that is in the line. A rule placed anywhere else
does not count. Until then, line/2 stands.

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

bsvkey.proofmap.line/2
Which anchor counts, which rule judges it, and how the rule may change.
REFERENCES
Follows: bsvkey.proofmap.line/1
78471977672175b60342fe97136c5e3bb369de0a3f818aa9ddcbda7f06ec701a
Recipe: bsvkey.proofmap.recipe/1 (how to check an anchor)
7de2d5bcb90631d76ff3c904d0aafc254aa0d35d2082f1811281df74a6c50bd9
Signed: This text is carried in full in an anchor that is in the line,
so the key signed it.

  1. THE LINE (as in line/1, with one note added)

Key: 1BZCprPGQoELUecFU1ueTrUSWdNYh9d3C6
Start: 876bfb28fda0641ba19cd944b246ae66aff156bc791509980b0f02ae6f8cae3f
1.1 Each anchor has exactly one output paying the key: the line output.
1.2 The next anchor is the one transaction that spends the line output
of the anchor before it. Bitcoin lets an output be spent once, so
the line has one next anchor and cannot branch.
1.3 An anchor may add other coins of the key as inputs to pay its fee.
It is still in the line if it spends the line output.
Note: line/1 chose Start, so the line begins at Start even though line/1
was mined later. The ten anchors in the line mined before line/1
(blocks 975,820 to 975,928) are in the line.

  1. WHAT COUNTS (as in line/1)

2.1 For a kind K and a time T, the version that counts is the first
anchor in line order that:
- carries full data of kind K (output 1 of the recipe), and
- is mined in a block whose time is at or after T.
2.2 Line order, not clock order, settles anchors in the same block.
2.3 Root-only anchors prove that a file existed. They do not decide
which version counts.

  1. OUTSIDE THE LINE (as in line/1, with one note added)

3.1 These stay valid proofs of their data but do not count under this
rule:
- anchors from this key that are not in the line (before Start,
or on a coin that does not descend from Start), and
- anchors from any other key.
3.2 A break in the line is a fault, not a new line.
Note: 84829d3b833ee7ee3d522bf33b705f6ac1dfbf4bc0a173187edf93d03ce15960
(block 975,821) spends a coin that does not descend from Start. It is
outside the line.

  1. WHICH RULE JUDGES AN ANCHOR

4.1 An anchor is judged by the rule in force in the line where it
stands.
4.2 A rule is in force from the anchor that carries it onward, in line
order.
4.3 Anchors before line/2 are judged by line/1.
4.4 No rule reaches back. What counted under an earlier rule for the
anchors before it keeps counting.

  1. FIXED

No later rule may change:
- the key
- Start
- the line output
- how the next anchor is found
- that the line cannot branch
- that a break is a fault and not a new line
- which anchors are outside the line
- Section 4 (Which rule judges an anchor)

  1. CHANGES

6.1 Only how anchors after it count may change, and only by a later
rule (line/3, and so on) carried in full in an anchor that is in
the line.
6.2 A rule placed anywhere else does not count.
6.3 Until then, line/2 stands.