Skip to content

Commit

Permalink
chore: improve DenomTrace grpc (backport cosmos#1342) (cosmos#1504)
Browse files Browse the repository at this point in the history
* chore: improve DenomTrace grpc (cosmos#1342)

* change DenomTrace grpc

* update CHANGELOG.md

* minor

* minor

* minor

* minor

* minor

* minor

* Update modules/apps/transfer/keeper/grpc_query_test.go

Co-authored-by: Carlos Rodriguez <[email protected]>

* Update modules/apps/transfer/keeper/grpc_query_test.go

Co-authored-by: Carlos Rodriguez <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Damian Nolan <[email protected]>

* use TrimPrefix() in DenomTrace()

* update migration doc

Co-authored-by: Carlos Rodriguez <[email protected]>
Co-authored-by: Damian Nolan <[email protected]>
(cherry picked from commit 23e7e7d)

* fix conflicts

Co-authored-by: khanh <[email protected]>
Co-authored-by: crodriguezvega <[email protected]>
  • Loading branch information
3 people authored and dudong2 committed Jan 19, 2023
1 parent 7984678 commit 290f568
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
31 changes: 31 additions & 0 deletions docs/migrations/v3-to-v4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Migrating from ibc-go v3 to v4

This document is intended to highlight significant changes which may require more information than presented in the CHANGELOG.
Any changes that must be done by a user of ibc-go should be documented here.

There are four sections based on the four potential user groups of this document:
- Chains
- IBC Apps
- Relayers
- IBC Light Clients

**Note:** ibc-go supports golang semantic versioning and therefore all imports must be updated to bump the version number on major releases.
```go
github.com/cosmos/ibc-go/v3 -> github.com/cosmos/ibc-go/v4
```

No genesis or in-place migrations required when upgrading from v1 or v2 of ibc-go.

## Chains

### IS04 - Channel

The `WriteAcknowledgement` API now takes the `exported.Acknowledgement` type instead of passing in the acknowledgement byte array directly.
This is an API breaking change and as such IBC application developers will have to update any calls to `WriteAcknowledgement`.

The `OnChanOpenInit` application callback has been modified.
The return signature now includes the application version as detailed in the latest IBC [spec changes](https://github.com/cosmos/ibc/pull/629).

## Relayers

When using the `DenomTrace` gRPC, the full IBC denomination with the `ibc/` prefix may now be passed in.
6 changes: 3 additions & 3 deletions modules/apps/transfer/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
// GetCmdQueryDenomTrace defines the command to query a a denomination trace from a given trace hash or ibc denom.
func GetCmdQueryDenomTrace() *cobra.Command {
cmd := &cobra.Command{
Use: "denom-trace [hash]",
Short: "Query the denom trace info from a given trace hash",
Long: "Query the denom trace info from a given trace hash",
Use: "denom-trace [hash/denom]",
Short: "Query the denom trace info from a given trace hash or ibc denom",
Long: "Query the denom trace info from a given trace hash or ibc denom",
Example: fmt.Sprintf("%s query ibc-transfer denom-trace 27A6394C3F9FF9C9DCF5DFFADF9BB5FE9A37C7E92B006199894CF1824DF9AC7C", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down

0 comments on commit 290f568

Please sign in to comment.