Bitcoin mining algorithm

I was looking at some sample mining algorithms and also some sample code and there was something which I didnt really understand. In Simple bitcoin mining algorithm he says ,
The simplest miner would work like this:

The simplest miner would work like this:

     1. Request a new [Getwork][1] from a given pool/bitcoind with specified credentials
     2. For nonce=0;nonce<0xFFFFFFFF;nonce++
     - Set Getwork Data nonce
     - SHA-256 hash the Getwork Data ([block header][2])
     - Check if hash result is smaller than Getwork Target, if so, submit a share
     - If more than 1 second passed since you received Getwork, stop the loop
     3. GOTO: 1

What I dont understand is step 2, part 4. Lets consider the above script is connected to an FPGA through a uart port. Wont I wait until the FPGA actually finds a valid nonce and submits the none through the UART line? Why would I exit out of the loop after 1 second and then go through the entire process again. This doesnt make sense to me because then the fpga has only a few seconds to increment the nonce for the given work and it then moves on to the next piece of work? How is this even realistic since even if the same work is submitted again it will go through the same loop and will end up doing nothing productive. What error am I making here? Sample code that I am talking about: does the same thing. It says golden.wait(timeout) instead of just calling golden.wait() and blocking till a nonce is found

Why is my /Library/Application Support/Bitcoin directory missing?

I can’t launch the latest update, now it just ‘unexpectedly quits’ before loading. I tried uninstalling and reinstalling a couple of the past versions, but the directory folder was never created. Strangely, the 0.7.2 version did actually launch, with the right wallet contents, but still no directory folder. When I tried going back to the most recent and the most recently successful version.. it still doesn’t work. I even tried creating the folder myself before an install but it still didn’t work. ANy suggestions?

Installed bitcoin-qt and Tor, allowed firewall, Tor connects, but Bitcoin doesn’t

I did these things but Bitcoin still says 0 connections. What’s the problem?

  1. Windows 7 32bit. Installed bitcoin-qt

  2. Installed Tor Browser bundle

  3. I allowed all local outbound connections in my firwall (remote connections allowed only for Tor, for bitcion they’re forbidden).

  4. Run bitcoin.exe and enabled SOCKS proxy on port 9050.

  5. Exit bitcoin.exe, run Tor Vidalia, wait till it say “Connected to Tor”

  6. Run bitcoin-qt.exe

  7. Wait, wait, wait… 0 connections. In Resource Monitor I see only Tor connects to the internet. Bitcoin doesn’t connect anywhere.

Please help.

Sending bitcoins to myself

If I send bitcoins from my wallet to an address I created in my wallet, will I get more than 1 confirmation eventually? And do I have to wait for all the block to be downloaded to my wallet so I can get coins sent to me?

Import wallet.dat into a new Bitcoin-Qt client

I had Bitcoin-Qt on my computer with several bitcoins in my wallet, using Vista. Then my computer crashed. Finally I was able to get my computer fixed and download a new version of Bitcoin-Qt. Now I would like to import my original wallet.dat from the old client which was encrypted into an new version of Bitcoin-Qt. How do I do that?

How long does it take to propagate a newly created block to the entire Bitcoin network and why?

Once a new block has been created, it is propagated to the entire network. I’d like to know how long this would take “on average”.

The propagation delay can be from several causes, and I’d additionally like to understand which one is the most significant:

  1. As I understand, blocks are not propagated before being verified and accepted, so this should contribute to propagation time.
  2. Network latency adds delay regardless of the block size.
  3. Bandwidth limitations: large blocks will take longer to transmit, and nodes with many outgoing links will take longer to transmit the block to all their neighbors.
  4. The network’s diameter.

If there are other causes of delay I’d love to hear about them.

Also, is anyone monitoring the network’s propagation delay, or any of the other network measurements I mentioned, and if so, where can I find statistics?

How to remove private keys from wallet.dat and create “receive only” wallet?

I want to create a wallet for monitoring incoming transactions. So it should be receive only wallet that will be place on hosting, that is potentially not secure. If I understand it well, this won’t allow attacker to stole funds if server is compromised. How I can create such a wallet with only public keys? And can I inject private keys later to spend from that wallet from a secure machine?