What is "consensus"? I’m really struggling to get my head around a particular piece of lingo in the bitcoin/blockchain space, and would really appreciate if someone was able to give a bit of clarity. I have been doing a lot of reading trying to figure this out, but the more I read, the more confusing it seems to become.

Basically, it concerns consensus and governance.

With blockchain tech, as far as I understand, we have the following:


‘consensus’ needed amongst miners as to what the ‘next block of transactions’ is that is added to the chain (and the longest chain, becomes the valid chain in the network).
‘consensus’ needed about which version of the protocol is used (disagreement leading to a hard fork)


My main question about the above, are they both referred to as ‘consensus’ or is there terminology which separates the two? (Whenever I open a new article about governance and consensus, I have to read half of it to figure out as to which type of ‘consensus’ the writer is referring to.

Would governance therefore be the developers who have permission to merge changes into the main bitcoin code base?
For a given network, consensus means achieving a consistent view of the global state between all participants. For Bitcoin, this means that all nodes/wallets should be considering the same utxo set. For Ethereum, it involves all participants having the same state trie. Minor other variations exist for other networks.

Mining and protocol versions are simply means to achieve this consensus - miners are motivated to only select valid transactions (transactions that spend unspent utxos, and meet other validity requirements) as their block will be dropped by other participants in the network if they produce an invalid block.

Protocol versions are a little more forgiving. On one hand, you have the literal Bitcoin Wire protocol which nodes use to exchange block, transaction, and peer data. Changes to this are usually backwards compatible, so you can safely run a slightly older version of bitcoind on the mainnet without facing any issues.

Protocol could also refer to the concept of Bitcoin itself, and encompass things such as what is a valid transaction, whether segwit is enabled or not, etc. These can be backwards incompatible changes which require a hardfork, and thus require all users to update their software, or backwards compatible, which allows certain older versions to continue working.

Thus, in short, I would say that consensus is achieving a consistent world view, and mining and protocol versions are implementation details that help us all agree on that view.

Governance comes down more to social behaviour than literal control of the project - if the Bitcoin Core developers went rogue tomorrow and added code that allocated 50% of all block rewards to them, it would likely result in a quick revolt, and others in the community would fork Bitcoin from a point before that change. Thus, even though a small subset of people currently control what code goes into Bitcoin, they are not an absolute authority, and the community may choose to follow a different idea of Bitcoin.