-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue/Bug with PSBT deserialization #2199
Comments
Nice find! This should be easy enough to fix. |
guggero
added a commit
to guggero/btcd
that referenced
this issue
Jun 25, 2024
Fixes btcsuite#2199. Previous to this fix the keytype was only interpreted as a single byte, even though BIP-0174 states it is to be parsed as a CompactSize/VarInt.
btcfind
pushed a commit
to btcfind/btcd
that referenced
this issue
Sep 26, 2024
Fixes btcsuite#2199. Previous to this fix the keytype was only interpreted as a single byte, even though BIP-0174 states it is to be parsed as a CompactSize/VarInt.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
BTCD does not fail as it should when trying to deserialize the following bytes:
70736274ff01001c000000000002000000000000000000000000736210ff01000001010010ff70ff01001c00000000000000000000000000000000000000000000
For the above input, Bitcoin-core fails while trying to deserialize and throws the error
ReadCompactSize(): size too large
.This issue partly seems to be due to incorrect implementation of bip-174. Bip-174 says that
keytype
is acompact size int
and from what I see btcd simply treatskeytype
as a single byte.The test case given below can be used to reproduce this issue:
cc: @brunoerg
The text was updated successfully, but these errors were encountered: