<p>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 <a href="https://www.altcoincalendar.info/coins/381-SPC" rel="nofollow">every 30 seconds or so</a>).</p>

<p>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.</p>

<p>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*</p>

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

<p>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. </p>

<p>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.</p>

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

<p>...it's actually a Poisson process but we won't get into that...</p>

<p>The bottom line is that </p>

<p><strong>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.</strong></p>

CC BY-SA 3.0
2014-08-20T01:54:09.173Z
2014-08-20T01:54:09.173Z
hedgedandlevered
<p>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.</p>

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

<p>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.</p>

CC BY-SA 3.0
2013-12-03T02:41:38.463Z
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)  : )
Cedric Martin
CC BY-SA 3.0
2013-12-03T02:45:28.603Z
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
CC BY-SA 3.0
2013-12-03T02:48:51.307Z
I see... Thanks a lot. That is very, very interesting!
Cedric Martin
CC BY-SA 3.0
2013-12-03T02:37:51.393Z
2013-12-03T02:37:51.393Z
ktorn
<p>I've got a very precise question and this is not a dupe of:</p>

<p><a href="https://bitcoin.stackexchange.com/questions/2180/does-bitcoin-rely-on-the-internet">Does Bitcoin rely on the internet?</a></p>

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

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

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

<p>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?</p>

<p>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?</p>

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

<p><em>(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)</em></p>

<bitcoin-core>
Can you mine bitcoins with an intermittent Internet connection?
Cedric Martin
# Can you mine bitcoins with an intermittent Internet connection?

(Asked by: username_0 on 2013-12-03)

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

[Does Bitcoin rely on the internet?](https://bitcoin.stackexchange.com/questions/2180/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)*

**Tags:** bitcoin-core


---

## 2 answers

### Answer by username_2 on 2013-12-03. Score: 3 | Accepted answer

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.

> **Comments:**
> **username_0**: 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)  : )  
> **username_2**: 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.  
> **username_0**: I see... Thanks a lot. That is very, very interesting!  

---

### Answer by username_1 on 2014-08-20. Score: 2

username_2 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](https://www.altcoincalendar.info/coins/381-SPC)).

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.**


---

