1

In my understanding, Stratum V2 can help avoid "empty" blocks (ref A, ref B), as most of the information can be distributed ahead of time, i.e. before the next block is mined.

To avoid confusion, I'd like to make some assumptions:

  • The "next block" is the one following the current chain tip. It is not mined, yet - but it will be mined soon.
  • The block template is created for the block following the "next block".
  • I'll name the template's block "grandchild block", as it is the grandchild of the current chain tip. The "next block" then can also be seen as the "child block".

I don't see how the template for the grandchild block is computed, i.e. which transactions it contains. In theory, the next block may contain arbitrary transactions, including those that conflict with whatever one tries to use in the new template.

Are grandchild block templates only used if the next block is found by the same pool? If mining pool X finds the next block, it's easy to have a template for the grandchild block at hand. However, if the next block is found by someone else, its contents must be assumed to be unknown.

Do miners already create grandchild block templates containing "safe" transactions, e.g. those spending from previously time-locked outputs, or transactions created by the miners themselves which may be assumed to be non-conflicting?

C-Otto
  • 442
  • 2
  • 12
  • The question about constructing a grand-child template with safe transactions is interesting. But what does Stratum V2 has to do with this? You start your post with "Stratum V2 can help avoid "empty" blocks" but in the middle of the post you correctly point out you can't have a grand-child template if the next block was mined by another pool. In this case, for the time before you receive the block and validate it, you either stop mining or mine an empty block. Stratum V2 doesn't change this, does it? – Antoine Poinsot Dec 13 '23 at 09:05
  • That's part of my confusion. Here's a website that tries to answer our questions, but I'm still left confused: https://braiins.com/stratum-v2#empty – C-Otto Dec 13 '23 at 09:06
  • 1
    I think it's a different incentive to use empty block that's mentioned in this link. It's not the incentive of the pool to make its miners mine an empty block until it itself has received the block and validated it. It's how before StratumV2 the pool had an incentive to at first only send the prevhash to its miners even if it had a valid template because it would arrive faster. If that answers your question i can post an answer along these lines. – Antoine Poinsot Dec 13 '23 at 09:16

1 Answers1

3

A mining pool may provide an empty block template to its miners for block n+1 once it has been announced a valid header for block n but hasn't received yet the whole block n. This is also known as SPV mining and allows the pool to not be idle for the time it receives and validate the whole block.

The doc you link claims another reason for empty blocks is how the Stratum V1 protocol made it possible for pools to reduce the latency of the communication with their miners by first providing them the hash of the previous block before providing the whole block. This created another incentive for mining empty blocks. It then explains how Stratum v2 aims to fix this. (Which isn't really clear, the proposed fix seems.. Risky.)

I think your confusion stems from the ambiguity between the two incentives for mining empty block, which the doc seems to be surfing on by only mentioning the second one. Stratum v2 is only about the communication between a pool and its miners. It only claims to fix the second incentive to mine empty blocks, not the first (arguably more fundamental) one.

To be fair the blog post you also link does mention why it doesn't consider the first incentive, but it quickly brushes it away by mentioning how transaction fees are becoming a greater part of the block reward. While true, fees are still a very minor share of the block reward. And they were even more so in 2020 when the post was written (about 2-3% in the year before)! In any case the conclusion in the doc is quite misleading indeed:

Given that there is no advantage to mining on an empty block vs. a full block with Stratum V2, empty block mining should effectively be eliminated.

Antoine Poinsot
  • 8,334
  • 2
  • 17
  • 34