Blocks & Consensus Mechanism
As the list of transactions grows, they are packaged into discreet so-called blocks of transactions, which are then confirmed to be legitimate by special network participants called "validators" or "miners". After being validated, these transactions are added to the tx list on public ledger and this is how you can see balance changes within the network. Most blockchain systems employ methods of transaction validation called either proof of work (PoW) or proof of stake (PoS). Different methods of validation exist (such as proof of authority), but you will see PoW and PoS most commonly.
In proof of work, special participants in the network called miners use computing power to solve a cryptographic puzzle which, if done before any other miner, gives them the right to produce the next block which will include all current pending transactions. Miners are rewarded for this work in the blockchain's native currency. So each time a miner produces a block they get some crypto as payment.
But what is a miner's computer doing? The miner's computers are looking for a special number, that when added to the next proposed block's list of transactions, will cause a SHA256 hash of the block to have a certain number of leading zeroes (0x003e5...) which satisfies the network's current mining difficulty condition to keep the block time consistent. While it may be trivial for a computer to guess which number added to a potential block will lead to a single leading zero (0x0e55...), finding a number which leads to a hash with many leading zeroes is exponentially more difficult and it takes tons of computing power all over the world to solve these cryptographic puzzles. While this is important work that keeps a blockchain secure it is inherently wasteful since the product of the labor is only proof that a someone has done the work to solve the puzzle and nothing else, and it takes an enormous amount of electricity for all PoW miners to validate blocks of transactions in this way.
In proof of stake, instead of employing expensive, power-hungry, and dedicated computing machines to secure the network, validators secure the network using typical computers that meet minimum hardware requirements for running the validation software and by staking some amount of the native cryptocurrency.The key element to proof of stake is the validator's stake: 32 ETH in the case of Ethereum. We refer to PoS 'miners' as validators. These validators are staking their coins on their promise that they will uphold the network and not behave maliciously, lest they have they stake burned. A user who wishes to validate the network and receive rewards for doing so will have to deposit their stake into a staking contract, which will either accrue rewards when they accurately and honestly secure the network, or be burned if they act dishonestly.Proof of stake has many benefits over proof of work such as:
- Much less energy usage (the Ethereum network dropped its energy usage by 99.95% when it switched from PoW to PoS).
- Reduced hardware requirements (some user's run full nodes on Raspberry pi 4 computers).
- Reduced risk of centralization.
- Lower token inflation due to less tokens being created to reward validators.
- Network attacks become much more expensive to enact.