<p>Welcome to the site!</p>
<p>It depends on the protocol being used.</p>
<p>Some protocols have the pool dictate how often the list of transactions is updated, and others have it defined by the mining client.</p>
<h3>Stratum</h3>
<p>In Stratum, the pool sends the miner a new merkle branch when it sees a new block or when a certain amount of time has passed. By default, it updates the list of transactions every <a href="https://github.com/slush0/stratum-mining/blob/23ebc8506325ec4b8a60ce3c49cab96ae87c006b/conf/config_sample.py#L73" rel="nofollow noreferrer">60 seconds</a>.</p>
<p>Of course, this is only a default; a pool operator can change this.</p>
<h3>GBT</h3>
<p>In getblocktemplate with longpoll, the pool sends new work on block change, or after 60 seconds. (For bitcoind, at least.)</p>
<pre><code>// Wait to respond until either the best block changes, OR a minute has passed and there are more transactions
...
checktxtime = boost::get_system_time() + boost::posix_time::minutes(1);
</code></pre>
<p><a href="https://github.com/bitcoin/bitcoin/blob/dbf1dc239ed88503299a6e89efaa7f82de8986c2/src/rpcmining.cpp#L442" rel="nofollow noreferrer">(Source)</a></p>
<p>In getblocktemplate without longpoll, the miner looks for new work every so often. 'Every so often' is miner-defined.</p>
<p>cgminer does it every 60 seconds:</p>
<pre><code>static void gen_gbt_work(struct pool *pool, struct work *work)
...
if (now.tv_sec - pool-&gt;tv_lastwork.tv_sec &gt; 60)
</code></pre>
<p><a href="https://github.com/ckolivas/cgminer/blob/1f85488262af9dd679b159aa07e35d3eca73bcaa/cgminer.c#L2033" rel="nofollow noreferrer">(Source)</a></p>
<p>bfgminer is user-configurable, but defaults to 60 seconds:</p>
<pre><code>--scan-time &lt;arg&gt;   Upper bound on time spent scanning current work, in seconds (default: 60)
</code></pre>
<p><a href="https://github.com/luke-jr/bfgminer/blob/cb7bca09d02f62b3f4e039db468b3c51a5ac5960/README#L314" rel="nofollow noreferrer">(Source)</a></p>
<h3>Conclusion</h3>
<p>Changing work every after the network finds a new block and every 60 seconds is by far the most common way of doing things.</p>

CC BY-SA 3.0
2014-12-07T00:46:09.140Z
The stratum protocol doesn't have a default interval to push new work. I think most pools use 30 seconds though.
Dr.Haribo
CC BY-SA 3.0
2014-12-07T01:11:40.953Z
`stratum protocol doesn't have a default interval to push new work` Technically, the Stratum protocol doesn't define how often you push new work. In practice, everyone uses slush's implementation, and slush's implementation does it, by default, every 60 seconds.
Nick ODell
CC BY-SA 3.0
2014-12-07T02:12:05.043Z
This is a really awesome answer Nick, and much more than I was hoping for.
btcee99
CC BY-SA 3.0
2014-12-07T02:21:44.960Z
I've been studying the 'min lead time' on transactions, which is the minimum time a tx pushed to the network needs to lead the block discovery time by, in order for it to have a chance at being included. 

