Proof-of-work (POW): is the mechanism that allows the decentralized Ethereum network to come to consensus and ensure Ethereum difficult to attack.
Example about Consensus:
- Account balances.
- Order of transactions.
💧 The work in proof-of-work
👉 Step 1: miner will repeatedly put a dataset which get from downloading and running the full chain through a mathematical
(--> what in fact behavior to get dataset??)
👉 Step 2: dataset gets used to generate a mixHash below a target nonce, as dictated by the block difficulty.
(--> How to generate mixhash and nonce from dataset)
👉 Step 3: other miners and clients to verify
(--> how to verify that nonce and mixhash are correct?)
Note: explain detail how POW works: https://youtu.be/9V1bipPkCTU
💧 Proof-of-work and security
Because a malicious miner can not solve the block nonce faster than everyone else, so it's nearly impossible to:
- Create new blocks that erase transactions,
- Create fake ones,
- Or maintain a second chain.
💧 Proof-of-work economics
- Miner can receive tip and block reward but no longer transaction fee.
- Miner may also get 1.75 ETH for an uncle block (which created same time another miner mined the successful block, happen due to network latency.)
💧 Finality
- Time you should wait to ensure a transaction irreversible (usually six blocks or just over 1 minute)
- This timing doesn't include the wait times for having a transaction picked up by a miner.
💧 Pros and cons
Pros |
Cons |
Proof-of-work is neutral. You
don't need ETH to get started and block rewards allow you to go from 0 ETH to
a positive balance. With proof-of-stake you need ETH to start
with. |
Proof-of-work uses up so much
energy that it's bad for the environment. |
Proof-of-work is a tried and
tested consensus mechanism that has kept Bitcoin and Ethereum secure and
decentralized for many years. |
If you want to mine, you need such
specialized equipment that it's a big investment to start. |
Compared to proof-of-stake it's
relatively easy to implement. |
Due to increasing computation
needed, mining pools could potentially dominate the mining game, leading to
centralization and security risks. |
Nhận xét