Author

Topic: Some Simple Questions (Read 1557 times)

legendary
Activity: 1596
Merit: 1100
December 08, 2010, 11:11:31 PM
#2
For starters, I just want to say Bitcoin is awesome. I am a developer/economist and want to completely wrap my head around the theory behind Bitcoin so I can help out where possible.

My question is about transactions and how they are included in newly generated blocks.

     - I understand that when a new block is generated, the miner gets to keep the fees of the transactions that he includes in the generated block, which replicates transactions across the network and keeps people from spending bitcoins twice, etc. (correct me if I'm wrong).
     - The problem is, how do the miners "see" transactions? Or, how do they actually get the other users transactions to include in the newly generated block.

Each individual transaction is immediately relayed to the entire network, by the transaction creator.  As a node on the network, you are typically offered the same transaction multiple times, for redundancy.  Everyone sends transactions to everyone.

So, simply by being a node on the bitcoin P2P network, miners are sent transactions by other nodes on the network.  Miners then try to hash the list of transactions not yet in a block.


Quote
Also, what part does the "wallet.dat" play? Does it store your private key? If it does, why does it need to be backed up after each transaction?

Yes, it stores keys, transactions, various program settings and other features such as the new account system.

It needs to be backed up after each transaction due to "change" transactions.  If you receive 1000 BTC, then send me 1 BTC, bitcoin will create a transaction that looks like this:

     input: { 1000 BTC }
     output: { 1 BTC },
               { 999 BTC }     <---- change transaction, from yourself, to yourself

If you lose your latest backup, you might lose those 999 BTC, because you don't have the keypair associated with it.
newbie
Activity: 22
Merit: 0
December 08, 2010, 11:01:14 PM
#1
For starters, I just want to say Bitcoin is awesome. I am a developer/economist and want to completely wrap my head around the theory behind Bitcoin so I can help out where possible.

My question is about transactions and how they are included in newly generated blocks.

     - I understand that when a new block is generated, the miner gets to keep the fees of the transactions that he includes in the generated block, which replicates transactions across the network and keeps people from spending bitcoins twice, etc. (correct me if I'm wrong).
     - The problem is, how do the miners "see" transactions? Or, how do they actually get the other users transactions to include in the newly generated block.


Also, what part does the "wallet.dat" play? Does it store your private key? If it does, why does it need to be backed up after each transaction?

[edit] Scratch the wallet.dat part, I just saw the question in the FAQ[/edit]
Jump to: