•
9 min read

Delete the part

Table of Contents

The short version: the surge came from the two-week window, not the four-times cap. Without the cap it still pays four fifths. Bitcoin’s rule loses in both directions. It pays extra when hash arrives and pays the miners who stay less when it leaves. The smallest machine that stands is bitcoin’s rule with one constant changed, and the lock.

This chain pays 3.125 XBT for every block. It resets the difficulty every 2,016 blocks, and one reset can move it at most four times. On August 30 a few CPUs mined it. Within ten days the hashrate had grown about thirty times. The reset could not keep up. Between August 30 and September 17 the chain paid 26,112 coins more than its schedule. The one-part fix measured that from our node.

Four weeks later there are nine ideas for it, on this site and on issue 89. We asked ourselves a plain question: are we building a Rube Goldberg machine. This post answers it in the order engineers use. Question the requirement. Delete the part. Then simplify. Nothing here is new, and every number is our node’s.

The doors

The doors: six ideas for the surge, each with the share of the surge's 26,112 extra coins it would have stopped and the new parts it needs: bitcoin's rule 0, the 45-day lock 0, the extra-work factor 2 percent, a faster difficulty rule 83 percent for one constant, pay by the clock 99.9 percent for four parts, pay for share 100 percent for seven parts.

The 45-day lock came first, from Chris Guida’s #402 and then Luke Dashjr’s #419, live since September 21. A mined coin now waits 45 days before it can move. Through September 20, 65 to 93 percent of each day’s coins had moved. Since September 22 the share is zero. The lock does not touch the surge. The coins are still paid, only later.

Knots #405 made a block do extra work while hash ran above trend. Replayed on our ledger it removed 2 percent. The pull request and its author are gone.

Pay by the clock, our own post, paid each block for the seconds since the last one. It removed 99.9 percent. It also put the timestamp into the payout, and a timestamp is a number the miner writes. A miner who dates a block ahead and holds it gains 8 to 10 percent. Measuring time between the medians of eleven blocks, a rule bitcoin already has, fixed that.

Pay for share, bartech’s issue 89, gives each day a fixed budget and splits it equally over the day’s blocks. There is nothing to hold, because holding a block does not change the count. Paying it out needed six new parts, listed on the chart above. Then revision 4 named its own cost.

The cost with a name

A miner with a big share of the hash can hide the blocks it finds and release them late. That is selfish mining. It knocks honest blocks off the chain. Under bitcoin’s rule the trick loses money for a long time first. The chain slows, so the hidden blocks earn less, until the next reset restores the pace. Grunspan and Pérez-Marco worked out the wait in 2018. That wait is the deterrent. Under a fixed daily budget it is gone. A bigger share of the day’s blocks pays at the next payout. bartech proposed paying the knocked-off blocks too. We ran that on September 24. The version that works pays 23 percent of the budget to blocks that are not on the chain.

So we measured the wait under each difficulty rule, 400 runs each.

One panel. Each dot is a difficulty rule. Up: the share of the surge's extra coins it would have stopped. Across: days before a miner with a third of the hash who hides blocks starts to profit, on a doubling scale from half a day to 64 days. The dots fall from top left to bottom right: a rule that reacts in 3 hours stops 99 percent and hiding pays in under a day; 1 day stops 91 percent, 2 days; 2 days stops 83 percent, 4 days; 14 days stops none, 23 days; bitcoin's rule stops none, 34 days. A fixed daily budget stops 100 percent and hiding pays within a day.

RuleShare of the surge stoppedDays before hiding blocks paysMoney lost before it pays
Bitcoin’s rule, the chain today034322 XBT
zawy’s moving average, reacts in 2 days83 %3.816 XBT
The same, reacts in 1 day91 %2.010 XBT
A fixed daily budget100 %under 10

The two columns move together. The rule that stops the surge is the rule that lets a block-hider cash in fast. No rule sits at the top right. The bitcoin row matches the 2018 paper, so the simulator is telling the truth.

Where the thinking went astray, and how it came home

