In our previous article, we looked at how transactions are processed on the Bitcoin network, in this piece, we are going to consider what happens when you send Eth from your wallet to, say; Mr.B.
Ethereum uses what is called the Proof-of-Stake (PoS) consensus mechanism, so how will Mr.B receive the Eth you sent to their wallet?
Ethereum's Proof-of-Stake (PoS) Transaction Process:
There are a number of processes and stages involved before a transaction sent from one wallet gets to another wallet, let's start with the first which is creation of the transaction.
Transaction Creation and Broadcast:
When you create a transaction in your Ethereum wallet, specifying the recipient's address, in this case, Mr.B’s address, the amount of Ether to be sent, and the gas fee.
Your wallet will digitally sign the transaction with your private key and the transaction is then broadcast to the Ethereum network.
Mempool Inclusion:
Nodes on the network will receive your transaction and validate it. The processes of validating this transaction are similar to those in Bitcoin, So the following are checked:
💥Digital signature verification.
💥Sufficient balance check.
💥Double-spend prevention.
💥Gas fee check.
Remember, this validation is for security purposes, it is like a bouncer checking If your access card is legit before allowing you into an event hall. If the transaction is valid, it's added to the mempool of each node.
Validator Selection:
So who or what does this validation? Simply, the nodes do this, but a node is only qualified to validate if that node has staked 32ETH. This is a fundamental design in the Ethereum Proof of stake consensus mechanism. These nodes are responsible for proposing and validating blocks
This is where the Ethereum blockchain differs significantly from the Bitcoin blockchain.As we saw in my article on the bitcoin network, miners or nodes do the validation and they require a lot of computational power or hash rate to find the hash of the block they intend to include to the chain and the first node to find this hash, wins the associated reward for this task.
Let's come back to Ethereum, The network randomly selects a validator to propose the next block.This selection is influenced by the amount of Ether a validator has staked as I mentioned earlier; the more they stake, the higher their chance of being selected.
Block Proposal:
The selected validator will gather pending or unconfirmed transactions from the mempool, including your transaction that you sent to Mr.A, and form a new block.
The validator creates a block that includes the transactions, a timestamp, and other relevant data and then the validator will sign the proposed block with their private key.
Attestation:
There are other validators, called "attestors," they will receive the proposed block from the selected validator and validate it, checking the following in the process:
💥Transaction validity.
💥Block structure and validity.
💥Previous block hash.
💥If the block is valid, they "attest" to its validity by signing a message indicating their approval.
Block Finalization:
Once a sufficient number of attestations have been received, the block is considered finalized.
Finalization is an important security feature of Ethereum's PoS, making it very difficult to reverse transactions.
Finalization happens by a process that creates what is known as checkpoints, and once two checkpoints are created, all blocks between those checkpoints are considered finalized.
Block Addition and Transaction Confirmation:
The finalized block is then added to the Ethereum blockchain and your transaction is now included in the blockchain and considered confirmed and the recipient, Mr.B will see the received Ether in their wallet.
Rewards and Penalties:
Validators who propose and attest to valid blocks receive rewards in the form of Ether. Remember, this reward is not because they solved any puzzle as in Bitcoin, but because they proposed and attested to the validity of transactions.
Those validators who engage in shady behavior (like; proposing invalid blocks or attesting to conflicting blocks) are penalized by having their staked Ether "slashed." This is why it is difficult to attempt a 51% attack on the Ethereum blockchain. Now, you might be asking, what is this 51% attack😂, well, expect my next article to explain it further.
The Key Differences from PoW:
Validators, Not Miners: Validators stake Ether, rather than using hashing power.
Random Selection: Validators are randomly selected to propose blocks unlike in bitcoin where miners race to solve the block puzzle
Attestation and Finalization: Blocks are validated by attestors and finalized for increased security.
Energy Efficiency: PoS is significantly more energy-efficient than PoW.
I will be in the comments if you have any questions.