ibc-go icon indicating copy to clipboard operation
ibc-go copied to clipboard

Solo machines need to proto-marshal a `MerklePath` when submitting misbehaviour

Open crodriguezvega opened this issue 2 years ago • 2 comments

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

crodriguezvega avatar Sep 26 '23 14:09 crodriguezvega

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 avatar Dec 12 '23 04:12 expertdicer

@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.

crodriguezvega avatar Mar 19 '24 13:03 crodriguezvega