-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Favor bare binary-marshalling over length prefixed-marshalling #5799
Changes from all commits
c47055c
0ba8426
3144b47
6af1f7e
12fce22
81ecf2e
d967f26
950402e
9b5f9a5
3b7aecf
30add06
3900e4e
9907e62
f082fde
fbefe8a
5d0f1e2
e419105
67cbf19
57ad6ac
35b2ae4
b740903
82848ef
9ff06ed
f10ac70
98bd455
d235280
1f1cfac
4b3221b
e3e3605
3b9726f
8ff2f56
78f8b3d
9e845b7
ca25273
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,7 +124,7 @@ func (kb baseKeybase) DecodeSignature(info Info, msg []byte) (sig []byte, pub tm | |
return nil, nil, err | ||
} | ||
|
||
if err := CryptoCdc.UnmarshalBinaryLengthPrefixed([]byte(signed), sig); err != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry @jgimeno, I skimmed through and didn't realize you also updated the Keybase. The Keybase should not be updated because than that will break existing local wallets. Let's undo these. |
||
if err := CryptoCdc.UnmarshalBinaryBare([]byte(signed), sig); err != nil { | ||
return nil, nil, errors.Wrap(err, "failed to decode signature") | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -337,12 +337,12 @@ func (i multiInfo) GetPath() (*hd.BIP44Params, error) { | |
|
||
// encoding info | ||
func marshalInfo(i Info) []byte { | ||
return CryptoCdc.MustMarshalBinaryLengthPrefixed(i) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
return CryptoCdc.MustMarshalBinaryBare(i) | ||
} | ||
|
||
// decoding info | ||
func unmarshalInfo(bz []byte) (info Info, err error) { | ||
err = CryptoCdc.UnmarshalBinaryLengthPrefixed(bz, &info) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
err = CryptoCdc.UnmarshalBinaryBare(bz, &info) | ||
return | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.