Bitcoin Proof of Work

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
nobody knows exactly what will happen to bitcoin in 10 or 20 years but we do know quite a few things if we better understand the ideas the philosophy and the technology behind bitcoin we can better understand what an unstoppable force of nature bitcoin really is and where it might go in the future jimmy song and myself have put together this video to show you why bitcoin needs miners okay here's what you need to know we need people to mine bitcoin for two reasons one to secure the bitcoin network and two to create new bitcoins listen i'll show you how this works in a way that is very easy to understand if you've been in this space for some time you might think that this is going to be a little too basic but i'll try to offer some new perspective and if you're completely new don't worry here i've put together a very clear and concise explanation of what miners are and why we need them first miners secure the bitcoin network in two ways miners validate transactions by checking that transactions follow certain rules here's an example of how this works when you want to make a bitcoin transaction you open your bitcoin wallet let me show you how it's done first i'm gonna just plug in my ledger nano s to my computer enter my pin code open the interface to my bitcoin hardware wallet hardware wallets come with a program that you install on your computer from which you manage your wallet hit receive on my wallet and get the qr code on the screen open my mobile wallet jax is one of the wallets i use scan the qr code on the computer screen to send bitcoin from my jax wallet to my hardware wallet and hit send boom done your wallet then broadcasts the transaction to the network and it ends up in the manpool the memory pool the mempool is where unconfirmed transactions wait to be confirmed to be settled and that's where the miner comes in the miner picks up transactions from the mempool and confirms or validates a bunch of them bundles them together into a block and adds the block to the blockchain when your transaction is in a block that has been adhered to the blockchain it is settled it is set in stone but for the transaction to be valid and even make it into a block it has to follow certain rules the consensus rules and these are simple mathematical rules for example the miner checks that you're not trying to send more bitcoins than you actually have and that the transaction has a valid digital signature to prove that you're the owner of the coins you want to send there are about 30 of these rules and they're all automatically enforced the miner the person operating the mining gear doesn't do any of this he or she just makes sure that the mining computer is up and running the rules of the network are simple mathematical rules enforced by the bitcoin protocol no human being is involved in the validation of transactions here's the second part on how miners secure the network miners perform proof of work and this is the important part listen the miner has to provide proof that he or she has invested computational power or work in the block for it to be a valid block that can be adhered onto the blockchain a valid proof of work is like a ticket to go on the blockchain that's the basic outline but i have prepared something special for you here now are you ready to go down the rabbit hole of proof-of-work for a minute i promise you it's worth it okay when the miner has prepared the block with a bunch of newly validated transactions from people like you and me and the block is ready to be adhered to the blockchain to make these new transactions part of the permanent unchangeable history of bitcoin on the bitcoin blockchain the miner invests computational power that is aimed at brute forcing a cryptographic puzzle this is proof of work proof of work equals investing computational power in a block and providing proof that the work has been invested bitcoin is often critiqued because proof-of-work burns a lot of electricity but i will show you very clearly how it works and why we need it the means by which the miners invest power isn't really important the important thing is that they invest power but here's how they do it they brute force a puzzle that isn't so much a puzzle as it is a guessing game where the minor guesses random numbers until he or she finds a special number that fits an equation and this guessing game is really energy intense the mining hardware which today would be an asic such as an antminer s9 is a powerful computer whose only purpose is to make trillions of guesses per second to find that special number that's all it's designed to do it's very specific in that purpose still with me cool listen here's how that cryptographic puzzle works and if you understand this you know more about bitcoin and proof of work than 99 of people out there and proof of work really is the heart of bitcoin so this is important okay here's how the puzzle works each bitcoin block has a part known as the block header in the block header there's something called annons which stands for number used once the nonce is a 32-bit number 32 ones and zeroes and the miner has to guess at this number until they get it right and what does that mean what's the right number to be able to answer this question we have to understand the basics of a hash function this is interesting when you run something through a cryptographic hash function like shot 256 that bitcoin uses you get a 256 bit long number for a given input you always get the same 256 bit output but the output appears completely random the output or the hash of the number one appears no more different or similar to the hash of the number two another digit then to the hash of the entire works of shakespeare and these cryptographic hash functions are one-way functions they cannot be reversed when you run the block header with the nonce inside through a cryptographic hash function you get a number 256 bit long each time you change the nonce inside the block header you get a completely different output for the header the task the puzzle that the miner is trying to solve is to find a number for the nonce so that the hash of the hashed block header is smaller than a target number this is what it looks like we take the hash of the block header containing the nouns and the hash of that entire thing has to be smaller than the targets so there is no one right number there are actually several numbers that would produce a valid result the nonce just has to give an output below the target when such a number has been found then the miner has successfully brute forced the solution and gets to adhere the block to the blockchain and will be rewarded the block reward here's the kicker it takes trillions and trillions of guesses using an asic to find a nonce that produces a result that is smaller than the target and the smaller the target is the more difficult it becomes to find a nonce that gives a result below the target that's the puzzle that requires so much electricity the reason this is so energy intense is because it takes trillions of guesses per second to find a number that fits miners compete with each other to be the first to find a solution so that they can be done with a block adhere it to the blockchain get the block reward and move on to the next block the more computational power you have the more likely you are to be the one to find the solution the task in itself guessing random numbers is rather useless this is just a way to force the miner to invest an external source of something in this case electricity which costs him or her a lot of money and i will show you why this is important in a minute first here's something interesting about the target the target is actually more important than it seems at first glance because it serves a very important role in bitcoin and this is definitely something you'll recognize if there is a lot of hashing power in the network a lot of miners with new mining chips then someone is going to find the solution fairly quickly and produce a block fairly quickly if there isn't much hashing power available then it's going to take longer to produce a block by adjusting the target up or down we change how quickly miners can produce new blocks if the target is a big juicy number then miners can find a block quickly and they'll smash the solution as a ticket on the block to make it valid and they'll be able to move on to produce a new block if the target is a small number it's going to take longer lower target equals more difficult to find a solution equals more time needed to brute force the solution listen the target is automatically adjusted every two weeks to change the difficulty of mining and there's a reason for this listen the bitcoin protocol aims to keep the block generation time at 10 minutes this is what i think you'll recognize to keep bitcoin's heartbeat constant with one new block every 10 minutes the target is automatically adjusted every two weeks with regards to how much computational power is available in the network so if you've ever wondered what determines the 10 minute block generation time in bitcoin it's the target number the target is the pacemaker that keeps bitcoin ticking with one new block every 10 minutes like a heartbeat there that's a thing you know now so what do they do with this why was all this necessary when they have the solution to the puzzle if we can continue to call it a puzzle they put the solution on the block as a proof that they have invested computational power this is the ticket to the blockchain the ticket that says that the miner has indeed invested a lot of computational energy and expensive electricity in the block providing proof of work is mandatory to get to adhere the block to the blockchain where it will be to the end of times unchangeable forever so okay you know how proof of work works which is pretty badass actually so congratulations very few people understand this but why do we need proof of work why do we need to burn a lot of electricity here is the true heart of bitcoin a lot of people have some vague understanding about this often with a few misconceptions i will make this very clear for you once and for all to run an asic whose only job is to guess different numbers trillions of times per second actually costs quite a lot of electricity to run the purpose of investing this electricity is to make it expensive to mine and i'll tell you why it needs to be expensive to mine here's what few people know about mining the purpose of making it expensive to mine is to make it absolutely nonsensical to try and cheat the system because if you do try to cheat the system you have zero percent chance of being rewarded for your work as a miner you have zero percent chance of getting your block onto the blockchain and get the block reward if you try to cheat you have wasted a lot of money on hardware and electricity for nothing but if you're honest ie validate transactions according to the consensus rules and don't try to double spend or plan false transactions or anything like that there is a reward system in place that actually works miners mind because if they're the first to produce a valid block that gets adhered to the blockchain they get a block reward a monetary reward in the form of new bitcoins and fees included with the transactions that were included in the block but to get the block reward the miner has to present a valid block with valid transactions and a valid proof of work providing valid proof of work is the miner's way of saying i'm not bullshitting i validated these transactions according to the rules and i've created this block with peace love and joy according to the rules and now i want to adhere it to the blockchain it cost me a lot of money to do this so i made sure to do it honestly and correctly in the hope of getting a block reward for this and i know that if i try to include just one transaction that doesn't follow the rules or if i try to cheat the system in any way my entire investment in this block will have been a waste because the block will be rejected and i will not get the block reward and yes a block with a false transaction will be rejected 100 of the times because the rules of the network are enforced not by an authority like with a bank but through simple mathematical rules that cannot be fooled bitcoin have rules without rulers bitcoin is actually the most regulated financial system on the planet not the other way around when people say bitcoin is unregulated they have misunderstood the concept yes there are no men in suits in the background who decide who gets to transact and who doesn't based on arbitrary nonsense based on who you are what you do how much money you have how much you want to send and with whom you want to transact and where that person is bitcoin is blind to all of that because it's completely neutral bitcoin's rules and regulations aren't arbitrary rules set by men in suits but rather mathematical rules that are fair to everyone and that don't give a about social status age gender how much money you have where you live and with whom you want to transact and this makes bitcoin incredibly powerful here's a thought experiment if it didn't cost a lot of money to mine there would be no incentive for miners to be honest if it didn't have to invest anything in the process the miner could plant false transactions into the block and not risk anything doing so for example the miner could plant a false transaction into a block that says that satoshi sent him or her 500 000 bitcoins on the 3rd of january 2012. this is possible to do but it's a false transaction that breaks several of the consensus rules for example the miner doesn't have satoshi's private keys to sign the transaction and a transaction without a valid digital signature is not a valid transaction so the transaction is going to be rejected automatically unless a malicious miner decides to try and cheat the system by including it in a block anyway but because it costs so much to create a block with a valid proof of work the miner will not try to cheat the system because it guarantees that the block is going to be rejected trying to cheat the system is a guaranteed monetary loss however if the miner is honest then he or she could get the block reward miners compete against each other for block rewards to be the first to successfully create a valid block but the only way to get the block reward is to present a valid block that follows the rules or otherwise it's a guaranteed monetary loss if you're still with me now it means that you're serious about this and i'm really glad that you are what i'm going to show you now is sort of where it all comes together proof of work has another even more profound purpose than just making it incredibly expensive and futile for miners to try to cheat the system namely that it makes the blockchain immutable meaning that it cannot be changed which means and this is the cool part that bitcoin cannot be hacked or controlled has never been hacked or controlled and likely never will despite being under constant attack since the beginning by the most sophisticated hackers on the planet including the nsa for example if i send you a bitcoin transaction and it is settled on the blockchain after it has been successfully validated and so on it becomes immutable there's no government a bank or a financial authority in the world that can reverse the transaction this is really important bitcoin transactions cannot be censored from start to finish there's no way to freeze an account there is no way to get in the way of how you decide to spend your bitcoins and there's no way to reverse a transaction you're in full control the amount of proof of work the amount of electricity invested in the entire blockchain is what makes it impossible to go back and change the history of the blockchain with the history of the blockchain what i really mean is the transactions that have happened and the order in which they have happened let's continue the thought experiments from before and this is where it becomes really enlightening say i created the false transaction that says that satoshi sent me 500 000 bitcoins on the 3rd of january 2012. this block would create a second chain a new chain with a new history because it isn't in accordance with the already existing history the already existing blockchain so there are now two different blocks at the same point in time from the 3rd of january 2012 that tell us two different stories there are two conflicting blockchains one with a true history and one with a false transaction and here's the kicker there can only be one chain to make this false transaction permanent so i can keep the 500 000 bitcoins my false chain has to survive and outlive the true chain to make that happen i would not only have to recreate the entire blockchain and reinvest all the necessary energy to provide valid proof of work for each historic block up to present day i would also have to continue to mine new blocks to sustain the false chain forever onward because we follow the longest chain we trust the longest chain or more correctly the chain that has the most proof of work invested in it sustaining a false chain is practically unfeasible because of the amount of hashing power in the bitcoin network and you would have to have at least 51 of the hashing power in the network to do this i simply could not compete with the true chain even if several nation states with the necessary funds coordinated such an attack against bitcoin i.e creating a false history to ruin bitcoin there just isn't enough mining equipment available in the world right now to get 51 of the hashing power in the network so no single entity could ever generate the necessary hashing power to plant a false transaction or attack bitcoin in any other way and sustain that false chain long enough to make it the real chain an immutable blockchain is not just the most secure payment network on the planet it is also the most powerful tool we have to fight corruption and increase financial inclusion and financial democracy through neutrality openness and immutability which is why the electricity invested in the system is not a waste now you know why we need proof of work few people can even begin to comprehend how this fundamental technology of bitcoin works let alone why it is paramount and the heart of bitcoin you do now and that's not trivial so congratulations again as i mentioned in the beginning there are two reasons we have miners now you know all you need to know about how they secure the network and create an immutable blockchain the second reason we need miners is to create new bitcoins the first miner who successfully creates a valid block gets to adhere to the blockchain that's the goal of every miner he or she then gets a reward in the form of new bitcoins and that's the block reward block rewards do not only work to incentivize miners to keep the network secure block rewards are also how new bitcoins come into the economy how new bits of currency enter the circulation but in the year 2140 the last bitcoin will be mined what happens then what happens when there are no more block rewards to incentivize miners to secure the network and continue to make the blockchain immutable this and more will be covered in our next video stay tuned
Info
Channel: Ioni Appelberg
Views: 14,554
Rating: 4.9423771 out of 5
Keywords:
Id: 2hFvQhMRnc4
Channel Id: undefined
Length: 21min 20sec (1280 seconds)
Published: Wed Sep 09 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.