The getblocktemplate is designed for miners, and is constructed from the local mempool. All miners necessarily need a validating full-node to provide them with unconfirmed, valid transactions.
The mempool differs from one node to the other, and this may not be so relevant for merchants or individuals validating transactions, but this is highly relevant for miners, increasingly so as the transaction fee part of the block reward increases over time.
The sooner your node is able to accept new valid transactions, the more efficiently you can mine for blocks with the highest fees. The blocktemplate function reflects this. A well-connected node will produce block templates optimised with better fees than one that only has a subset of the transaction mempool.
Some may argue that transactions make up only a small part of the miner reward, and in some cases today mining empty blocks may be worth the extra hashing time that would otherwise be idling whilst the most optimal block template is constructed. This may be true today, but the system security rests on the incentive of miners to confirm a given transaction. This is the confirmation fee-market between users and miners.
If miner rewards solely consisted of subsidy (inflation), there would be no opportunity cost to censorship, and therefore the system security would be zero. Therefore, a system that allows data to propagate across mempools as efficiently as possible, facilitating the creation of the most rewarding block templates is highly relevant for the confirmation fee-market to function efficiently.
thanks, Im runnung a full node, with command
getblocktemplateI get always the same bits o target since 1 week. I have the update the mempool? – monkeyUser – 2019-01-11T10:54:37.4331The “bits” is the difficulty of the block, which is updated every 2 weeks. This is unrelated to the men pool. – Anonymous – 2019-01-11T11:02:08.353
thanks, then the mempool auto-update every 2 weeks? Txs and bits ? or Txs update every time a new block created from the network ? – monkeyUser – 2019-01-11T11:06:42.607
1No the mempool updates whenever a new valid transaction is accepted, which originated from a connected node. The difficulty adjusts every 2016 blocks, to be precise, not every 2 weeks. – James C. – 2019-01-11T12:14:04.157
Your mempool state will definitely affect your income as a miner, see answer below. – James C. – 2019-01-11T12:16:25.613
If the difficulty adjustment occured every two weeks, there would never be an adjustment, and hashrate globally would need to be fixed, which is an impossibility. – James C. – 2019-01-11T12:17:49.520
It’s a close enough approximation though. – Anonymous – 2019-01-11T12:18:28.543
I know what u mean, but it masks the reason why the diff adjustment exists. It exists SO that 2016 blocks occur every approx 2 weeks. – James C. – 2019-01-11T12:29:32.410
@JamesC. the mempool updated means evend remove transactions confirmed in the tip block and add the new tx unconfirmed? – monkeyUser – 2019-01-11T13:24:09.790
Correct. All transactions confirmed in blocks are removed from the mempool. And new unconfirmed ones added. Mempool is a misleading term, because it doesnt have to be in memory. The only differentiation needed to be made are confirmed (in blocks of the strong chain) and unconfirmed (valid, not in blocks of the steong chain). You could call the mempool all valid unconfirmed transactions your node has seen so far. – James C. – 2019-01-11T13:26:53.877