4 ms·
Two things stood out for me: How is a signature picked? (he says four 0s at the start). He also says Bob can't give Alice 4 dollars out of thin air right after
by eecks 10y ago
Two things stood out for me: How is a signature picked? (he says four 0s at the start). He also says Bob can't give Alice 4 dollars out of thin air right after giving Anders 100 dollars out of thin air.
- POiNTx 10y agoThis is my understanding of it. How is a signature picked: This is arbitrary but should be a fixed sequence that you define before hand. It could start with 'abcd' as long as you decide on that sequence. In the example (and for bitcoin also) it is decided that the hashes should start with a specific number of zero's. He also says Bob can't give Alice 4 dollars out of thin air right after giving Anders 100 dollars out of thin air: Anders gets 100 dollars out of thin air because he mined (calculated the hash with the specific starting sequence). This is the reward Anders gets. Looking for a specific hash such as a hash starting with a certain number of 0's is very computational intensive work. That's why he gets the reward. Hashing is fast for a computer to calculate one way (go from a piece of data -> a hash) but very difficult and as such slow for a computer to calculate it in reverse (go from a hash to the original piece of data for which the hash was generated).
- Taek 10y agoThese come down to the specific rules of the Bitcoin blockchain. Today in Bitcoin, if you mine a block, you get 12.5 bitcoins out of thin air. The network allows you to have this money as a reward for finding the block. That is the only way to get money out of thin air. And because blocks are hard to create, money is hard to create. All other money comes from people sending it to eachother. For the signature question, we need to differentiate between two types of signatures. The first is the block signature, which is defined by having a bunch of leading zeroes. The second is an ECDSA signature, which is your more traditional cryptographic signature with a public key and a private key. When coins are mined out of nowhere, they get assigned to a public key. I'm oversimplifying a little bit, but this is sufficient to understand. To spend coins from that public key, you need to sign a transaction saying something like "I send X coins to person A". This message is signed with the secret key that corresponds to the public key that owns the coins. The really important part about the blockchain is that it prevents you from spending the same coins twice. So, if you only have 12.5 bitcoins, you can't sent 12.5 to Alice and then send the same 12.5 to Bob. You can create signed messages that claim both. Without a blockchain, it's impossible to tell which one is valid, because it's impossible to know which one came first. But that's the magic of the blockchain. It's a history of transactions. If you try to spend the same money twice in the blockchain, we can very easily see that you've spend it twice. We also know which one is the valid original one, because it will be first in the blockchain. So we know to accept the transaction that's first in the blockchain, and to ignore the second one. (note, in Bitcoin, it's actually illegal to have two conflicting transactions in the same blockchain. The second transaction will never be included into a block at all). And, as described early in the video, this history is very hard to re-write. If you decide one day later in Bitcoin that you want to actually undo your spend to Bob and instead spend that money back to yourself, you will have to outcompete all of the mining that happened over the past 24 hours to re-write the blockchain. Given that 'all of the mining' is hundreds of millions of dollars of hardware working non-stop, you will not be able to re-write the blockchain.
- samlewis 10y agoSo, all the miners race to mine the block but only the winner gets the 12.5 btc reward? Does that mean if you're a Joe Bloggs Bitcoin enthusiast, you'll never be able to get any reward if you only ever mine on your low key laptop setup?
- jacobwg 10y agoYes, and that's why there are mining pools, where Joe Bloggs connects his computer to a pool of other similarly underpowered computers to perform the complex calculations required to mine a block in a distributed fashion. Then when a block is mined, the pool owner acquires the 12.5 btc reward and distributes it to all the pool participants based on how much computation power/time each participant contributed to the overall pool, keeping a small bit for themselves for the overhead of managing the pool. Obviously you have to trust your pool operator. Also at this point in the BTC world, the difficulty has become so high that Joe Bloggs will never acquire any meaningful amount of BTC, even in a pool. There are specialized arrays of GPUs that can perform calculations at rates much higher than any standard PC or laptop. The same principles apply to any other bitcoin-like blockchain currency though.
- nileshtrivedi 10y agoNot unlike setting up a gold mine to "create" money.
- Taek 10y agoLaptops are useless for mining, yes. You'd need to spend something like $1000 on electricity for every $1 of Bitcoins earned on a laptop. Not to mention machine wear and failure. If you want to mine Bitcoins, you need a bunch of advantages. Special hardware, cheap space, low electricity cost, bulk manufacturing deals. Otherwise you probably aren't going to be breaking even, let alone profiting.
- TD-Linux 10y agoMining is not a race - in fact, the mining being progress-free is a really important part of PoW. If you have a low power setup, you have a very small chance of winning the reward, but it's proportional to your power over the total network power. There's unfortunately some things that make it a bit of a race - network latency and block verification time. That's why there's so much work spent on shrinking these (the FIBRE network, libsecp256k1)