Bitcoin Forum
September 25, 2016, 10:34:40 AM *
News: Due to DDoS attacks, there may be periodic downtime.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Some Simple Questions  (Read 916 times)
Judson
Newbie
*
Offline Offline

Activity: 22



View Profile
December 09, 2010, 04:01:14 AM
 #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]
1474799680
Hero Member
*
Offline Offline

Posts: 1474799680

View Profile Personal Message (Offline)

Ignore
1474799680
Reply with quote  #2

1474799680
Report to moderator
1474799680
Hero Member
*
Offline Offline

Posts: 1474799680

View Profile Personal Message (Offline)

Ignore
1474799680
Reply with quote  #2

1474799680
Report to moderator
1474799680
Hero Member
*
Offline Offline

Posts: 1474799680

View Profile Personal Message (Offline)

Ignore
1474799680
Reply with quote  #2

1474799680
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
jgarzik
Legendary
*
Offline Offline

Activity: 1470


View Profile
December 09, 2010, 04:11:31 AM
 #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.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!