I just can't seem to understand how bitcoin works. Here is what I understand so far.
- Alice sends 1 Bitcoin to bob's public address
- A new transaction gets created for miners to approve. A transaction will have the following properties
- Sender's public address
- Receivers public address
- The transaction gets broadcasted to multiple nodes on the bitcoin network
- Miners/Nodes listening for incoming transactions receive Alice's transaction and want to make sure that the transaction is legit and there is not double spending.
- Miners/Nodes start looking up the ledger (block chain) which holds all the transactions that every happened from the beginning of time to find if all the previous transactions by Alice have been completed and if they are, only then execute the new transaction.
- When a miner validates the new transaction it transfers the 1BTC over to Bob's account minus transaction fee.
- And Bob is 1BTC richer and he lives happily ever after.
Please correct me if I am wrong and I honestly don't understand whats the story with the 'n' number of zeros being added to the a string to prove a transaction is valid.
Please help. I'm trying to understand this so that I can contribute to Bitcoin's source code.