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?