Proof of Work
A consensus mechanism that requires miners to solve complex mathematical puzzles to validate transactions and secure the network.
## Technical Deep Dive: The Hash Search
Miners iterate through values of a nonce to find a block hash that meets the network's difficulty target.
``python``
while hash(block_data + nonce) > target:
nonce += 1
### Key Metrics
- Target: A 256-bit number. The lower the target, the harder it is to find a valid hash.
- Hashrate: Measured in hashes per second (H/s). Currently in the Exahash (EH/s) range for Bitcoin.
- Difficulty Adjustment: A periodic recalibration of the target to ensure consistent block intervals regardless of changes in total network hashrate.
graph LR
Center["Proof of Work"]:::main
Pre_consensus_mechanisms["consensus-mechanisms"]:::pre --> Center
click Pre_consensus_mechanisms "/terms/consensus-mechanisms"
Pre_hashing["hashing"]:::pre --> Center
click Pre_hashing "/terms/hashing"
Pre_cryptography["cryptography"]:::pre --> Center
click Pre_cryptography "/terms/cryptography"
Center --> Child_mining_crypto["mining-crypto"]:::child
click Child_mining_crypto "/terms/mining-crypto"
Center --> Child_asic["asic"]:::child
click Child_asic "/terms/asic"
Rel_proof_of_stake_pos["proof-of-stake-pos"]:::related -.-> Center
click Rel_proof_of_stake_pos "/terms/proof-of-stake-pos"
Rel_byzantine_fault_tolerance["byzantine-fault-tolerance"]:::related -.-> Center
click Rel_byzantine_fault_tolerance "/terms/byzantine-fault-tolerance"
Rel_proof_of_work["proof-of-work"]:::related -.-> Center
click Rel_proof_of_work "/terms/proof-of-work"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧠 Knowledge Check
🧒 Explain Like I'm 5
Imagine a classroom where to speak, you first have to solve a really hard Sudoku puzzle. By the time you solve it, you've proven you did 'work'. If a bully wants to shout over everyone else, they'd have to solve Sudokus faster than the entire [class](/en/terms/class) combined, which is impossible. That's how PoW keeps the network safe from bullies!
🤓 Expert Deep Dive
## Technical Deep Dive: The Hash Search
Miners iterate through values of a nonce to find a block hash that meets the network's difficulty target.
``python``
while hash(block_data + nonce) > target:
nonce += 1
### Key Metrics
- Target: A 256-bit number. The lower the target, the harder it is to find a valid hash.
- Hashrate: Measured in hashes per second (H/s). Currently in the Exahash (EH/s) range for Bitcoin.
- Difficulty Adjustment: A periodic recalibration of the target to ensure consistent block intervals regardless of changes in total network hashrate.