You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 a compact size int and from what I see btcd simply treats keytypeas a single byte.
The test case given below can be used to reproduce this issue:
funcTestKeyType(t*testing.T) {
k, _:=hex.DecodeString("70736274ff01001c000000000002000000000000000000000000736210ff01000001010010ff70ff01001c00000000000000000000000000000000000000000000")
if_, err:=NewFromRawBytes(bytes.NewReader(k), false); err==nil {
require.Error(t, err, "Err should not be nil")
}
}
Fixesbtcsuite#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.
Fixesbtcsuite#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.
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: