# Disclosure: Btcd consensus bugs due to usage of signed transaction version

**URL:** <https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455>\
**Category:** Implementation\
**Created:** [January 22, 2024, 2:51pm UTC](https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455 "2024-01-22T14:51:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Chris\_Stewart\_5](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/chris_stewart_5/32/296_2.png) [@Chris\_Stewart\_5](https://delvingbitcoin.org/u/Chris_Stewart_5)\
**Post date:** [January 22, 2024, 2:59pm UTC](https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455/2 "2024-01-22T14:59:12Z")

</div>

Here is a PR to add a static test vector that tests this logic in bitcoin core:

> <https://github.com/bitcoin/bitcoin/pull/29291>
>
> This PR adds a static test vector corresponding to the bug found in various impl…ementations of the bitcoin protocol discovered by @dergoegge 
> 
> For more information see:
> 
> https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455

Here is what the patch looks like to fix this in bitcoin-s:

> <https://github.com/bitcoin-s/bitcoin-s/pull/5346>
>
> Fixes bug in the \`LocktimeInterpreter\` where we weren't converting the transacti…on version from \`Int32\` -\> \`UInt32\` as stated in \[BIP68\](https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki) and \[112\](https://github.com/bitcoin/bips/blob/master/bip-0112.mediawiki).
> 
> \<img width="805" alt="Screenshot 2024-01-11 at 5 01 43 PM" src="https://github.com/bitcoin-s/bitcoin-s/assets/3514957/07906f7a-446b-4266-bd63-3d51221d5f31"\>

---

_[View the full topic](https://delvingbitcoin.org/t/disclosure-btcd-consensus-bugs-due-to-usage-of-signed-transaction-version/455)._
