4

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

1

1 Answer 1

3

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.

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)

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)

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)

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.

5
  • The stratum protocol doesn't have a default interval to push new work. I think most pools use 30 seconds though.
    – Dr.Haribo
    Commented Dec 7, 2014 at 0:46
  • 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
    Commented Dec 7, 2014 at 1:11
  • This is a really awesome answer Nick, and much more than I was hoping for.
    – btcee99
    Commented Dec 7, 2014 at 2:12
  • 1
    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 for graphs of estimated min lead time. Credit is due to organ of corti for the data.
    – btcee99
    Commented Dec 7, 2014 at 2:21
  • Most pools have their own mining pool software, they don't use Slush's example implementation.
    – Dr.Haribo
    Commented Dec 7, 2014 at 9:15

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.