Does Foundry construct block templates beyond the next block in case they mine two blocks consecutively?
I was once told, by someone who was involved in making this work, that most pools build 2 blocks in advance, by predicting which transactions are not going to be mined, and constantly update these predictive blocks
This mechanism was developed collaboratively in 2016, by several pools, and improved iteratively to reduce the incidence of invalid blocks
The issue with the delay at the start of mining a new block is not verification. It is ensuring that the candidate block does not contain any confirmed transactions. A pool can not build a candidate block from the mempool without removing the just-confirmed transactions from the mempool. But the pool can guess with a reasonably high certainty, by choosing lowest-fee-rate transactions for its initial candidate block
And then after 50 seconds or so, the pool replaces the initial block with a fee-optimized block
Jameson Lopp reviewed empty blocks a few years ago
https://blog.lopp.net/empty-bitcoin-blocks-full-mempool/
In that review, only ViaBTC was mining empty blocks, which implies all the other pools had implemented the next+2 mechanism
More recent observations indicate that other pools are now mining empty blocks