BIP54 proposes contraining the cointbase transaction nLockTime and nSequence fields. Our internal mining code has been doing this since #32155, but currently the fields are only communicated to IPC clients (see e.g. #33819).
This PR extends the getblocktemplate RPC to provide these fields.
Additionally it adds the nVersion field. Although unrelated to BIP54, it’s trivial to add and makes getblocktemplate now cover all coinbase transaction fields.
Accompanying proposed extension to BIP54: https://github.com/bitcoin/bips/pull/2097
Even if BIP54 never activates, it makes sense to serve these new fields.