Understanding Proof of Work (PoW) Blockchain
What Is Proof of Work (PoW)?
Proof of work (PoW) describes a system that requires a not-insignificant but feasible amount of effort in order to deter frivolous or malicious uses of computing power, such as sending spam emails or launching denial of service attacks. The concept was subsequently adapted to securing digital money by Hal Finney in 2004 through the idea of "reusable proof of work" using the SHA-256 hashing algorithm.
Following its introduction in 2009, Bitcoin became the first widely adopted application of Finney's PoW idea (Finney was also the recipient of the first bitcoin transaction). Proof of work forms the basis of many other cryptocurrencies as well, allowing for secure, decentralized consensus.
Understanding Proof of Work
This explanation will focus on proof of work as it functions in the bitcoin network. Bitcoin is a digital currency that is underpinned by a kind of distributed ledger known as a "blockchain." This ledger contains a record of all bitcoin transactions, arranged in sequential "blocks," so that no user is allowed to spend any of their holdings twice. In order to prevent tampering, the ledger is public, or "distributed"; an altered version would quickly be rejected by other users.
The way that users detect tampering in practice is through hashes, long strings of numbers that serve as proof of work. Put a given set of data through a hash function (bitcoin uses SHA-256), and it will only ever generate one hash. Due to the "avalanche effect," however, even a tiny change to any portion of the original data will result in a totally unrecognizable hash. Whatever the size of the original data set, the hash generated by a given function will be the same length. The hash is a one-way function: it cannot be used to obtain the original data, only to check that the data that generated the hash matches the original data.
Generating just any hash for a set of bitcoin transactions would be trivial for a modern computer, so in order to turn the process into "work," the bitcoin network sets a certain level of "difficulty." This setting is adjusted so that a new block is "mined" – added to the blockchain by generating a valid hash – approximately every 10 minutes. Setting difficulty is accomplished by establishing a "target" for the hash: the lower the target, the smaller the set of valid hashes, and the harder it is to generate one. In practice, this means a hash that starts with a very long string of zeros.
Example of Proof of Work
Proof of work requires a computer to randomly engage in hashing functions until it arrives at the output with the correct minimum amount of leading zeroes. For example, the hash for block #660000, mined on December 4, 2020 is 00000000000000000008eddcaf078f12c69a439dde30dbb5aac3d9d94e9c18f6. The block reward for that successful hash was 6.25 BTC.
That block will always contain 745 transactions involving just over 1,666 bitcoins, as well as the header of the previous block. If somebody tried to change a transaction amount by even 0.000001 bitcoin, the resultant hash would be unrecognizable, and the network would reject the fraud attempt.
What Does Proof of Work Mean?
PoW requires nodes on a network to provide evidence that they have expended computational power (i.e. work) in order to achieve consensus in a decentralized manner and to prevent bad actors from overtaking the network.
How Does Proof of Work Validate a Crypto Transaction?
The work itself is arbitrary. For Bitcoin, it involves iterations of SHA-256 hashing algorithms. The "winner" of a round of hashing, however, aggregates and records transactions from the mempool into the next block. Because the "winner" is randomly chosen proportional to the work done, it incentivizes everybody on the network to act honestly and record only true transactions.
Why Do Cryptocurrencies Need Proof of Work?
Because they are decentralized and peer-to-peer by design, blockchains such as cryptocurrency networks require some way of achieving both consensus and security. Proof of work is one such method that makes it too resource-intensive to try to overtake the network. Other proof mechanisms also exist that are less resource-intensive, but which have other drawbacks or flaws, such as proof of stake (PoS) and proof of burn. Without a proof mechanism, the network and the data stored within it would be vulnerable to attack or theft.
Does Bitcoin Use Proof of Work?
Yes. It uses a PoW algorithm based on the SHA-256 hashing function in order to validate and confirm transactions as well as to issue new bitcoins into circulation.
That’s it for today :-)
Hope each of you has a great start to your day. I’ll talk to everyone tomorrow.
If you are not a subscriber of Amit Unboxed, join 3,000+ others who read my personal writings & opinions about technology, startups, blockchain & crypto each morning.
Amit Unboxed Supporters
These companies/people make this newsletter and podcast possible, so go check them out and thank them for their support!
Pineapple Group - A Web3 company focused on tech product development. They also provide end-to-end techno-functional consultancy for startups.
Glasban - Your technology growth partner providing software development from conception to delivery - helping you to simplify, strengthen and transform your business.
Versatalia Labs - A next-gen technology product development company working in Computer Vision, AI, ML, Advance Analytics and Blockchain.
Team Dhanashree - Renowned public figure - a dancer, choreographer and creative movement therapist. She is my inspiration and motivation too :-)
I am a technology enthusiast, entrepreneur & creative thinker, who enjoys crafting Tech Products to make a real difference.
You are receiving this interesting content because you either signed up or you attended one of the events that I spoke at. Feel free to unsubscribe if you aren’t finding this valuable.
Please note that all the content in this newsletter is only for educational purposes. You are advised to do your own research!