Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


These 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.


So, 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?


Yes, 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.


Not unlike setting up a gold mine to "create" money.


Mining 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)


Laptops 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.


Just computing hashes seems a bit of a "waste" but given that this mining exists...does it essentially provide a market cap for renting GPU calculations for say deep learning? If I offer 13 coins for the estimated GPU usage it takes to mine a block, rational miners should switch over and let me rent their GPU farms, right (ignoring other costs for arguments sake)?

Is there something like Amazon p2s that mine bitcoin and show a running cost (x/h) where I could just bid >x/h and rent it for a while to do my calculations and when I "shutdown the instance" it goes back to mining?

The mega farms are build around scale and cheapest electricity usually. wouldn't it make sense for them to slap a "rent our servers for deep learning" on top? They know really well how much expected value they generate from the mining (with variance due to the BTC price swings) so they could charge a bit more (or 2x...depends on how well known the margins are) to let anyone rent the calculation for other stuff...then return to default-mining once the rented calculations are done.


People use custom silicon, ASIC:s, designed to only run SHA256 mining. Almost nobody uses GPU:s.

There as are so called multipools that tell its miner clients to mine on whatever blockchain is currently most profitable. I can imagine merging this with a paid version of BOINC.

That would only be used by the "GPU coin miners", those in blockchains using ASIC resistant PoW like scrypt instead of SHA256.


Why is scrypt ASIC resistant? If it is an algorithm hardware can be designed to implement the algorithm, right? It took a few years for people to start making bitcoin ASICs, but it happened. What would prevent the same for scrypt given enough financial incentive?


Another hot topic. Many experts believe that ASIC resistance is a futile endeavor for the reasons you listed. But designing a worthwhile SHA ASIC is certainly a lot easier/cheaper than designing a worthwhile scrypt ASIC. Worth noting, there are actually scrypt ASICs already, for litecoin and dogecoin at least.

Ethereum and Zcash both tried to make asic resistant hashing algorithms. So far they have held up. Ethereum has a hardfork history though and also is trying to move to PoS. Given the cost of developing asics, I'm guessing most manufacturers aren't willing to risk that ethereum could just hardfork to invalidate the hardware, destroying the investment.

We will see, but I'm guessing the Zcash algo will see asics within 2 years if the coin sees successful adoption.


Because it requires expensive components (lots of RAM) and doesn't significantly outperform a regular CPU / GPU.


This 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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: