Why does the mined block differ so much from the block template? I am looking at the specific block at height 680175.
At the time when the block was not mined yet, I received the block template via bitcoin-cli getblocktemplate '{&quot;rules&quot;: [&quot;segwit&quot;]}' with 1451 transactions:
{
    &quot;capabilities&quot;: [
        &quot;proposal&quot;
    ],
    &quot;version&quot;: 536870912,
    &quot;rules&quot;: [
        &quot;csv&quot;,
        &quot;!segwit&quot;
    ],
    &quot;vbavailable&quot;: {},
    &quot;vbrequired&quot;: 0,
    &quot;previousblockhash&quot;: &quot;00000000000000000008465bf3145011298dddb04f026e077d8deb5b9ac5cf7f&quot;,
    &quot;transactions&quot;: [
        {
            &quot;data&quot;: &quot;..&quot;,
            &quot;txid&quot;: &quot;f0fcac28b1dec7b8e67f73229052639c58f7f175bdb87ea068f499a4728bb35d&quot;,
            &quot;hash&quot;: &quot;2a4aa6c2b5a6bee592e3690a843ee63b2598315da01954c05c4c0aa77d57af34&quot;,
            &quot;depends&quot;: [],
            &quot;fee&quot;: 160000,
            &quot;sigops&quot;: 5,
            &quot;weight&quot;: 953
        },
        ..,
        {
            &quot;data&quot;: &quot;..&quot;,
            &quot;txid&quot;: &quot;e0ae05fa82edb0dee7e9d11ca9471bf3ee1a90e19ac8abf1013511338613b814&quot;,
            &quot;hash&quot;: &quot;e0ae05fa82edb0dee7e9d11ca9471bf3ee1a90e19ac8abf1013511338613b814&quot;,
            &quot;depends&quot;: [],
            &quot;fee&quot;: 103950,
            &quot;sigops&quot;: 4,
            &quot;weight&quot;: 1388
        },
        ..,
        {
            &quot;data&quot;: &quot;..&quot;,
            &quot;txid&quot;: &quot;8d55bd874acea1fbc03b98e82d585c39021be083645dde83e8306171e32258d5&quot;,
            &quot;hash&quot;: &quot;8d55bd874acea1fbc03b98e82d585c39021be083645dde83e8306171e32258d5&quot;,
            &quot;depends&quot;: [],
            &quot;fee&quot;: 16425,
            &quot;sigops&quot;: 8,
            &quot;weight&quot;: 904
        }
    ],
    &quot;coinbaseaux&quot;: {},
    &quot;coinbasevalue&quot;: 745954254,
    &quot;longpollid&quot;: &quot;00000000000000000008465bf3145011298dddb04f026e077d8deb5b9ac5cf7f3670&quot;,
    &quot;target&quot;: &quot;0000000000000000000bef930000000000000000000000000000000000000000&quot;,
    &quot;mintime&quot;: 1619115663,
    &quot;mutable&quot;: [
        &quot;time&quot;,
        &quot;transactions&quot;,
        &quot;prevblock&quot;
    ],
    &quot;noncerange&quot;: &quot;00000000ffffffff&quot;,
    &quot;sigoplimit&quot;: 80000,
    &quot;sizelimit&quot;: 4000000,
    &quot;weightlimit&quot;: 4000000,
    &quot;curtime&quot;: 1619117253,
    &quot;bits&quot;: &quot;170bef93&quot;,
    &quot;height&quot;: 680175,
    &quot;default_witness_commitment&quot;: &quot;6a24aa21a9ed82637c9b63e2165105a672c4f6edcfa0187d961843a8d2b9c7a6bceeda109a65&quot;
}

When comparing the block template to the mined block, there are some differences:

The version of the mined block is 0x2fffe000 instead of 536870912.
Only 194 transactions from the block template are in the mined block, e.g. f0fcac28b1dec7b8e67f73229052639c58f7f175bdb87ea068f499a4728bb35d.  The other 1257 transactions are missing.

The transaction 8d55bd874acea1fbc03b98e82d585c39021be083645dde83e8306171e32258d5 was mined in a later block.
The transaction e0ae05fa82edb0dee7e9d11ca9471bf3ee1a90e19ac8abf1013511338613b814 was not mined at all.



Does anyone know how these differences can be explained?
What would have happened if a miner found a block hash for the received block template and submitted it? Would the mined block then have a different version and the missing transactions (including the transaction that was not even mined yet)?
The version of the mined block is 0x2fffe000 instead of 536870912.

Many miners employ a strategy known as overt Asicboost. This strategy requires modifying the version number like the nonce, so we often see blocks that have strange version numbers.

Only 194 transactions from the block template are in the mined block, e.g. f0fcac28b1dec7b8e67f73229052639c58f7f175bdb87ea068f499a4728bb35d. The other 1257 transactions are missing.

Each node has a different view of the set of unconfirmed transactions that depends on how long they have been running, where they are located, and any custom rules that they are using. It may be that your node has not been running for as long as the miner's node and so it has not seen all of the same transactions that the miner has seen. It may be that your node is using different rules than the miner is, possibly due to different versions of the same software, or possibly because some miners may be using custom software. Additionally, some miners offer a service where they will prioritize transactions after being paid out of band, so such transactions can end up in a block when they do not appear in a block template produced by your node.

What would have happened if a miner found a block hash for the received block template and submitted it? Would the mined block then have a different version and the missing transactions (including the transaction that was not even mined yet)?

There is no &quot;current template&quot; for the entire network. If there were, then there wouldn't need to be a blockchain as that would mean every node is actually in sync with every other node. As such, when a miner finds a block, they broadcast the block in full. When nodes receive a block, they verify it without creating their own block template. There are no requirements that the block contain the transactions a node expects it to contain. The only requirements are that the block contains valid transactions and that the block header is valid. Whether your node has seen those transactions before and whether it would include them itself are irrelevant.