6

I've got a very precise question and this is not a dupe of:

Does Bitcoin rely on the internet?

My question boils down to: when you mine bitcoins, how "often" does the computer/hardware doing the mining need to connect to the Internet?

However to better explain what I mean by that question, here are a few sub-questions.

When a computer is mining, when is the result of the mining accepted/confirmed?

For example, after the computer received sufficient information to start mining, when will that information not be sufficient anymore to continue mining? In other words: when will the computer need to have Internet access so that it can continue mining? 1 picosecond? 1 nanosecond? 1 ms? 1 second? 1 minute? 1 hour? 1 day?

What happens if some computation is done on my mining computer, but then Internet connection is off? Is the result "lost" and if that result is lost, after how much time is it lost? 1 picosecond? 1 nanosecond? 1 ms? 1 minute? 1 hour? 1 day?

It may look like a "stupid" question but it would really help me better understand how BitCoin works...

(as I'm new here [but certainly not new on the SE network] I don't know which tag to use: thanks for retagging accordingly if needed)

2 Answers 2

3

Assuming you are mining on a pool, your miner needs to receive and send work (shares) every few seconds, with the exact frequency depending on your hashing speed and the difficulty of the shares.

For example, my ASIC sends and receives shares at least once every 20 seconds or so.

So you need a reliable network connection if you don't want your miner to sit idle. This is the same reason why you normally configure the miner to have fall-back pool servers in case the main pool server goes down.

3
  • thanks a lot... Is the network "slowing" your miner? I mean: an ASIC is dedicated hardware and is blazingly fast while the network is very, very slow compared to dedicated hardware. Are there drops in the "CPU" / power usage of your ASIC everytime there's a network connection or is all that queue'd / concurrently happening? (more questions to try to understand how it works) : ) Commented Dec 3, 2013 at 2:41
  • Yes, network latency can sometimes slow down the mining process. This is why ideally the pool can adapt the difficulty of the shares to suit your hashing power, so that your miner spends more time hashing away and less waiting due to network overhead.
    – ktorn
    Commented Dec 3, 2013 at 2:45
  • I see... Thanks a lot. That is very, very interesting! Commented Dec 3, 2013 at 2:48
2

ktorn has a good answer for all practical purposes, especially at this point where solo-mining is a laughable proposition, but here is a more theoretical answer, which could be practical for alt-coins where there is weak network hashing power and/or the difficulty is not very high (because blocks are targeted to be generated every 30 seconds or so).

All you need to mine a block is the hash of the block before it, and any transactions you want transaction fees from. You could then hash offline.

This would need to be done without a pool: your object is to find a block, not just shares that you must submit often. You'd only have to broadcast a block when you found one, and even then you would have a little time on average to connect to the internet to broadcast your block*

You could connect whenever you wanted to pick up more transaction fees or check if the next block had been discovered yet.

What is important to understand is that work is not accomplished "toward" discovering a block, you are just playing an extremely-low-probability lottery billions of times per second.

Any work you are doing off of a block that is not the most recently discovered block is a complete waste, however, so you would have to connect fairly often just to avoid wasting a lot of hashing.

The expected value of your discovered block is reduced to {block reward} * p(network finds a block in {average time you take to broadcast}), and your hashing itself has an expectation of {your hash rate * p(the network has discovered a block since you last connected)}/{network hash rate} and p(the network has discovered a block since you last connected) is approximately {time since last connection}/{10 minutes}

...it's actually a Poisson process but we won't get into that...

The bottom line is that

Every moment you are disconnected you are lowering the expected value of your next hash, because there is a chance that someone discovered a block and broadcasted it since you were last connected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.