The results seem to agree with the 60s/30s update intervals you have described.   See [here](http://i.imgur.com/6Vxh9GT.png) for graphs of estimated min lead time. Credit is due to [organ of corti](http://organofcorti.blogspot.sg/) for the data.
btcee99
CC BY-SA 3.0
2014-12-07T09:15:40.970Z
Most pools have their own mining pool software, they don't use Slush's example implementation.
Dr.Haribo
CC BY-SA 3.0
2014-12-06T07:15:05.657Z
2014-12-06T07:20:37.313Z
2020-06-16T11:10:03.350Z
Nick ODell
<p>Assuming an interval where no block is found, do we know how often the typical miner updates his block transaction list with new transactions from the mempool?</p>

<p>I found <a href="https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/miner.cpp#L624" rel="nofollow">a reference</a> which suggests that the default update time is 60 seconds, but I'm not sure what software the pools are using to generate their block transaction lists. </p>

CC BY-SA 3.0
2014-12-06T15:51:05.953Z
This question is similar, but the answer doesn't really answer your question: http://bitcoin.stackexchange.com/questions/3335/under-what-circumstances-would-a-server-submit-new-work-to-a-miner
Nick ODell
<mining-pools><transaction-selection>
How often do miners update their block transaction list?
btcee99
# How often do miners update their block transaction list?

(Asked by: username_0 on 2014-12-06)

Assuming an interval where no block is found, do we know how often the typical miner updates his block transaction list with new transactions from the mempool?

I found [a reference](https://github.com/bitcoin/bitcoin/blob/v0.9.3/src/miner.cpp#L624) which suggests that the default update time is 60 seconds, but I'm not sure what software the pools are using to generate their block transaction lists.

**Tags:** mining-pools, transaction-selection

> **Comments:**
> **username_1**: This question is similar, but the answer doesn't really answer your question: http://bitcoin.stackexchange.com/questions/3335/under-what-circumstances-would-a-server-submit-new-work-to-a-miner  

---

## 1 answers

### Answer by username_1 on 2014-12-06. Score: 3 | Accepted answer

Welcome to the site!

It depends on the protocol being used.

Some protocols have the pool dictate how often the list of transactions is updated, and others have it defined by the mining client.

### Stratum

In Stratum, the pool sends the miner a new merkle branch when it sees a new block or when a certain amount of time has passed. By default, it updates the list of transactions every [60 seconds](https://github.com/slush0/stratum-mining/blob/23ebc8506325ec4b8a60ce3c49cab96ae87c006b/conf/config_sample.py#L73).

Of course, this is only a default; a pool operator can change this.

### GBT

In getblocktemplate with longpoll, the pool sends new work on block change, or after 60 seconds. (For bitcoind, at least.)

```
// Wait to respond until either the best block changes, OR a minute has passed and there are more transactions
...
checktxtime = boost::get_system_time() + boost::posix_time::minutes(1);

```

[(Source)](https://github.com/bitcoin/bitcoin/blob/dbf1dc239ed88503299a6e89efaa7f82de8986c2/src/rpcmining.cpp#L442)

In getblocktemplate without longpoll, the miner looks for new work every so often. 'Every so often' is miner-defined.

cgminer does it every 60 seconds:

```
static void gen_gbt_work(struct pool *pool, struct work *work)
...
if (now.tv_sec - pool->tv_lastwork.tv_sec > 60)

```

[(Source)](https://github.com/ckolivas/cgminer/blob/1f85488262af9dd679b159aa07e35d3eca73bcaa/cgminer.c#L2033)

bfgminer is user-configurable, but defaults to 60 seconds:

```
--scan-time <arg>   Upper bound on time spent scanning current work, in seconds (default: 60)

```

[(Source)](https://github.com/luke-jr/bfgminer/blob/cb7bca09d02f62b3f4e039db468b3c51a5ac5960/README#L314)

### Conclusion

Changing work every after the network finds a new block and every 60 seconds is by far the most common way of doing things.

> **Comments:**
> **username_2**: The stratum protocol doesn't have a default interval to push new work. I think most pools use 30 seconds though.  
> **username_1**: `stratum protocol doesn't have a default interval to push new work` Technically, the Stratum protocol doesn't define how often you push new work. In practice, everyone uses slush's implementation, and slush's implementation does it, by default, every 60 seconds.  
> **username_0**: This is a really awesome answer username_1, and much more than I was hoping for.  
> **username_0**: I've been studying the 'min lead time' on transactions, which is the minimum time a tx pushed to the network needs to lead the block discovery time by, in order for it to have a chance at being included.   The results seem to agree with the 60s/30s update intervals you have described.   See [here](http://i.imgur.com/6Vxh9GT.png) for graphs of estimated min lead time. Credit is due to [organ of corti](http://organofcorti.blogspot.sg/) for the data.  
> **username_2**: Most pools have their own mining pool software, they don't use Slush's example implementation.  

---