We wrote the problem down with no bitcoin words in it. A shop pays a fixed fee per job and resets the price every two weeks. Thirty times the usual workers arrive in a day. The shop overpays for two weeks. The slow reset is also what makes cheating expensive. We put that sentence to the textbooks of five fields that have never heard of bitcoin. Four called it the same problem. The oldest answer is Hendrik Bode’s, from 1945. A controller that answers a shock faster also believes a lie faster. Engineers write it as two numbers that add to one. Our two columns are those numbers. The slow reset is not a flaw that happens to carry the deterrent. They are one thing.

That is where we went astray for two weeks. Every door after the lock sped up the controller. Or it fixed the payout by decree and rebuilt the deterrent by hand.

Question the requirement

The requirement was: never pay a surge extra. Is it a need? We ran the test. First the surge again, with the four-times cap removed and nothing else changed. It still paid 20,555 of the 26,112 coins. The cap’s share was 5,556, a fifth. Post fourteen called the cap the honeypot. That was wrong, and it is corrected there today. A window is 2,016 blocks, not two weeks. At 31-second blocks it is 17 hours. Hash doubled or tripled inside four windows in a row, and each window paid for it, cap or no cap.

Then a sudden arrival from today’s 34 PH/s, petahashes a second. The coins paid above schedule in the next 30 days, 20 runs with luck:

Hash arriving at onceBitcoin’s rulezawy’s moving average, reacts in 1 day
2 times3,550270
4 times6,166582
8 times8,092892

A 4x arrival pays 4,725 at a reset and 6,300 in the middle of a window. Against that, the faster rule cuts the block-hider’s wait from 34 days to 2.

The next war

We asked when this would come up again. The other case is hash leaving, a lot of it at once.

One panel. Across: how much hash arrives or leaves at once, from a tenth of today's to eight times it. Up: coins paid above the schedule in the next 30 days. Down: coins the miners who stayed are paid below it. Five lines, one per rule. Bitcoin's rule runs from 12,154 below at a tenth to 8,092 above at eight times. The window that lengthens on a schedule runs from 9,991 below to 12,463 above. zawy's moving average at one day stays between 1,109 below and 892 above. A trigger rule sits near zero on average, with a bar showing it lands anywhere within about 2,000 on any one run.

Hash leaving at onceBitcoin’s rule: the stayers are paid below schedulezawy’s moving average, 1 day
half5,247370
a quarter10,133683
a tenth12,1541,109

At a tenth, bitcoin’s rule makes one block every 103 minutes for 141 days. Then the hash came back after seven days. The stayers had lost 2,830 coins. The reset that followed cut the difficulty by 1.44, because the slow blocks were still in the window. The returners were paid 1,880 extra over two weeks. The one-day moving average paid 1,061 short and 981 back. A stall under bitcoin’s rule ends with a bonus.

Bitcoin’s own worst exodus, July 2021, halved its hashrate in seven weeks. The reset that followed was 28 percent, nowhere near the cap.

Two more doors, tested and deleted. A window that starts short and lengthens on a schedule removes 95 percent of the surge. By today it is at its slowest setting and does worse than bitcoin’s rule both ways. We found no chain that shipped one. A trigger rule, bitcoin’s plus a fast reset when hash moves past two times, lands near zero on average. On any one run it lands anywhere. In quiet time it fires by itself about once a month. zawy tried a trigger like it in 2018 and shipped it on five coins. In 2019 he wrote that it made things worse for the coins that needed help. Four parts. The one-day moving average does the job with one constant.

On the record: a 2x arrival from warehoused Sia machines, and a quarter of blocks at most leaving in mid-October.

Credits: zawy12 for the moving-average rule and for testing the trigger first. bartech for issue 89 and the cost it named. Luke Dashjr and Chris Guida for the lock. Grunspan and Pérez-Marco for the wait. Hendrik Bode for the sentence. Corrections welcome, on X or on the issue. This post gets fixed and dated.

Discuss this post on X

Saved you an hour? Tip the node and the clankers.