The Omnipresence and Resurgence of ASICboost in the Setting of Rising SegWit Adoption

As Bitcoin (BTC) turns 10 years old, the network and the details surrounding the zero-sum game of BTC Proof of Work (PoW) mining continue to become more and more complex. Layer one of the network has become more efficient through transaction batching and Segregated Witness (SegWit) usage, while layer two infrastructure is also being built out through the Lightning Network and Blockstream’s Liquid sidechain.

SegWit adoption currently accounts for ~50% of all transactions on the network. SegWit enables individual BTC transactions to occupy less block space than a pre-SegWit transaction, allowing SegWit users to pay less in accumulated fees to achieve the same number of transactions. SegWit also allows for an effective block size limit above 2MB. Despite significant opposition by some members of the community before SegWit was activated, the upgrade represents a growing percentage of the network and has conclusively helped decrease network fees.

Source: p2sh.info

Last year, the bitter BTC scaling debate surrounding SegWit activation resulted in the split of two factions, the big blockers who hard forked and created Bitcoin Cash, and the existing BTC network which adopted SegWit via user activated soft fork. Leading the big blockers were Craig Wright of nChain, Roger Ver of BTC.com, and Jihan Wu of Bitmain, which owns the mining pools BTC.com and Antpool.

In April 2017, Greg Maxwell expressed his concern regarding the use of a PoW exploit known as ASICboost, which was invented by Timo Hanke in collaboration with Sergio Lerner in late 2013. ASICboost increases mining efficiency by ~20% by requiring less mining energy to find blocks. The competitive advantage occurs through re-using work from previous blocks instead of starting over completely for each block. This is also known as the birthday paradox. Using ASICboost can make the difference between profitable and unprofitable mining hardware, especially in a bear market.

There are several different versions of ASICboost. Covert ASICboost, which is very hard to detect, can be done by changing the content of the transactions or by transaction reordering. The most efficient method of covert ASICboost is transaction reordering, however, this method is largely not compatible with SegWit, and would force miners to only mine blocks not containing SegWit transactions.

Covert ASICboost also has negative incentives on the network by encouraging small or empty blocks because it is easier to reorder transactions when there are fewer of them in the block. Empty blocks or blocks with very few transactions, still receive a block reward. Additionally, small blocks in and of themselves do not confirm suspicious or malicious mining activity.

Overt “version-rolling” ASICboost, which is easy to detect and fully transparent based on it’s mechanism, is SegWit compatible and does not have negative incentives by encouraging small or empty blocks.

In May 2017, Hanke sold the patent rights for both covert and overt ASICboost to Little Dragon Technology LLC, the parent company of Halong Mining. Getech Law then published an open letter suggesting that there were “willful patent infringements committed by some bitcoin chip and miner manufacturers”. The patent is still pending, but holders of the patent could stop other ASIC manufacturers from using ASICboost without their permission.

Bitmain had previously submitted a Chinese patent application in 2015, which gives no credit to the creators, for “optimizing method, device and circuit for hash computing chip of bitcoin proof of work”. A document from the State Intellectual Property Office of the People’s Republic of China, submitted December 5th, 2017, states that “the claims of the present application are not inventive, and the description does not describe any other substantive content that can be patented”. The patent application appears to have been withdrawn after a two month re-submission period was not met.

On March 1st, 2018, the Blockchain Defensive Patent License (BPDL) was announced in order to prevent the suppression of mining competition, which could lead to increased centralization of the network. The BPDL also prevents patent or related proceedings against any other BDPL user. Such licenses are common in the world of open source software development. As of November 4th, 2018, Bitmain has not joined the BPDL.

On March 24th, SlushPool announced the first block mined with overt ASICboost, which was mined on a Halong Mining ASIC. According to asicboost.dance, Antpool’s first overt ASICboost block was on May 9th. Antpool has mined 30 blocks using overt ASICboost since then, with the most recent on November 1st.

On October 18th, Braiins OS, a fully open source, linux-based BTC mining system, verified ASICboost capability on Antminer S9s accounting for energy savings of 13%. Bitmain responded on October 22nd by rolling out a software upgrade enabling overt ASICboost on the Antminer S9, which had previously been restricted. After Bitmain’s software upgrade, overt ASICboost usage increased from ~5% to ~12% in a matter of days.

Source: asicboost.dance

Below is a study of the mining pools and block sizes from SegWit activation on August 24th, 2017 at block height 481824 to October 30th, 2018 at block height 548050. Data was obtained through the btc.com API. The goal is to help understand how overt ASICboost, covert ASICboost, and/or other unknown competitive mining advantages may have affected the network.

