ibc-go
ibc-go copied to clipboard
Solo machines need to proto-marshal a `MerklePath` when submitting misbehaviour
Summary of Bug
Solo machines are currently expected to proto-marshal the path over which data is signed when submitting misbehaviour.
Expected Behaviour
The path should not be a proto-marshalled commitmenttypes.MerklePath. A byte representation of the path string should be enough.
Version
All versions.
For Admin Use
- [x] Not duplicate issue
- [x] Appropriate labels applied
- [ ] Appropriate contributors tagged/assigned
You meant to replace
if err := cdc.Unmarshal(sigAndData.Path, new(commitmenttypes.MerklePath)); err != nil {
return err
}
with something like
if merklePath, ok := path.(commitmenttypes.MerklePath); err != nil {
return err
}
?
@expertdicer Sorry for the late reply; I had missed this comment till now... Actually what needs to be done is to just remove this code. The path should just be the byte representation of a string, just like what we expect when we do membership verification, for example. It would be also great if you could also add some tests for this, because I believe at the moment if the un-marshalling is removed no test will break.
It would be nice to do change early on, so that ibc-go becomes compliant with the spec. We will communicate this change to existing solomachine implementations, so that they are aware and can adjust accordingly.