gContractNet: BAD BLOCK Error

Some of you (those running ContractNet Nodes), may have seen the following error in your terminal windows:

ContractNet is a fork of Ubiq, which is in turn is a fork of Ethereum. This error is consistent with geth (the Ethereum Golang client), the details of the issue are described here – https://github.com/ethereum/go-ethereum/issues/3590.

In short, we have deduced that this error occurs when there are only a few nodes on the network. To validate this, we did a quick node check from the gContractNet CLI (command line interface):

admin.peers

We found that there are just 5 nodes actually running on the network. It seems that for a few weeks, GPU mining has taken place on the MainNet. Prior to this, CPU mining was pretty common, which naturally created a higher distribution of nodes. Ever since the GPU miners came online, it seems that those previous nodes shut down their node clients. As a result, dominant miners have been competing to commit their blocks to the chain. Due to a lack of nodes to determine consensus, these miners have on occasion mined chains, both thinking that their chain was the canonical one. The nodes started getting requests for block verification with different hashes to the same block, which threw the “BAD BLOCK” error.

These nodes in time will eventually figure out which chain is the correct one by selecting the one with the longest length. However, while this selection process is happening, transaction processing could take longer, and transactions committed on what will become the incorrect chain, won’t be processed. Don’t panic…these funds aren’t lost, the address balance will be restored, however, you will just have to try again. “Insufficient funds” and balance inconsistencies could also have occurred in the wallet.

So, if you have had this issue with your node, to be safe, please delete your chaindata folder which will be at the following paths:

  • Windows – C:\Users\[profile]\AppData\Roaming\ContractNet\gContractNet
  • Linux (Ubuntu) – ~/.contractnet/

NB!!!! Make sure not to delete your keystore folder

To prevent this from happening in future, we need more nodes. We will spin up additional nodes (we are already running 2) but we request that the community jumps in to help secure the network by running a node!