There have been ~66,227 blocks confirmed since SegWit activation with 44 different miners or pools participating with unknown miners or pools representing 1,603 blocks, 2.4% of the total. Pools contain independent actors who send hash rate to the pool. Mining pools do not control the individual hash rate, as these miners may leave at any time, but the mining pools do control what is mined and how. This hierarchy is very similar to a loose, representative democracy.

The average block size since SegWit activation among all miners is 887kB. The largest block was confirmed by the ViaBTC pool on October 12th, 2018 with a block size of 2,324.736kB. The smallest block was confirmed by an unknown miner on December 30th, 2017 with a block size of 0.2kB.

The top six pools, each representing ~8% or more of total blocks confirmed in this time period, were; BTC.com at 19.8%, Antpool at 15.6%, BTC.TOP at 11.1%, ViaBTC at 11.0%, SlushPool at 10.1%, and F2Pool at 7.9%. In total, these pools account for 75% of all blocks mined during this time period. Antpool has relayed the smallest average block size at ~0.842MB, while BTC.TOP has relayed the largest average block size at ~0.931MB.

Looking at the blocks relayed by these six pools further, there is a large reduction of blocks below 1MB between November and April, when unconfirmed transactions were high. However, all pools still mined some blocks during this time that were were essentially empty.

There is also a difference in each pool between the full and unfull blocks within that time period. As SegWit was accepted by each pool at a different time, transactions above 1MB were clearly not mined until SegWit transactions were relayed. Among these six pools, F2Pool began relaying SegWit transactions last, in mid-November.

Each pool has had an increasing 60-day moving average (red line) of block size, except for Antpool. This is largely because of Antpool’s move after October 26th to censor SegWit transactions, which has dropped the average considerably, now below 0.5MB per day.

Looking at Antpool’s smaller blocks further, there appears to be a concentration of these blocks in September 2017. There is also a concentration of even smaller blocks in September and October 2018, just before the end of Q3 and just before Braiins OS revealed that overt ASICboost was possible with the Antminer S9s.

Furthermore, accounting for blocks confirmed <0.03MB per month, the Antpool and BTC.com pools have consistently led the pack, which may also be a product of their mining dominance amongst their peers in general. The number of empty or relatively empty blocks has certainly decreased over the years, and all but disappeared as the block size limit was reached from October through February.

As the mempool filled with spam transactions and elevated network activity from October through February, transaction fees skyrocketed. The number of blocks mined <0.03MB also decreased substantially in this time period. When the mempool was empty and fees declined substantially, after February, there was a resurgence in the number of blocks mined <0.03MB.

Additionally, transactions per day on the network have been steadily increasing since April. Average block times have also been increasing since late July. Overall, an increase in smaller or empty blocks is less likely based on rising network traffic and slower block times, as there is more time to fill blocks with more transactions.

Source: bitinfocharts.com

Overall, the data clearly shows that Antpool, owned by Bitmain and Jihan Wu, has historically relayed the smallest average block size among all top mining pools since SegWit activation. Additionally, Antpool has steeply increased these relays of smaller blocks since July of this year, relative to the other top pools. None of this suggests malicious activity on it’s own but Wu tweeted in 2016 that, “we will continue mining empty blocks. This is the freedom given by the Bitcoin protocol,” despite siding with the big blockers in the scaling debate.

Wu’s opposition to the SegWit soft fork was likely directly related to the inability of Bitmain’s mining hardware to use covert ASICboost after the upgrade. Antpool has recently begun censoring SegWit transactions, which suggests the possibility for covert ASICboost usage once again. Wu also tweeted in 2017 that, “SegWit transactions [are] unfairly cheap”, so this decision may be related to the economics of the fee structure between SegWit transactions and non-SegWit transactions. Miners who disagree with Antpool’s rejection of SegWit transactions should leave the pool.

Although covert ASICboost usage is less efficient than overt ASICboost, using the covert method blurs the possibility of any patent infringements. Antpool clearly had miners in the pool using overt ASICboost since May 2018, which may have been Bitmain’s own Antminers at that time. Bitmain likely felt compelled to release a software upgrade on October 22nd in order for all Antminers on the market to remain competitive. This is potentially a direct violation of Little Dragon Technology LLC ASICboost patent, once granted, because Bitmain has not joined the BPDL.

Overt ASICboost is here to stay and rising in popularity, simply because any miner without it is less competitive. As the ASIC arms race continues with more and more competitors entering the market, mining will only become increasingly more competitive as well. As SegWit transactions will likely continue to increase, the potential for covert ASICboost usage falls dramatically, so long as miners or pools do not censor these SegWit transactions.