区块容量之战此书的第十二章的英文版本现发布如下。全书可在亚马逊上购买。提醒大家，任何实体书籍销售利润的 50％ 将捐赠给无国界医生。 这是一家为受冲突、流行病、灾难或被排除在医疗保健体系之外的人们提供医疗援助的慈善机构。
The Blocksize War – Chapter 12 – Bitcoin Unlimited
With Bitcoin Classic failing to gain traction, in the late summer of 2016 the large blockers converged on a new hardfork blocksize increase client, called Bitcoin Unlimited. One would think this would simply remove the blocksize limit cap and allow unlimited blocksizes. Had this been the case, Bitcoin Unlimited was likely to be a far more successful proposal. However, when one looked in more detail at Bitcoin Unlimited, not only was it highly complex, it was also deeply technically flawed. Converging on such a complicated and weak proposal was another monumental strategic error from the large blockers. In small block circles, there was delight at this development, but also an emphasis on keeping this quiet, a ploy designed to keep the large blockers associated with this weak client. Bitcoin Unlimited was not just a client, but also a formal organisation, with a membership, by-laws, a president and membership voting.
The key idea behind Bitcoin Unlimited was that miners and users add parameters to their clients related to the blocksize limit. These are: i. Maximum generation (MG) size (only for miners): a local blocksize limit, which will not be exceeded by a miner producing a block; ii. Excessive blocksize (EB): this is the size of a block that a node and miner will accept; and iii. Acceptance Depth (AD): this is the number of confirmations a block requires before a node accepts it, even if it is larger than EB. Critics of this claimed that everyone setting their own rules means the network would not converge. This proposal diverges from the core consensus feature of Bitcoin: that miners build on the most work valid chain. Not only does it diverge from this, it introduces the AD concept, where miners could first try to build on a shorter valid chain, however if they lose a race, they could then jump ahead several blocks to a longer, now suddenly valid chain. Bitcoin Unlimited had no activation methodology like XT or Classic; it was just assumed to somehow become the new Bitcoin when miners upgraded. Therefore, it was considered by many as a more extreme proposal than its predecessors.
Keen to learn more about Bitcoin Unlimited, in early December 2016 I attended a Bitcoin Unlimited promotional event in Shenzhen (China). Speaking at the event and on the promotional tour was Roger Ver, a keen promoter of Bitcoin Unlimited; Jake Smith; several employees of Bitcoin.com; members of the Bitcoin Unlimited organisation; some of the Bitcoin Unlimited developers; and Haipo Yang, the CEO of mining pool ViaBTC.
The opening speaker was Roger Ver and Chinese translation was made available. He spoke very clearly and persuasively, making the following points:
- He was the first person to invest in Bitcoin startups;
- From 2009, when Bitcoin was launched, until 2015, the blocks were not full and transactions were cheap. Bitcoin Core has a deliberate strategy of full blocks, which is a major economic change;
- The low transaction fees had made Bitcoin successful up until this point;
- The intention was always to increase the blocksize limit and this was explicitly stated by everybody, but now new people have come along and are preventing this;
- There is widespread censorship on Reddit and proposals to increase the blocksize limit cannot be discussed. Bitcoin Core therefore does not want people to make up their own minds;
- Bitcoin Core understands computer code, but they don’t understand economic code;
- Bitcoin Core wants Bitcoin to be a high fee, interbank settlement network; Satoshi wanted Bitcoin to be P2P Electronic Cash, the title in the whitepaper;
- There are altcoins waiting in the wings and, if the blocksize does not increase, these coins will take over Bitcoin’s network effect, if Bitcoin is no longer easy and convenient to use.
I had seen Roger make many of these points before. The relentlessness and repetitiveness with which Roger could repeat these messages again and again, all over the world, was remarkable. Roger appeared to have a very high degree of conviction and he was clearly very effective and convincing in his messages. Roger was a ruthless and prolific campaigner for the large block camp.
Roger ended his speech by saying that miners and users should switch from Bitcoin Core to Bitcoin Unlimited. However, he never went into any details about the new mechanisms which existed in Bitcoin Unlimited. A few days later, there was a similarly structured Bitcoin Unlimited event in Hong Kong. I remember thinking how much of a shame it was that Roger was focusing all his energy on this internal conflict, rather than promoting the space to outsiders and new merchants as he had in the past.
The next speaker in Shenzhen was Jerry Chan. Jerry spoke about the idea of emergent consensus (EC), which is the idea that the rules of the system are emergent and not imposed in a top-down way by the developers. EC was a system designed to address the concern that if miners and nodes set their own rules, they would all diverge onto different chains. Under this model, he explained, miners are free to set the blocksize limit themselves and, due to the EC system, they would all converge on one chain. Jerry gave various examples of this process from nature:
THINGS WILL SELF ORGANISE. YOU SEE THIS IS NATURE. WATER MOLECULES ORGANISE INTO SNOWFLAKES, WHY, IT’S NOT BECAUSE OF GOD, IT’S BECAUSE THE WATER MOLECULES ARE ARRANGED IN A WAY THAT THEY WILL ALIGN THEMSELVES IN A HEXAGONAL WAY AND FORM SOMETHING LIKE SNOWFLAKES. BIRDS, DOES ANYONE TEACH A BIRD HOW TO FOLLOW THE ONE IN FRONT? NO. THEY CAN LITERALLY FALL ASLEEP WHILE FLYING HUNDREDS OF KILOMETERS AND THEY STILL WONT CRASH. CORE WILL MAKE YOU BELIEVE THAT BAD SHIT WILL HAPPEN IF YOU LET MINERS OR PEOPLE DECIDE THINGS. UNDER EMERGENT CONSENSUS A BLOCK LIMIT WILL NATURALLY EMERGE.
Of course, the characterisation from Jerry that the current Bitcoin rules were imposed from above by Bitcoin Core, was a misrepresentation of how small blockers saw the system. In the small block world, the rules were determined by the nodes that users already run. These rules are very sticky and changing them requires widespread agreement across the community. The large blockers never seemed able to accurately articulate this view, either because they didn’t understand it, or because this did not make as compelling an argument in favour of their proposals.
As for the view that, in nature, many systems appeared to converge or have structure, without such planning or agreement on the rules, it was not clear how relevant this was to Bitcoin. At this point, Bitcoin was already very successful; the network had been operating reasonably smoothly for seven years, overcoming any issues. This appeared to have generated a degree of complacency in the community, with people having an overly optimistic view of the robustness of the system. When questioned about some of the potential weaknesses in Bitcoin Unlimited, its supporters often said that Bitcoin was antifragile and that it would always work. The argument that Bitcoin Unlimited was robust because Bitcoin was so strong, that it was almost impossible to do anything wrong or bad to Bitcoin, seemed incredibly weak to me.
In addition to the three parameters, Bitcoin Unlimited also had something called the “sticky gate”. If a node’s AD threshold was breached, then it would accept blocks of any size for a period of 24 hours. The reasoning here was to prevent a node from being stuck AD blocks behind the tip, after a blocksize increase when a string of larger blocks was produced. An inadvertent, ironic and perverse consequence of this is that a further blocksize limit increase within 24 hours could cause clients with a lower blocksize limit (EB) to follow the larger block chain, and for clients with a larger limit to stay on a smaller block chain. It appeared as if Bitcoin Unlimited had been poorly constructed and the scenarios had not been thought through. This indicated just how desperate the large block camp had become by this point.
Bitcoin Unlimited had several other flaws, including something called the “median EB attack”. Since EB was essentially a consensus rule, and the EB parameter miners chose were included in their blocks, attackers could see the distribution of EB values in the network. This could allow a hostile miner to choose the median EB value, for example, to split the chain and mining hashrate into two arbitrarily-sized groups. This appeared to be a critical weakness. When questioned about this, Bitcoin Unlimited supporters would typically argue that miners are not stupid and they would not let this happen. They also sometimes asserted that, in order to prevent this, miners and users would all converge on the same EB value. However, if miners and users all converge on the same EB value in order to prevent a split, this seemed to be reasonably similar to the security model advocated by small blockers, of convergence on one set of rules. In order to increase the blocksize limit in Bitcoin Unlimited, there would need to be a transition of EB settings to a larger value and then this vulnerability would then open up.
Bitcoin Unlimited also made other changes to the software, not directly linked to the blocksize limit. Bitcoin Unlimited developers had built a technology to propagate blocks faster, called xThin, in contrast to a similar system in Bitcoin Core called compact blocks. There were other ideas in the pipeline too, such as parallel block validation and flexible transactions. Flexible transactions were a new transaction format, similar to SegWit, which was also said to fix transaction malleability. The plan was to ban old-style transactions completely (i.e. a blocksize limit of zero for old-style transactions) and then force all users to adopt the new transaction format. This was, ironically, a far more aggressive version of SegWit, which Bitcoin Unlimited developers opposed. SegWit essentially kept the old 1 MB limit for old transactions and added more blockspace for new transactions.
It therefore appeared that many of these features and proposals were not driven by technical expediency at all. Instead, it was about culture, ego and a desire to be involved in Bitcoin. Most of the large blockers by this point simply hated the small blockers and Bitcoin Core developers. They hated the perception they had that the small block group controlled Bitcoin, and they wanted to be part of Bitcoin. Due to this desire to be more involved, Bitcoin Unlimited expanded its remit beyond simply a blocksize limit increase and covered a variety of areas. This eventually proved to be a mistake and would lead to Bitcoin Unlimited’s downfall. After the blocksize war was over, some in the Bitcoin Unlimited community eventually conceded these errors.
BACK WHEN BU HAD THE MOST MOMENTUM OF ANY BIG BLOCK GROUP, THERE WERE SEVERAL OF US WHO THOUGHT THAT BU SHOULD FOCUS ON JUST A SIMPLE BLOCK SIZE INCREASE ON TOP OF CORE FIRST, INSTEAD OF TRYING TO GET THE ENTIRE COMMUNITY TO ADOPT A COMPLICATED BLOCK SIZE ALGORITHM (“EMERGENT CONSENSUS”). WE ALSO WANTED BU TO STOP TRYING TO IMPLEMENT THEIR OWN VERSION OF WEAK BLOCKS FOR THE TIME BEING. THE CRITICAL ISSUE WAS INCREASING BLOCK SIZE AND FORKING AWAY FROM CORE WITH AS FEW DISTRACTIONS AS POSSIBLE. BU’S INSISTENCE ON ADDING A BUNCH OF COMPLEX CODE INSTEAD OF FOCUSING ON SIMPLICITY BACKFIRED, AS THE BU CODE HAD SEVERAL BUGS CAUSING NODES TO CRASH. THIS GAVE THE OVERALL BITCOIN COMMUNITY THE IMPRESSION THAT BU DEVS COULDN’T REALLY BE TRUSTED TO WRITE SOLID CODE OR TO APPROPRIATELY SCALE THEIR AMBITIONS TO THEIR CODING/TESTING SKILL.
Another member of the community commented:
EC HAS BEEN A MASSIVE MISTAKE IN HINDSIGHT.
Amazingly, despite all of these potential security weaknesses, Bitcoin Unlimited had support from across the large blocker camp, from Brian Armstrong at Coinbase, to Gavin, Jihan Wu and Roger Ver. None of these individuals seemed particularly interested in the nuances and the new parameters involved. They just wanted larger blocks. Bitcoin Unlimited was also gaining support from mining pools, including ViaBTC, GBMiners and BTC.TOP, while node adoption appeared to be on the rise as well. The first pool to support it was ViaBTC, a mining pool which had taken investment from Bitmain and appeared to be largely under the control of Jihan Wu. The BTC.TOP pool was also believed to be controlled by Bitmain. At the start of 2017, around 15 to 20 percent of the Bitcoin hashrate flagged support for Bitcoin Unlimited. Bitmain also directly operated pools, such as Antpool, which started flagging for Bitcoin Unlimited in March 2017. This increased support for Bitcoin Unlimited among miners to the 45 to 55 percent range, a level it stayed at for most of 2017.
Several Bitcoin developers and small blockers accused some of the miners of faking votes in support of Bitcoin Unlimited. They accused pool operators of changing the pool settings to add Bitcoin Unlimited-related data to the blocks, despite still using Bitcoin Core to produce the blocks. They were able to determine this by looking at the transactions in the blocks, which appeared to have been selected by using a new algorithm in Bitcoin Core, which Bitcoin Unlimited had not implemented. These apparent “fake votes” were sometimes called false flags. Some small blockers, who regarded Bitcoin Unlimited itself as bad, viewed these fake flags as further malicious behaviour. Miner signalling about which consensus rules they were enforcing was supposed to be a mechanism to ensure smooth upgrades to the protocol rules. False flagging was considered an approach that made upgrades more dangerous. Actually, false flagging in favour of Bitcoin Unlimited can be considered as an attack on Bitcoin Unlimited, as it could cause a failed activation. Large blockers didn’t seem to appreciate this and reacted with excitement as the hashrate support for Bitcoin Unlimited increased. To them, this was building up considerable momentum. The miner flags were an important political message, whether the votes were fake or not.
On January 30, 2017, a miner running Bitcoin Unlimited produced a block larger than 1 MB. This may have been the first block produced, with sufficient proof of work, over 1 MB. This was probably some kind of error or accident, as there was no apparent coordination behind this. Bitcoin nodes across the network rejected the block as invalid, which was an example, according to smaller blockers, of why one needed user agreement before conducting a hardfork. Large blockers, such as Roger Ver, tried to brush this incident under the carpet, claiming that stale blocks occur all the time, without accepting that this block was not just stale, but invalid.
In March 2017, an event occurred which caused significant damage to the reputation of Bitcoin Unlimited. The number of reachable Bitcoin Unlimited nodes suddenly took a massive nosedive.
ACCORDING TO NODECOUNTER, THINGS WERE FINE AT ABOUT 6 PM GMT, WHEN THERE WERE 776 NODES. THAT RAPIDLY DROPPED, WITH 696 NODES AT 7 PM GMT. IT BOTTOMED OUT AT 11 PM, WITH 182 NODES. AT 9 AM GMT THE FOLLOWING DAY, THINGS WERE MOSTLY BACK TO NORMAL, WITH 626 NODES. I DON’T THINK IT’S VERY ACCURATE TO SAY THAT BU REACTED ABNORMALLY QUICKLY, OR THAT 100% OF NODES CAME BACK.
What happened was a critical DoS bug was introduced into the xThin element of the Bitcoin Unlimited code, which had nothing to do with the blocksize limit. This had been exploited, causing almost all the Bitcoin Unlimited nodes to crash. This issue was highlighted by the smaller blockers, who helped draw attention to the failing to many cryptocurrency media outlets. The node crash also put the project under more scrutiny from the wider larger block community. Many had just thought of it as a generic larger block client, but now they were asking more critical questions, such as: what is this organisation, and why is there a president? Why are they changing aspects of the code not related to the blocksize? What is the AD parameter for? Are there any other critical bugs?
Bitcoin Unlimited never fully recovered from the incident in March 2017. The error itself was not really that bad, however the small blockers successfully capitalised on the bug, which drew attention to other failings in Bitcoin Unlimited. The Bitcoin Unlimited saga was one of the worst periods of the war for large blockers, and one they would probably rather forget. Much to the delight of the small blockers, they had allowed themselves to be driven by ego, anger and frustration to support a poorly-conceived client. Once again, after Bitcoin Unlimited was abandoned, there was almost no contrition from any of the larger blockers. None of them appeared to take responsibility, or consider why pushing for a client with so many potential weaknesses was dangerous and potentially destructive for Bitcoin.
By March 2017, the tension in the community had elevated even further. The focus now shifted to the idea that the larger blockers would move over to Bitcoin Unlimited and then also attack the original, smaller block chain by mining empty blocks and orphaning any blocks with transactions in it. This strategy would therefore kill the smaller block chain. Jihan had even publicly discussed the idea of attacking Bitcoin:
IT MAY NOT BE NECESSARY TO ATTACK IT. BUT TO ATTACK IT IS ALWAYS AN OPTION.
Gavin had also said something similar:
PREVENTING A MINORITY-HASHRATE FORK FROM CONFIRMING ANY TRANSACTIONS IS A GOOD IDEA. NAKOMOTO CONSENSUS != UNANIMITY.
Early Bitcoiner Meni Rosenfeld, who had largely stayed out of the blocksize war up until this point, described the situation as follows:
GAVIN ANDRESEN, PETER RIZUN AND JIHAN WU HAVE ALL FAVORABLY DISCUSSED THE POSSIBILITY THAT A MAJORITY HASHRATE CHAIN WILL ATTACK THE MINORITY (BY WAY OF SELFISH MINING AND EMPTY BLOCK DOS).
THIS IS A DISGRACE AND STANDS AGAINST EVERYTHING BITCOIN REPRESENTS. BITCOIN IS VOLUNTARY MONEY. PEOPLE USE IT BECAUSE THEY CHOOSE TO, NOT BECAUSE THEY ARE COERCED.
THEY ARE BASICALLY SAYING THAT IF SOME OF US WANT TO USE A CURRENCY SPECIFIED BY THE CURRENT BITCOIN CORE PROTOCOL, IT IS OK TO LAUNCH AN ATTACK TO COAX US INTO USING THEIR MONEY INSTEAD. WELL, NO, IT’S NOT OK, IT IS SHAMEFUL AND MORALLY BANKRUPT. EVEN IF THEY SUCCEED, WHAT THEY END UP WITH IS FIAT MONEY AND NOT BITCOIN.
TRUE GENETIC DIVERSITY CAN BE OBTAINED ONLY WITH MULTIPLE PROTOCOLS COEXISTING SIDE BY SIDE, COMPETING AND EVOLVING INTO THE STRONGEST POSSIBLE VERSION OF BITCOIN.
THIS TRANSCENDS THE PARTICULAR DEBATE OVER THE MERITS OF BU VS. CORE.
This was clearly a change in tone from the large blockers. They had previously claimed there would be no split and no smaller block chain, while now they were discussing actively attacking such a chain. In early April, I had a discussion with one of Jihan’s key associates in Hong Kong. He informed me that the large blockers had allocated a budget of US$100 million to attack the smaller block chain. The plan was to spend this money on energy, mining empty blocks on the smaller block chain and orphaning any blocks with transactions. This would essentially “kill the chain”, he proclaimed. I asked why he wanted to kill the smaller block chain, and he explained that the smaller blockers had “stalled Bitcoin for years and that this was what they deserved”. Even to contemplate spending US$100 million just to get revenge on one’s opponents in the war really illustrates the scale of the quagmire we were in at this point in the conflict. What happens once the US$100 million had been spent? I asked. Couldn’t the small blockers revive their chain then? It seemed there was no robust response to this question. After a long pause, he proclaimed they would perhaps attempt to raise more money and attack again.
As we progressed into 2017 and the war entered its 18th month, the anguish from both sides only increased. Jihan and most of the mining pools were still not flagging support for SegWit, and the 95 percent target seemed almost impossible to achieve. Large blockers saw the activation of SegWit as a defeat for their side and blocking SegWit was one crucial lever of control they had. This was the only major bargaining chip the large blockers had left, and they would not let it go. This did indeed cause frustration among the smaller blockers, however remember that they were the patient side, the side that looked decades ahead. To the large blockers, the wait for anything to happen was far more painful. This pain goes a long way to explaining the threats of attacking the smaller block chain.