I observed that if I send a packet data or ack consisting of []byte{}, then the relayer cannot relay it. Sorry, but I don't have exact logs here.
This is consistent with an observation I made a while ago. Amino, and Proto3 both can't round-trip an empty slice.
type MyStruct struct {
Data []byte
}
Marshalling and unmarshalling the following:
ms := MyStruct{
Data: []byte{},
}
Results in:
MyStruct{
Data: nil,
}
Special treatment is needed to accommodate these empty values (replacing nil slices with empty slices before signing and after deserialising before verifying).
I don't know if I'll get to this for a while, but I thought I'd at least put it on people's radar.
I observed that if I send a packet data or ack consisting of
[]byte{}
, then the relayer cannot relay it. Sorry, but I don't have exact logs here.This is consistent with an observation I made a while ago. Amino, and Proto3 both can't round-trip an empty slice.
Marshalling and unmarshalling the following:
Results in:
Special treatment is needed to accommodate these empty values (replacing
nil
slices with empty slices before signing and after deserialising before verifying).I don't know if I'll get to this for a while, but I thought I'd at least put it on people's radar.
Thanks, Michael.