-
Notifications
You must be signed in to change notification settings - Fork 625
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
Wrong URL encoded path used in solomachine client. #4128
Comments
Hi @en. Thanks for opening the issue. I just have a couple of questions:
|
Hi @crodriguezvega, I mean the paths specified in ICS 04. ibc-go/modules/light-clients/06-solomachine/client_state.go Lines 135 to 140 in db25dc5
We(Octopus Network) are implementing ICS 06 based on ibc-rs. These paths have to be consistent on both sides so they can be validated by ibc-go. Although there are some definitions of paths in ibc-rs( https://github.com/cosmos/ibc-rs/blob/v0.28.0/crates/ibc/src/core/ics24_host/path.rs#L49-L54 ), we construct them manually into the escaped form(/path%2Fto%2Fleaf) to pass the validation. So my question is: |
I don't think spec specifies this? Either way, I wasn't around for solomachine to hopefully remember something. It might be worth noting that paths appear to be unescaped in the tendermint light client tho. |
Hi @en, thanks for raising the issue! This is certainly behaviour that slipped our attention. The side-effect of The switch to including the merkle path in the sign bytes occurred in v7. It appears at the moment no solo machine users are on v7, so we could retroactively fix the issue. My recommendation to the team would be to:
The solo machine does not have a multi tree structure. It should only signs over the ics24 paths expected. The connection prefix is unnecessary as solo machine clients also have a diversifer they sign over (which should logically separate a solo machines private key usage between chains/connections) Would this match your implementation @en? |
@en we have opened this PR with this change from @colin-axner's proposal above:
We are planning to release this change in v7.3.0 (target release date: 1st September). The other items will be tackled in a follow-up PR. |
Sorry for the late reply. |
Great to hear. Thanks for coming back to us! |
…rklePath` (#4459) ## Description Second part of #4128. First part was #4429. closes: #4128 ### Commit Message / Changelog Entry ```bash fix(api)!: remove `Pretty` and `String` custom implementations of `MerklePath` ``` see the [guidelines](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) for commit messages. (view raw markdown for examples) --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#pull-request-targeting)). - [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/main/docs/docs/building-modules/11-structure.md) and [Go style guide](../docs/dev/go-style-guide.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/main/testing/README.md#ibc-testing-package). - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`). - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Provide a [commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to be used for the changelog entry in the PR description for review. - [x] Re-reviewed `Files changed` in the Github PR explorer. - [ ] Review `Codecov Report` in the comment section below once CI passes.
Summary of Bug
ibc-go/modules/light-clients/06-solomachine/client_state.go
Line 139 in db25dc5
The String() method returns a URL encoded path (like this: "/path%2Fto%2Fleaf"), which is not consistent with spec and other implementations (e.g. ibc-rs)
Expected Behaviour
Should use path.Pretty() here.
Version
Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: