Chapter 2: How Blockchain Technology Works
1. Blockchain mechanism
Add transactions:
The process begins when a person or entity sends a transaction (such as a transfer of cryptocurrency). This transaction is created and sent to the network.
Encryption and Verification:
The transaction is converted into encrypted data using cryptographic techniques (such as SHA-256).
Nodes in the network verify the validity of the transaction using a consensus mechanism.
Create blocks:
After verification, the transaction is included in a new block containing:
Transaction data.
Timestamp.
The hash of the previous block.
Add block to chain:
Once a block is complete, it is linked to the main chain using a hash, making it immutable.
2. Consensus Mechanisms
Proof of Work:
Used in Bitcoin.
It requires miners to solve complex mathematical equations to confirm transactions and add blocks.
It consumes a lot of energy.
Proof of Stake:
Used in networks like Ethereum 2.0.
It relies on the stake of participants (the amount of coins they own) to determine who adds the block.
More energy efficient.
Other mechanisms:
Proof of Authority.
Proof of Elapsed Time.
3. Network Security
Encryption: Strong encryption techniques are used to protect data.
Decentralization: Any attempt to modify a block requires the approval of a majority of nodes.
Timestamp: Ensures that all blocks are properly documented.
4. What happens when you try to change a block?
If someone tries to modify a previous block, the hash chain will be broken, and the nodes will reject the attempt.
Rewriting the chain requires tampering with all previous blocks, which is nearly impossible in large networks.
5. Potential problems and solutions
Scalability:
Problem: Public blockchain can be slow due to the large number of transactions.
Solution: Layer 2 networks such as the Lightning Network.
Energy consumption:
The problem: Mechanisms like Proof of Work consume a lot of energy.
Solution: Move to more efficient mechanisms like Proof of Stake.
Cyber attacks:
Problem: 51% attack (control of majority of nodes).
Solution: Strengthen networks and increase their decentralization.