We are all nodes: An explanation of how Avalanche will work on BCHA, plus a thought experiment

Lesezeit: 5 protokoll

Let’s talk about nodes. For those who don’t know, nodes are what we call the computers that participate in all the various Bitcoin networks. They are distributed throughout the world and connected to one another through the internet. Their job is to validate transactions and blocks and propagate that information to other nodes. This enables the network to relay, or route, transactions all over the world.

But in order for those transactions to get confirmed in a block, that work can only be done by special mining nodes. These miners help secure the network by supplying hashpower and bundling transactions from the mempool into blocks. This process of putting transactions into a block is known as a confirmation. In exchange for providing this work, miners receive a coinbase reward, which currently stands at 6.25 coins per block.

This exact same process happens on all the various flavors of Bitcoin such as BTC, BCH, BSV, and BCHA. Miners on all four of these chains use the same sha-256 algorithm so they can easily switch from mining one chain to another using the same equipment. This is fine for BTC since it’s currently valued at $50,000 a coin and commands the vast majority of available hash power. Therefore it would take an enormous amount of mining equipment to 51% attack the BTC chain. But what if you’re one of those other sha-256 chains valued at a small fraction of BTC?

The reality is that anyone with a reasonable amount of mining power can easily attack those networks causing them to become unstable or risky to use. Why are 51% attacks so bad? Imagine this, a malicious miner sends a large amount of coins to an exchange. After the necessary number of transactions, the miner trades those coins, let’s say BSV, for other coins on a different network, such as ETH, which he then withdraws to his personal wallet. Once he has the ETH in his possession, he can then proceed to use his mining power to roll back the BSV chain so it’s as if his original transaction to the exchange never happened. Now he has both his original BSV and the ETH he just withdrew and the exchange has been defrauded.

In the past, there was no way for any sha-256 network to protect itself against this type of attack. So long as someone has the money to invest in enough mining hardware and doesn’t care about the ramifications of attacking a network, there’s nothing that can be done to prevent that person from orphaning blocks or rolling back the chain.

It’s even theoretically possible for someone to 51% attack BTC, though that is unlikely due to the sheer cost of such an attack. With smaller proof of work chains, however, it’s not only theoretically possible but we’ve actually seen it happen time and time again.

But what if it didn’t have to be this way? What if it wasn’t only miners that helped secure the chain?

Currently, miners have to provide all the security for a Bitcoin network on top of their other job of producing new blocks and generating new coins. But what if non-mining nodes also had the ability to help prevent 51% attacks and miners were only needed to perform the task of confirming transactions? That would mean that no matter what the price of a coin, so long as there are more honest nodes than malicious nodes, and at least one miner willing to mine the chain, the network would function as expected.

This is what the Avalanche protocol will do for BCHA once implemented. For a minority chain like BCHA, it can protect against an attacker even if the attacker has significantly greater hash power than all the honest miners combined.

So how does it work?

When a block is found, the nodes running Avalanche have the ability to communicate with one another in order to decide what was the first block they saw. Last year when someone tried to attack the BCHA network by mining empty blocks and filling the network with spam, those were still considered valid blocks and helped secure the chain. Users might have had to wait for an honest miner to occasionally mine a block filled with transactions to clear the mempool, but that was more a nuisance than anything else.

It is only when an attacker starts orphaning otherwise valid blocks that Avalanche would step in. So if an attacker suddenly appears and starts to try orphaning blocks, the Avalanche nodes can survey one another to determine which block they saw first. As long as most of the nodes are honest, this will result in the network agreeing on what was the first block seen and the blocks produced by the attacker will be ignored. It’s only when the majority of nodes are dishonest that an attacker would be able to convince all the other nodes that the attacker’s block is the right one and the valid block is orphaned.

Of course it would be possible for an attacker to spin up a bunch of nodes to trick the rest of the network into choosing the wrong block (or transaction). This is why Avalanche requires a sybil resistance mechanism, a way to prevent someone from cheaply spinning up nodes to fool the network. One possible way to do this would be through staking. By forcing nodes to stake a certain number of coins, it would make it much more difficult (expensive) for an attacker to attack the chain. He would have to hold a large number of BCHA, which would also disincentivize him from doing anything that might lower the value of those coins.

By combining Avalanche with PoW, the BCHA network will have the ability to defend itself against 51% attacks, something no other PoW chain can claim. Not only that but because so little hash is required to secure the network, in the event of a bear market with a lowered price, the network can still manage to run securely with less mining power and less electricity expended.

The best part is that everything I just described can be used for individual transactions as well as the blocks themselves. This is the difference between Avalanche post-consensus and Avalanche pre-consensus. Once Avalanche pre-consensus is implemented, the BCHA network will not only be able to fend off 51% attacks but will be immune to double-spend attacks, making 0-confirmation payments safe to accept.

I don’t know about you, but I’m excited for the future of eCash. By using a hybrid model that captures the benefits of both Proof-of-Work and Proof-of-Stake, the BCHA network can have the best of both worlds while also mitigating the negative aspects of relying solely on only one or the other.

Now that I’ve done my best to explain Avalanche and how it will work on BCHA, let me take it one level deeper.

What if we were to apply this to real life? What if we see ourselves all as individual nodes connected to the human network. Just like on Bitcoin, we can be honest nodes, or dishonest nodes. We can choose to tell the truth, or lie to our peers for our own benefit and to the detriment of others. I believe this is why it’s important that enough honest actors participate in the network to ensure that the dishonest people don’t take over. Unfortunately, due to the rise of online social networks, we as humans are vulnerable to sybil attacks just like the BCHA network. I look forward to the day when some smart engineers can figure out a way to prevent malicious actors from creating bots or fake online accounts that can have undue influence on the rest of humanity.

Because the reality is that each and every one of us has literal skin in the game. It’s why I write. Think of me as just another node trying to find as many peers as possible hoping to convince others to see the state of the network as I do.

As always thanks for reading.

TEILEN AUF: