This PR adds a static test vector corresponding to the bug found in various implementations of the bitcoin protocol discovered by dergoegge
For more information see:
This PR adds a static test vector corresponding to the bug found in various implementations of the bitcoin protocol discovered by dergoegge
For more information see:
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For detailed information about the code coverage, see the test coverage report.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
ACK 97181decf5726aab6c5cd01b3e1964072f2531ff
ACK 97181decf5726aab6c5cd01b3e1964072f2531ff
ACK. Somewhat surprisingly, decoderawtransaction is showing a positive version number:
% ./src/bitcoin-cli decoderawtransaction "ffffffff01000100000000000000000000000000000000000000000000000000000000000000000000030251b2010000000100000000000000000000000000"
{
"txid": "d3230b80abeab3cf6c1c0f1c55c3694545146b1936348476bf3646276af83d38",
"hash": "d3230b80abeab3cf6c1c0f1c55c3694545146b1936348476bf3646276af83d38",
"version": 4294967295,
"size": 63,
"vsize": 63,
"weight": 252,
"locktime": 0,
"vin": [
{
"txid": "0000000000000000000000000000000000000000000000000000000000000100",
"vout": 0,
"scriptSig": {
"asm": "-12881",
"hex": "0251b2"
},
"sequence": 1
}
],
"vout": [
{
"value": 0.00000000,
"n": 0,
"scriptPubKey": {
"asm": "",
"desc": "raw()#58lrscpx",
"hex": "",
"type": "nonstandard"
}
}
]
}
There's this note in TxToUniv().
(Edit: pasted wrong terminal output)
ACK. Somewhat surprisingly, decoderawtransaction is showing a positive version number:
From 2019 onwards, bitcoind started to display transactions versions (on the RPC layer) as unsigned everywhere: #16525
Interestingly, prior to that in 2018, an attempt was made to do the same, but rejected under the basis that it's actually signed everywhere with one exception: #12430 (comment)
This bitcoind PR that merged was prompted by a rust-bitcoin issue pointing out they were using a u32 instead of a i32 for their transaction struct: https://github.com/rust-bitcoin/rust-bitcoin/issues/287