Credit: John Lester (@Pathfinder)
Credit: John Lester (@Pathfinder)

Ravencoin — Upgrade Retrospective

Tron Black
Oct 2 · 3 min read

On Oct 1, 2019, Ravencoin switched to the x16rV2 mining algorithm. It went as smoothly as can be expected when losing some proof-of-work hash power. The DGW difficulty adjustment algorithm balanced the difficulty as expected and after about eight hours, the network stabilized at one-minute blocks.

There were two reasons for this algo change.

The first reason is that ASICs were on the network. As I’ve discussed before, there isn’t anything inherently evil about ASICs, but they do cause the validation of blocks to become centralized. Once x16r mining ASICs were definitively shown to be out there, the solution was to modify the algorithm to a new one. Ordinarily, the best way to switch software functionality that affects the consensus rules is to use BIP9 which activates it in stages after some percentage of blocks are mined with the new software. In this extraordinary case, it was necessary to switch on a date certain.

The second reason for the upgrade was to fix two bugs. This reason was not widely known. The bugs did not affect RVN (crypto-currency) but could’ve affected Ravencoin Assets. We’ve been monitoring the network for any exploits of the bugs since we found out about them. Thankfully none the bugs were never exploited.

Thanks to the Raptoreum team (http://raptoreum.com) who notified us of the existence of a critical bug and received a bounty.

Other coins that we know have branched from Ravencoin have been notified of the bugs. In some cases, we’ve provided a fix for them prior to releasing the code fix publicly.

In order to fix these bugs, we provided binaries with the bug fixes (2.3) in a BIP9 vote to mining pools as it would’ve been sufficient to have most of the mining hash power rejecting the bug exploit without requiring upgrading for everyone. A few skeptical pool operators were even shown the code with the bug fixes, but there was insufficient interest in upgrading. Widely publishing the code fix in advance of the fix being active on the network would’ve put the Ravencoin network at greater risk.

Two other issues were fixed in 2.4.

Now that everyone is on version 2.5.0 or better, all known bugs are fixed and the network is safer than it has been.

Full disclosure:

  • Issue #1: Using the incorrect timestamp for NLR (No Long Reorg) so there was an opportunity to bypass the 60 block reorg prevention. Fixed. Never exploited.
  • Issue #2: Issuance and re-issuance in the same block accepted, but later rejected and could stall a pool. DDOS type issue. Fixed. Never exploited.
  • Issue #3: Sub-assets could be created under an asset for which one doesn’t have the private keys. Fixed. Never exploited.
  • Issue #4: More assets could be created by anyone that owns some of an asset. It would be necessary to create the transaction manually as the RPC calls and QT will not create the transaction. Fixed. Never exploited.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade