TL;DR: Crypto Dev Digest (CDD) documents cryptocurrency development, highlighting the projects and persons working under the hood. We talk with developers to better understand the recent gaming of the Bitcoin Cash DAA (difficulty adjustment algorithm). Ethereum’s Plasma is given a postmortem. EOS launches a developer portal, and a ton more in this installment.
Bitcoin Cash DAA Gamed Again
At the same time Bitcoin Cash (BCH) enthusiasts are openly debating funding schemes for infrastructure development, BCH experienced a five-hour gap between blocks. To the camp pressing for the community to act on infrastructure funding, to come up with some doable funding mechanism, it illustrates their reality: everyone freaks out when its too, too late, asking something be done.
The DAA issue for Bitcoin Cash is not new. Peer-to-peer electronic cash opponents use its gaming to exploit the issue in hopes of sullying the project or casting upon it some kind of fatal flaw. In reality, the BCH community has debated the DAA for years, and continues. At various intervals, long block times have happened … as have very fast blocks. Mining pools simply switch to BTC, which can cause the BCH difficulty to fall, and rush to then mine a bunch at once. The DAA shoots back up, and to BTC miners once again return. As developer Tyler Smith explained, “We’re stuck with a difficulty tuned for hash rate X but the actual rate is a lot less than X. Current DAAs don’t account for future large changes to hash rate.”
Interview With Tyler Smith of OpenBazaar on the BCH DAA
CoinSpice: In case folks are unfamiliar, what’s your background?
Tyler Smith: I’m a full-stack engineer working on the OpenBazaar project for the company OB1. I spend most of my free time building libraries and tools for developers to work with Bitcoin, trying to help out with projects like BCHD and the Avalanche project, and doing R&D into scalability solutions.
Recently, BCH went without blocks for more than 5 hours. What happened?
The time it takes for a block to be found is, on average, proportional to a value we call the “difficulty.” The difficulty changes from block to block based on the times it took to find previous blocks and its goal is to raise and lower the difficulty such that blocks are found on average every 10 minutes. However, the algorithm that changes this difficulty, the DAA, has no idea what the future hash rate will be like, so it can only make decisions based on past and current hash rate. This is especially problematic for the case that we have a large drop in hash rate because the difficulty will be tuned for the hash rate we had before the drop-off. Now the difficulty is much higher than it should be for the amount of hash rate currently working on finding a block.
Because Bitcoin Cash is a minority chain for our proof of work algorithm (SHA256d), our DAA needs to adapt quickly as hash rate comes and goes between chains. Unfortunately, this allows miners to “game” the DAA in the following manner:
1) Miner mines non-BCH chains which slows block production on our network. Only dedicated BCH miners are still mining and blocks come out very slow.
2) Miner waits for the BCH difficulty to fall in response to this loss of hash rate.
3) Now that the difficulty is low, they bring on all their hash rate to BCH and mine blocks as fast as they can. These blocks will come out faster than 10 minutes on average because their difficulty was tuned for the lower hash rate.
4) This sudden torrent of new blocks tells the DAA a lot of new hash rate has come on board so it ratchets the difficulty up in response.
5) Now the difficulty is very high again and the miner switches back to a non-BCH chain, and the cycle starts again.
If you look at the blocks preceding the 5 hour gap, they were coming out very fast. If you look at their “nBits” or “Difficulty” value on explorers that show it, you can see it getting lower and lower (more and more difficult) leading up to the gap after block 620025. After the gap was ended with block 620026, you can see the difficulty respond by getting easier again in block 620027.
You can see this hash rate change in this graph generated by Tom Harding (above).
Is this what pools like BTC.TOP are doing?
It appears that way based on the blocks being produced.
Is it a big deal?
It is certainly sub-optimal because the gaps are bad for users that need confirmations, and the post-gap spikes require node operators to have more resources over-provisioned which is inefficient and harms scalability.
Is there a way to end DAA gaming?
It can almost certainly be significantly reduced with a new DAA, but there is research to do there to find one that both addresses these issues and doesn’t cause any new ones. This is the ideal fix because it addresses the root of the problem.
Pre-consensus solutions can alleviate the effects of these situations by actively working to reduce network entropy between blocks and provide stronger assurances of a transaction’s irreversibility.
Interview With Independent Developer Mark Lundeberg on the BCH DAA
CoinSpice: Was what happened recently a problem? Is it as meaningful as haters insist?
Somewhat. BCH tries to make unconfirmed transactions relatively “reliable” and our security of confirmed transactions is also unfortunately not huge, so getting the first confirmation is not really a big deal.
But there are some things it impacts: the 25 tx limit problem only ‘clears out’ when a block mines them; and some protocols (like CashFusion) will not accept unconfirmed coins, so it means there are some times of day when certain things slow down.
Also since 5 hours should have 30 blocks, it means if you’re depositing on an exchange with (say) a 10-conf minimum then you’re waiting ~3-4x longer than you expected.
What can be done to mitigate?
The primary reason for this is that the same mining equipment can be used to mine other chains (and there are many cryptocurrencies that face this same issue because they are GPU / CPU mineable). The most effective technical solution is to choose an ASIC-hashable algorithm unique to BCH, but it is probably not acceptable politically to change from SHA256. The second-best mitigation is to ask more miners to mine steadily on BCH. This is not free for them, because they miss out on profits, especially at first.
Is it BCH’s DA that’s the problem?
BCH’s DA does contribute to the problem since it decides the highs and lows of difficulty, and it contains oscillatory behavior and it’s more volatile than necessary. If the difficulty were more stable then perhaps miners would be less reluctant to steady-mine BCH since they wouldn’t be missing out on profits as much. But fundamentally, any traditional DA will have a similar issue.
There has been some discussion of using non-traditional DA to avoid this, but they all introduce new alien concerns and should be regarded as experimental.
Is this a new problem?
It’s not new. From what I understand we’ve been seeing this for 2 years. There were some times where it was not as bad because more people were steady mining. For example, in advance of the hash war [in late 2018], CoinGeek was mining steadily. Once that whole thing was over, BCH started oscillating.
So BCH has a unique DA?
Yes, but many coins have a unique DA. Many of them have problems too. Actually, BTC’s difficulty algorithm is one of the worst possible ones — any minority chain using that would probably die very quickly. The only reason it isn’t a problem for them is that they consume the dominant hash rate.
Postmortem on Plasma
Very nice postmortem on Plasma.
— Emin Gün Sirer (@el33th4xor) January 28, 2020
Development Script Meeting #2
— Bitcoin Cash (@BitcoinCash) January 26, 2020
BUCash Bitcoin Unlimited Client
51.5% of #BitcoinCash nodes are running the BUCash Bitcoin Unlimited client.
— BitcoinUnlimited (@BitcoinUnlimit) January 27, 2020
SCRIPT BREAKTHROUGH 🎉
I‘ve managed to come up with a way to emulate OP_MUL, allowing a 60-bit product in Script.
Sample transaction computes 0x3fff_ffff * 0x3fff_ffff = 0xfffffff80000001.
— Tobias Ruck (@TobiasRuck) January 27, 2020
CacheOut – a new speculative execution attack that is capable of leaking data from Intel CPUs across many security boundaries. https://t.co/cg2iDvRY72
— Josh Ellithorpe (@zquestz) January 28, 2020
I also added a donation address. 😉
— pokkst (@pokkst) January 29, 2020
1/ Tendermint Inc is currently undergoing some internal restructuring. There have been rumors in the media about Jae Kwon, our CEO, stepping down from his position. Here are the facts:
• We are beginning to exercise decentralization of control over the organization and…
— Tendermint (@tendermint_team) January 30, 2020
Advanced BCH Monitoring
— 🦆 sploit#100 (@acidsploit) January 30, 2020
Y Combinator’s Winter Batch: 240 Startups
Y Combinator's winter batch includes roughly 240 startups, its largest ever: https://t.co/2MV0XuWeQz
— Kate Clark (@KateClarkTweets) January 30, 2020
Here is a demo video of Anytype alpha. It’s the first glimpse of the future where we own our data, enjoy privacy and do not depend on the Internet connection. Please, wear rose-colored glasses – the design is not polished ☺️ https://t.co/mvYvxeulUz
— Anytype (@AnytypeLabs) January 30, 2020
FIO Road to Mainnet
Road to Mainnet: The Symbol
FIO Addresses will now use a @ symbol as a delimiter (username@domain) instead of a : for mainnet launch!
— FIO (@joinFIO) January 30, 2020
Doing EC math for the past 4+ hours has broken my brain… but at least Bitcoin Verde can now handle the "Bitcoin Sign Message" protocol in the development branch.
— Joshua Green (@joshmgreen) January 31, 2020
Top Programming Languages
— ShapeShift (@ShapeShift_io) January 29, 2020
CashScript v0.3.2 Released
#CashScript v0.3.2 has been released! What's new?
– 🌐 Browser support
– 🧱 OutputNullData (enforce OP_RETURN outputs)
– 🐚 CLI improvements
– 👛 Optional minimum change amount
– 🐛 Bug fixeshttps://t.co/rQ9HSdffII pic.twitter.com/kbmXp5De3L
— Rosco Kalis (@RoscoKalis) January 31, 2020
Geth Networking Improvements
1/ Check out some Geth networking improvements! Contributors are working on EIP-2464: eth/65: transaction announcements and retrievals
This could help avoid up to ~160KB/s in unnecessary bandwidth use 😍https://t.co/m6khlLQyfF
↓ A thread on benefits ↓
— Whiteblock (@whiteblock) January 31, 2020
CashFusion Icon for Crescent Cash
If you have your wallet loaded up in Electron Cash to do Fusions, then CashFusion transactions in Crescent Cash will have an icon displayed next to it pic.twitter.com/dQhPdZgNxQ
— pokkst (@pokkst) February 1, 2020
Crescent Cash v1.11.3
Crescent Cash v1.11.3 is now available!
This update fixes an issue with loading cached token data with certain token names/tickers.
This update also brings SLP support to desktop!
— Crescent Cash (@crescentcash) February 1, 2020
— Pro Bitcoin aka BCH✌️ (@Egon_01) February 1, 2020
CONTINUE THE SPICE and check out our piping hot VIDEOS. Our podcast, The CoinSpice Podcast, has amazing guests. Follow CoinSpice on Twitter. Join our Telegram feed to make sure you never miss a post. Drop some BCH at the merch shop — we’ve got some spicy shirts for men and women. Don’t forget to help spread the word about CoinSpice on social media.
DYOR: CoinSpice is your home for just spicy crypto things. We’re not affiliated with any cryptocurrency project or token. Each published piece is intended for information purposes only, not investment advice and not in the hope of impacting speculative markets. There are plenty of trading sites and coin-specific advocacy journals out there, we’re neither. CoinSpice strives for rigorous accuracy in our reporting. Information presented here is contingent usually on a host of factors, and the ecosystem moves fast — prices change, projects change, and at warp speed. Do your own research.
DISCLOSURE: The author holds cryptocurrency as part of his financial portfolio, including BCH.