Skip to content
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

docs: migration doc updates for 08-wasm v8 to v9 #6845

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/03-light-clients/04-wasm/03-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func NewSimApp(
ctx := app.BaseApp.NewUncachedContext(true, cmtproto.Header{})

// Initialize pinned codes in wasmvm as they are not persisted there
if err := ibcwasmkeeper.InitializePinnedCodes(ctx); err != nil {
if err := app.WasmClientKeeper.InitializePinnedCodes(ctx); err != nil {
cmtos.Exit(fmt.Sprintf("failed initialize pinned codes %s", err))
}
}
Expand Down
19 changes: 19 additions & 0 deletions docs/docs/03-light-clients/04-wasm/09-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@ slug: /ibc/light-clients/wasm/migrations

This guide provides instructions for migrating 08-wasm versions.

## From ibc-go v8.3.x to ibc-go v9.0.x

### Chains

- The `Initialize`, `Status`, `GetTimestampAtHeight`, `GetLatestHeight`, `VerifyMembership`, `VerifyNonMembership`, `VerifyClientMessage`, `UpdateState` and `UpdateStateOnMisbehaviour` functions in `ClientState` have been removed and all their logic has been moved to functions of the `LightClientModule`.
- The `MigrateContract` function has been removed from `ClientState`.
- The `VerifyMembershipMsg` and `VerifyNonMembershipMsg` payloads for `SudoMsg` have been modified. The `Path` field of both structs has been updated from `v1.MerklePath` to `v2.MerklePath`. The new `v2.MerklePath` field contains a `KeyPath` of `[][]byte` as opposed to `[]string`, see [23-commitment](../../05-migrations/13-v8-to-v9.md#23-commitment). This supports proving values stored under keys which contain non-utf8 encoded symbols. As a result, the JSON field `path` containing `key_path` of both messages will marshal elements as a base64 encoded bytestrings. This is a breaking change for 08-wasm client contracts and they should be migrated to correctly support deserialisation of the `v2.MerklePath` field.
- The `ExportMetadataMsg` struct has been removed and is no longer required for contracts to implement. Core IBC will handle exporting all key/value's written to the store by a light client contract.
- The `ZeroCustomFields` interface function has been removed from the `ClientState` interface. Core IBC only used this function to set tendermint client states when scheduling an IBC software upgrade. The interface function has been replaced by a type assertion.
- The `MaxWasmByteSize` function has been removed in favor of the `MaxWasmSize` constant.
- The `HasChecksum`, `GetAllChecksums` and `Logger` functions have been moved from the `types` package to a method on the `Keeper` type in the `keeper` package.
- The `InitializePinnedCodes` function has been moved to a method on the `Keeper` type in the `keeper` package.
- The `CustomQuerier`, `StargateQuerier` and `QueryPlugins` types have been moved from the `types` package to the `keeper` package.
- The `NewDefaultQueryPlugins`, `AcceptListStargateQuerier` and `RejectCustomQuerier` functions has been moved from the `types` package to the `keeper` package.
- The `NewDefaultQueryPlugins` function signature has changed to take an argument: `queryRouter ibcwasm.QueryRouter`.
DimitrisJim marked this conversation as resolved.
Show resolved Hide resolved
- The `AcceptListStargateQuerier` function signature has changed to take an additional argument: `queryRouter ibcwasm.QueryRouter`.
- The `WithQueryPlugins` function signature has changed to take in the `QueryPlugins` type from the `keeper` package (previously from the `types` package).
- The `VMGasRegister` variable has been moved from the `types` package to the `keeper` package.

## From v0.2.0+ibc-go-v8.3-wasmvm-v2.0 to v0.3.0-ibc-go-v8.3-wasmvm-v2.0

### Contract developers
Expand Down
6 changes: 2 additions & 4 deletions docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewMsgTransfer(
- The helper function [`GetDenomPrefix`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L35) has been removed.
- The helper function [`GetPrefixedDenom`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/coin.go#L40) has been removed. Please construct the denom using the new [`Denom` type](https://github.com/cosmos/ibc-go/blob/7068760f7277cab75b760a0d6ca95ccbfe2f78ae/modules/apps/transfer/types/token.pb.go#L82).

### `DenomTrace` type
#### `DenomTrace` type

- The [`DenomTrace`](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/types/transfer.pb.go#L25-L33) type has been made private and will be completely removed in a later release.
- The [`DenomTrace` and `DenomTraces` gRPCs](https://github.com/cosmos/ibc-go/blob/v8.0.0/modules/apps/transfer/keeper/grpc_query.go#L22-L75) have therefore been removed as well. Please use the [`Denom` type](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/types/token.pb.go#L81-L87) instead, and the [`Denom` and `Denoms` gRPCs](https://github.com/cosmos/ibc-go/blob/14fedae884e541779eefd01fc4aab5fe194856bc/modules/apps/transfer/keeper/grpc_query.go#L27-L80).
Expand Down Expand Up @@ -210,9 +210,7 @@ The `IterateConsensusMetadata` function has been removed.

### 08-wasm

- The `VerifyMembershipMsg` and `VerifyNonMembershipMsg` payloads for `SudoMsg` have been modified. The `Path` field of both structs has been updated from `v1.MerklePath` to `v2.MerklePath`. The new `v2.MerklePath` field contains a `KeyPath` of `[][]byte` as opposed to `[]string`, see [23-commitment](#23-commitment). This supports proving values stored under keys which contain non-utf8 encoded symbols. As a result, the JSON field `path` containing `key_path` of both messages will marshal elements as a base64 encoded bytestrings. This is a breaking change for 08-wasm client contracts and they should be migrated to correctly support deserialisation of the `v2.MerklePath` field. See [08-wasm migrations](../03-light-clients/04-wasm/09-migrations.md) for more information.
- The `ExportMetadataMsg` struct has been removed and is no longer required for contracts to implement. Core IBC will handle exporting all key/value's written to the store by a light client contract.
- The `ZeroCustomFields` interface function has been removed from the `ClientState` interface. Core IBC only used this function to set tendermint client states when scheduling an IBC software upgrade. The interface function has been replaced by a type assertion.
Refer to the [08-wasm migrations](../03-light-clients/04-wasm/09-migrations.md) for more information.

### 09-localhost

Expand Down
Loading