Also, tiny nitpick, but `bc` is a common unix command, so maybe a different shortname would be better.
Also, tiny nitpick, but `bc` is a common unix command, so maybe a different shortname would be better.
Any explanation would be greatly appreciated!
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. 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.
This is the best explanation I've seen so far: https://bitcoin.stackexchange.com/questions/10050/how-balanc...
But hey since it is a decade later now, and iphones no longer show pictures of an address book for your contact list, maybe we can also drop the -coin and -currency monikers and call it distributed hash chain accounting networks!
There is a known quantity of hashes.