user32356: At some point in 2011/12 miners started using custom mining algorithms ignoring the best practise to mine to a different new public key (hash) for each subsequent block. This lead to a lack of uniqueness of the coinbase transaction id and destroyed some bitcoins forever.
So it became mandatory with BIP34/v2 blocks to put the height of a block in a special encoded format into the coinbase transaction's input "script".
But why not use existing datastructures like the coinbase transaction's very own locktime field?

user208: That would have made perfect sense, and I see no reason why that wouldn't have been the superior way of doing it.
However, as far as I remember, nobody suggested this at the time.

32356: <p>At some point in 2011/12 miners started using custom mining algorithms ignoring the best practise to mine to a different new public key (hash) for each subsequent block. This lead to a lack of uniqueness of the coinbase transaction id and <a href="https://bitcoin.stackexchange.com/a/38998/32356">destroyed some bitcoins forever</a>.</p>

<p>So it became mandatory with BIP34/v2 blocks to put the height of a block in a special encoded format into the coinbase transaction's input "script".</p>

<p>But why not use existing datastructures like the coinbase transaction's very own locktime field?</p>
 208: <p>That would have made perfect sense, and I see no reason why that wouldn't have been the superior way of doing it.</p>

<p>However, as far as I remember, nobody suggested this at the time.</p>
