Author: Jameson Lopp, co-founder of Casa; Translation: Jinse Finance xiaozou
It is time to reset the Bitcoin test network, more specifically, "testnet" or "testnet3".
Why? Because the basic principles of the testnet have been broken. Test coins should be abundant, diverse and free to use, so that developers can experiment and test their Bitcoin software without having to spend money debugging the software or risk damaging actual value.
· The testnet has not been reset in 13 years.
· The block reward is close to 0, and the difficulty of mining has increased.
· People have been using it for airdrops and other campaigns that promise actual value.
· This has created economic demand for TBTC.
· People are buying and selling TBTC in multiple places.
· There is a quirk in the testnet that we should fix, because it has in some ways led us to this point.
Why did the testnet mining rewards dry up? Because it is currently at block height 2,811,000, which is equivalent to the mainnet block height in 2061. Therefore, the block reward is only ~0.006 TBTC. How can this be? The reason I described a few years ago:
On the mainnet, Bitcoin produces 144 blocks per day, maybe a few blocks off. On the testnet… as you can see in the image below, the volatility is much greater. Due to some slightly different consensus rules, every once in a while there will be a day with over 10,000 blocks produced — the equivalent of several months of blocks produced in a single day.
1, The Beginning
I first became aware of the cumulative value of testnets because I was known for giving away testnet coins to developers over the years. Searching for testcoins on Google/Reddit/X usually turned up my username. So when I started getting testcoin requests from non-developers early this year, I started digging deeper. It ended up being the “SatoshiVM” project, claiming to build a zero-knowledge rollup second layer.
SatoshiVM shows some red flags:
· Their github is a ghost town with no activity.
· They have nearly 200k followers on X, but no one I know of is following or talking about the project.
· A lot of people on X complaining about the airdrop being useless.
I think this is the first large-scale scam I've seen on a testnet, but it's by no means the first testnet scam. It's not uncommon for bad actors to take advantage of people's naivety and sell them testnet bitcoins at the mainnet bitcoin exchange rate. As an aside, this is why all wallets that support the testnet need to post a prominent disclaimer on the main interface stating that the testcoins have no value!
2, the testnet has accumulated value
Obviously, there will be a lot of mean people accusing me of writing such an article because I "personally don't like" their project. What I want to say is:
The only reason I advocate resetting the testnet is that the testnet should be free for developers to use. Other than that, everyone should be free to use the testnet for any development purpose they want.
Here is some evidence that the testcoins are being traded at real value:
This is a brokerage site that sells tokens for a little over a dollar. Note that they even state that it is difficult to obtain test coins because they have accumulated value.
This is another site that runs a complete order book for tokens trading between the testnet and the mainnet.
This is a decentralized exchange running on the testnet that can trade various tokens.
3, Phase 1: Mining cheap blocks
It is quite easy to mine a series of low difficulty blocks.
(1)Trigger minimum difficulty rule
(2)Laptop GPU can create 1 block every 10 seconds
(3)Keep mining until timestamps are too far ahead (2 hours)
(4)Wait
(5)Repeat
The last time I mined on the testnet was 9 years ago, using a cheap second-hand ASIC. This time, I wanted to mine only with my desktop CPU, so I used the very old bfgminer software.
But it turned out that even at difficulty 1, CPU mining was too slow, so I had to spend some time getting bfminer to work with my GPU.
In my bitcoin.conf, I have set up a bash script to be triggered for each newly received block in the following way:
The bash script basically checks if the miner is running. If not, it runs the miner for 60 seconds and then kills the mining process.
To prove that it is working, I checked the testnet block explorer.
Then we can see a lot of blank blocks like this being mined:
However, after running for almost a full day, I noticed that I wasn't mining that many blank blocks. By looking at the timestamps of other miners' blocks, I found that they were also adjusting their timestamps in time! This was a bit surprising because I thought miners had to do this manually. A closer look at the mining template logic shows that if the median time past in the last 6 blocks is in the future of the system clock, then it will use median time past + 1 second. This actually makes sense, because it’s a consensus rule that if the timestamp of the block you mine is earlier than the “median time past”, then it will be considered invalid and rejected by other nodes.
So this rule meant that by constantly trying to push time forward, I was working against myself and shrinking the window in which the time warp was valid. So I turned off the automatic blank block mining that was triggered after each block.
But in the few days that I ran the Phase 1 script, you can see that I successfully increased the number of testnet blocks by 300%!
Public Reaction
The interesting thing about my non-destructive Phase 1 script (which didn’t actually slow down anyone’s transaction confirmation) is that it brought attention to some projects that I didn’t even know were running at the time. I started getting telegram messages from people associated with the project asking what I was doing. Then their project lead tried to turn himself into a victim, making a lot of ridiculous claims.
After doing some research on this motoswap project, it became very clear that it was run by people from BSV. So it was not surprising to see them describing their failure as "it's us against the maxis" with a common tribalistic narrative. For some reason, Danny kept telling his supporters that they were switching from testnet to mainnet and that this would destroy the mainnet. But this is of course completely untrue: the only thing that would happen if they switched to mainnet is that degen traders would be discouraged from using the DEX because of the high prices.
This guy is so dumb that he can't even spell the name of his own project correctly. But anyone who has been following the space for a few years should be well aware of how foolish it is to believe that Craig Wright is credible, or that BSV is a good idea.
This guy clearly saw the writing on the wall and was probably worried that he wouldn't be able to continue selling test coins.
What's interesting about my timestamp manipulation is that it also causes all hash rate estimates to go crazy. Mempool.space shows that I have tripled the network hashrate and added over 1 Petahash per second, even though I am only using a 500 Megahash per second GPU, turned on for only a few seconds at a time!
4, Phase 2: Perpetual Block Storm
Phase 1, which created low difficulty blocks, was just a proof of concept for Phase 2, which created more chaos on the network. I first noticed this chaos in 2015:
How did I execute Phase 2? Practically the same steps as Phase 1, but make sure to trigger them before every difficulty adjustment. What are the results of Phase 2? We can see that under normal circumstances, the testnet produces about 150 blocks per day. But with Permanent Block Storm mode activated, we can easily produce more than 20,000 blocks per day!
This is pretty crazy, because we are talking about speeding up block generation by 150 to 250 times, and therefore the overall data throughput on the blockchain. As you would expect, many people running infrastructure and services on the testnet were not ready to scale 100+ times without warning...
Public Reaction
As expected, the first people to notice that the testnet is behaving strangely will be those running projects that trade tokens with real value.
A day passed, and then…
I find it interesting that this degen project tried to turn their infrastructure failure into a positive by taking credit for "breaking the testnet".
Also, the response from the testnet faucet operator below is weird. It does make me question his motives, as you can see from the comments on his website that he seems to be happy with the airdrop and trading on the testnet. Of course, he is free to espouse this view, but I suspect he will find himself not in fundamental agreement with the consensus of other developers using the testnet.
This cancellation attempt is a strange viewpoint, as my status as a Bitcoin Core contributor has nothing to do with my manipulation of the testnet. I have only modified code that runs locally on my own machine. Bitcoin Core as an organization has no involvement in my actions…
I also noticed that block storms can disrupt the mempool.space infrastructure. Below you can see that their mempool chart stopped updating after the storm hit.
5、Phase 3:To be continued!
For now, I'm giving testnet3 some time to give developers time to harden their infrastructure and/or switch networks. I'm told that they are moving to signet, which is a testnet that is much less chaotic because block mining is not using proof of work.
Note that nothing I've done so far actually requires hashrate or electricity. I spent more time (a few hours) getting the OpenCL driver to work on my Linux (using my GPU for mining), and didn't need to write a script to trigger a block storm.
I won't go into detail here to avoid spoiling the surprise, but it's a very interesting discussion when you start thinking about what you can do with relatively little hashrate.
I'll just say that using the testnet for any real value transactions is a very bad idea. Testnets are not secure, and I'm happy to provide proof to those who refuse to believe this. I'll reiterate: I don't care if people use testnets to test controversial things like inscriptions/runes/ordinals/exchanges. But if your purpose in doing these things is to conduct actual value transactions, then you're better off using dogecoin or litecoin.
6, reset testnet
Bitcoin Core's code changes will launch testnet4, and several contributors are currently working on it.
This is a unique job because it's not every day you create a new genesis block. I found this old tool still works great.
So now testnet4 has a potential new genesis block:
I hope testnet4 will be finished and available for use in the next few months.
7, Summary
I suspect that if a testnet runs long enough, the testnet token will become scarce and may accumulate value. Therefore, the only way to ensure that testnets do not accrue value is to instill a culture of regular resets.
For everyone currently running infrastructure on testnet3, please note: I strongly recommend that you start planning to migrate your infrastructure to testnet4 this summer or fall.