Hacker News new | past | comments | ask | show | jobs | submit login

I actually would very much appreciate that. I was just reading Nakamoto's whitepaper on Bitcoin [1] and I understand the hashing. However, the coinebase transaction is still a bit confusing to me. Specifically, to get at precisely this issue - what does the bitcoin itself consist of? It is just the summation of the history of transactions to and from an address? Or is there a numerical value or token that is actually issued during a coinbase transaction, and, if so, how is it generated? This is not apparent to me. I understand that during a coinbase transaction, there is a transaction registered that is issued to the miner and the 'from' address is null - but it is still not clear to me, other than the balance of that transaction, if there is an actual token associated with those coins.

Any explanation would be greatly appreciated!

[1] https://bitcoin.org/bitcoin.pdf

The core idea is that there are a number of coins "floating out there in the open" which you can use in your transactions, as Inputs. These Inputs can be used in transactions as long as you publish data which can solve a riddle put forth by a Script. So, your balance is basically any those which you can easily use as Inputs. The most traditional way of tracking this is that you use a standardized script format called P2PKH (Pay 2 Public Key Hash), and software like a wallet scans the transactions for any scripts that have your public key mentioned in a P2PKH template.

So, once you want to send money to someone else's wallet, you answer the riddle of the script (in P2PKH's case, by signing something and proving you own the public key) allowing you to do whatever you want to that Input. A key thing is that if someone pays you 3BTC and someone else pays you 2BTC, then you have 5BTC in combined inputs. To pay someone else 4BTC, you use both those Inputs and make two new ones: 4BTC P2PKH to someone else's public key, and 1BTC back to your own "change address", which is just an Input that you can reuse again.

A wallet broadcasts transactions into the network, where they float around until a miner takes those transactions, puts N of them into a block, then, as part of that block, they can use an extra magical coinbase Input which gives them 12.5BTC out of thin air (originally 50BTC, halves every so often) which they can lock under any script they want.

> It is just the summation of the history of transactions to and from an address?

It is. Imagine the blockchain as a democratic ledger. As long as most people agree a certain transaction is valid it then is valid. This allows for tricks like creating bitcoins out of thin air as long as everyone agrees you "deserve" those bitcoins. For example if you confirm enough of other peoples transactions (which you can do because the ledger is public) most everyone will agree that a transaction from nowhere to an address of your choosing is valid.

The amount of bitcoins in your possession is just the amount of bitcoins ever transfered to addresses to which you own the private key, minus the transactions out of those adresses.

You shouldn't think of bitcoin as a virtual coin. That's a fairly bad metaphor. It's not some actual thing, It's more like the balance in a ledger.

Right, that was my instinct, it is just that the documentation I have seen, including the O'Reilley bitcoin manual, on the coinbase transaction, glosses over this point.

This is the best explanation I've seen so far: https://bitcoin.stackexchange.com/questions/10050/how-balanc...

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