Ghost (Greedy Heaviest Observer SubTree) was initially proposed for the Bitcoin blockchain and solves for some of the security and efficiency problems currently seen with that and other Proof-Of-Work blockchains.
Before we explore some of the high-level details of this protocol and also how this lead to the creation of the Casper protocols (FFG & CBC) and development of the CSPR blockchain, let us first cover some basics. The primary consensus mechanisms used to confirm transactions without the need for a third party:
* POW: ‘Proof-Of-Work’ – nodes complete complex mathematical puzzles as a way of verifying transactions on the network, thus earning rewards. This work is asymmetrical, i.e. difficult for the miner to solve, however simple for the network to verify. All the miners compete through brute force to solve the puzzle using a huge number of attempts. Once verified, the transactions are placed into a block and the block is appended to the public blockchain. The more miners, the more difficult the network makes it to solve the puzzle thus earning the reward, the computational power required increases and thus energy usage for mining is extremely high. In order to take over the network, a group of miners will need to control 51% of the computing power (known as a 51% attack)
* POS: ‘Proof-Of-Stake’ – the creator of a new block is chosen from a pool of users which have staked crypto currency. There is no puzzle to complete. Miners take a fee from each transaction. As there is no competition there is no major energy requirement. The penalty for harming the network is the possibility of losing the money which you have already staked. To takeover a POS network, you will need to physically own 51% of the supply of the crypto currency of the chain, which will be an incredibly expensive strategy to undertake and is less likely to occur than controlling 51% of the computing power in a POW blockchain (as this could be achieved with large enough mining pools).
Now to try and understand GHOST and the need for it. Transactions in blockchains can be published from anywhere. In Proof-Of-Work (POW) blockchains (e.g. Bitcoin and Ether), due to the random nature of the hashings, two miners can be working on the same transaction producing two blocks. Now only 1 of these is added to the main chain. This means the work done by the miner on verifying the second block is lost (orphaned) and the miner does not get rewarded – these blocks are called ‘uncle’ blocks in Ethereum.
This is where GHOST comes in, which was initially published as a protocol modification – GHOST is a chain selection rule (initially proposed for Bitcoin) that made use of these previously orphaned blocks and incorporates them into the main chain, partially rewarding the miner also. Including these orphaned blocks into the main chain increases the difficulty of an attack on the network now it is no longer the winning miners which own the computing power. Actors that did not win, are also now part of total computing power for the block validation. This means more nodes retain power and discourages the need for centralized mining pools on larger chains.
For Bitcoin, the probability of finding a block at the same time is quite low due to the block time…however for Ether it is shorter and so this is where GHOST was supposed to add value. Instead of GHOST however, the decision was taken to adopt Casper.
Disclaimer: This article is written for the purposes of research and does not constitute financial advice or a recommendation to buy.