从 ibc-go v8.4.x 升级到 ibc-go v9.0.x
链
ClientState中的Initialize、Status、GetTimestampAtHeight、GetLatestHeight、VerifyMembership、VerifyNonMembership、VerifyClientMessage、UpdateState和UpdateStateOnMisbehaviour函数已被移除,其全部逻辑已迁移到LightClientModule的函数中。MigrateContract函数已从ClientState中移除。SudoMsg的VerifyMembershipMsg和VerifyNonMembershipMsg负载已修改。两个结构体的Path字段已从v1.MerklePath更新为v2.MerklePath。新的v2.MerklePath字段包含KeyPath,其类型为[][]byte,而不是[]string。这支持对存储在包含非 UTF-8 编码符号的键下的值进行证明。因此,这两个消息中包含key_path的 JSON 字段path在序列化时会将各元素编码为 base64 字节串。对于 08-wasm 客户端合约,这是一个破坏性变更,应迁移以正确支持v2.MerklePath字段的反序列化。ExportMetadataMsg结构体已被移除,合约不再需要实现它。Core IBC 将负责导出轻客户端合约写入存储的所有键值对。ZeroCustomFields接口函数已从ClientState接口中移除。Core IBC 过去仅在调度 IBC 软件升级时使用该函数来设置 tendermint 客户端状态。该接口函数现已由类型断言替代。MaxWasmByteSize函数已移除,改为使用MaxWasmSize常量。HasChecksum、GetAllChecksums和Logger函数已从types包移动到keeper包中Keeper类型的方法。InitializePinnedCodes函数已移动到keeper包中Keeper类型的方法。CustomQuerier、StargateQuerier和QueryPlugins类型已从types包移动到keeper包。NewDefaultQueryPlugins、AcceptListStargateQuerier和RejectCustomQuerier函数已从types包移动到keeper包。NewDefaultQueryPlugins函数签名已变更,新增参数:queryRouter ibcwasm.QueryRouter。AcceptListStargateQuerier函数签名已变更,新增一个参数:queryRouter ibcwasm.QueryRouter。WithQueryPlugins函数签名已变更,现在接收来自keeper包的QueryPlugins类型(此前来自types包)。VMGasRegister变量已从types包移动到keeper包。
从 v0.3.0+ibc-go-v8.3-wasmvm-v2.0 升级到 v0.4.1-ibc-go-v8.4-wasmvm-v2.0
合约开发者
合约开发者需要更新SudoMsg 负载 VerifyMembershipMsg 和 VerifyNonMembershipMsg 的 JSON API 消息结构。
这两个 JSON API 消息中的 path 字段已重命名为 merkle_path。
现有 08-wasm 客户端合约需要执行迁移,以正确处理这些字段的反序列化。
从 v0.2.0+ibc-go-v7.3-wasmvm-v1.5 升级到 v0.3.1-ibc-go-v7.4-wasmvm-v1.5
合约开发者
合约开发者需要更新SudoMsg 负载 VerifyMembershipMsg 和 VerifyNonMembershipMsg 的 JSON API 消息结构。
这两个 JSON API 消息中的 path 字段已重命名为 merkle_path。
现有 08-wasm 客户端合约需要执行迁移,以正确处理这些字段的反序列化。
从 v0.2.0+ibc-go-v8.3-wasmvm-v2.0 升级到 v0.3.0-ibc-go-v8.3-wasmvm-v2.0
合约开发者
面向 ibc-gov8.3.x 及以上版本的 08-wasm v0.3.0 发布为客户端合约开发者引入了一项破坏性变更。
合约 API SudoMsg 负载 VerifyMembershipMsg 和 VerifyNonMembershipMsg 已被修改。
两个结构体的 Path 字段编码已从 v1.MerklePath 更新为 v2.MerklePath,以支持对存储在包含非 UTF-8 编码符号的键下的值进行证明。
因此,Path 字段现在包含一个由 key_path 组成的 MerklePath,其类型为 [][]byte,而不是 []string。VerifyMembershipMsg 和 VerifyNonMembershipMsg 两个结构体中包含 key_path 的 JSON 字段 path 现在会将各元素序列化为 base64 编码的字节串。下面给出 JSON 差异示例。
key_path 从 []string 到 [][]byte 的反序列化。
合约开发者应了解 08-wasm 在此处提供的迁移路径。
客户端合约中所需变更的示例如下:
cosmwasm_std 文档。
从 v0.1.1+ibc-go-v7.3-wasmvm-v1.5 升级到 v0.2.0-ibc-go-v7.3-wasmvm-v1.5
合约开发者
面向 ibc-gov7.6.x 及以上版本的 08-wasm v0.2.0 发布为客户端合约开发者引入了一项破坏性变更。
合约 API SudoMsg 负载 VerifyMembershipMsg 和 VerifyNonMembershipMsg 已被修改。
两个结构体的 Path 字段编码已从 v1.MerklePath 更新为 v2.MerklePath,以支持对存储在包含非 UTF-8 编码符号的键下的值进行证明。
因此,Path 字段现在包含一个由 key_path 组成的 MerklePath,其类型为 [][]byte,而不是 []string。VerifyMembershipMsg 和 VerifyNonMembershipMsg 两个结构体中包含 key_path 的 JSON 字段 path 现在会将各元素序列化为 base64 编码的字节串。下面给出 JSON 差异示例。
key_path 从 []string 到 [][]byte 的反序列化。
合约开发者应了解 08-wasm 在此处提供的迁移路径。
客户端合约中所需变更的示例如下:
cosmwasm_std 文档。
从 ibc-go v7.3.x 升级到 ibc-go v8.0.x
链
在 v7 发布线中,与 ibc-go v7.3.x 及以上兼容的 08-wasm 版本里,上传的 Wasm 字节码校验和都存储在单个键下。自 ibc-go v8.0.x 起,校验和改为使用collections.KeySet 存储,其完整功能在 Cosmos SDK v0.50 中才可用。因此,08-wasm 模块中配置了一个自动迁移处理器,用于将已存储的校验和迁移到 collections.KeySet。
从 v0.1.0+ibc-go-v8.0-wasmvm-v1.5 升级到 v0.2.0-ibc-go-v8.3-wasmvm-v2.0
WasmEngine 接口已更新,以反映 Wasm VM 函数签名的变化:
MockWasmEngine 接口中的函数也需要进行类似修改。
链
WasmConfig 的 SupportedCapabilities 字段现在的类型为 []string:
This guide provides instructions for migrating 08-wasm versions. Please note that the following releases are retracted. Please refer to the appropriate migrations section for upgrading.
From ibc-go v8.4.x to ibc-go v9.0.x
Chains
- The
Initialize,Status,GetTimestampAtHeight,GetLatestHeight,VerifyMembership,VerifyNonMembership,VerifyClientMessage,UpdateStateandUpdateStateOnMisbehaviourfunctions inClientStatehave been removed and all their logic has been moved to functions of theLightClientModule. - The
MigrateContractfunction has been removed fromClientState. - The
VerifyMembershipMsgandVerifyNonMembershipMsgpayloads forSudoMsghave been modified. ThePathfield of both structs has been updated fromv1.MerklePathtov2.MerklePath. The newv2.MerklePathfield contains aKeyPathof[][]byteas opposed to[]string. This supports proving values stored under keys which contain non-utf8 encoded symbols. As a result, the JSON fieldpathcontainingkey_pathof 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 thev2.MerklePathfield. - The
ExportMetadataMsgstruct 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
ZeroCustomFieldsinterface function has been removed from theClientStateinterface. 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
MaxWasmByteSizefunction has been removed in favor of theMaxWasmSizeconstant. - The
HasChecksum,GetAllChecksumsandLoggerfunctions have been moved from thetypespackage to a method on theKeepertype in thekeeperpackage. - The
InitializePinnedCodesfunction has been moved to a method on theKeepertype in thekeeperpackage. - The
CustomQuerier,StargateQuerierandQueryPluginstypes have been moved from thetypespackage to thekeeperpackage. - The
NewDefaultQueryPlugins,AcceptListStargateQuerierandRejectCustomQuerierfunctions has been moved from thetypespackage to thekeeperpackage. - The
NewDefaultQueryPluginsfunction signature has changed to take an argument:queryRouter ibcwasm.QueryRouter. - The
AcceptListStargateQuerierfunction signature has changed to take an additional argument:queryRouter ibcwasm.QueryRouter. - The
WithQueryPluginsfunction signature has changed to take in theQueryPluginstype from thekeeperpackage (previously from thetypespackage). - The
VMGasRegistervariable has been moved from thetypespackage to thekeeperpackage.
From v0.3.0+ibc-go-v8.3-wasmvm-v2.0 to v0.4.1-ibc-go-v8.4-wasmvm-v2.0
Contract developers
Contract developers are required to update their JSON API message structure for theSudoMsg payloads VerifyMembershipMsg and VerifyNonMembershipMsg.
The path field on both JSON API messages has been renamed to merkle_path.
A migration is required for existing 08-wasm client contracts in order to correctly handle the deserialisation of these fields.
From v0.2.0+ibc-go-v7.3-wasmvm-v1.5 to v0.3.1-ibc-go-v7.4-wasmvm-v1.5
Contract developers
Contract developers are required to update their JSON API message structure for theSudoMsg payloads VerifyMembershipMsg and VerifyNonMembershipMsg.
The path field on both JSON API messages has been renamed to merkle_path.
A migration is required for existing 08-wasm client contracts in order to correctly handle the deserialisation of these fields.
From v0.2.0+ibc-go-v8.3-wasmvm-v2.0 to v0.3.0-ibc-go-v8.3-wasmvm-v2.0
Contract developers
Thev0.3.0 release of 08-wasm for ibc-go v8.3.x and above introduces a breaking change for client contract developers.
The contract API SudoMsg payloads VerifyMembershipMsg and VerifyNonMembershipMsg have been modified.
The encoding of the Path field of both structs has been updated from v1.MerklePath to v2.MerklePath to support proving values stored under keys which contain non-utf8 encoded symbols.
As a result, the Path field now contains a MerklePath composed of key_path of [][]byte as opposed to []string. The JSON field path containing key_path of both VerifyMembershipMsg and VerifyNonMembershipMsg structs will now marshal elements as base64 encoded bytestrings. See below for example JSON diff.
key_path from []string to [][]byte.
Contract developers should familiarise themselves with the migration path offered by 08-wasm here.
An example of the required changes in a client contract may look like:
cosmwasm_std documentation for more information.
From v0.1.1+ibc-go-v7.3-wasmvm-v1.5 to v0.2.0-ibc-go-v7.3-wasmvm-v1.5
Contract developers
Thev0.2.0 release of 08-wasm for ibc-go v7.6.x and above introduces a breaking change for client contract developers.
The contract API SudoMsg payloads VerifyMembershipMsg and VerifyNonMembershipMsg have been modified.
The encoding of the Path field of both structs has been updated from v1.MerklePath to v2.MerklePath to support proving values stored under keys which contain non-utf8 encoded symbols.
As a result, the Path field now contains a MerklePath composed of key_path of [][]byte as opposed to []string. The JSON field path containing key_path of both VerifyMembershipMsg and VerifyNonMembershipMsg structs will now marshal elements as base64 encoded bytestrings. See below for example JSON diff.
key_path from []string to [][]byte.
Contract developers should familiarise themselves with the migration path offered by 08-wasm here.
An example of the required changes in a client contract may look like:
cosmwasm_std documentation for more information.
From ibc-go v7.3.x to ibc-go v8.0.x
Chains
In the 08-wasm versions compatible with ibc-go v7.3.x and above from the v7 release line, the checksums of the uploaded Wasm bytecodes are all stored under a single key. From ibc-go v8.0.x the checksums are stored usingcollections.KeySet, whose full functionality became available in Cosmos SDK v0.50. There is therefore an automatic migration handler configured in the 08-wasm module to migrate the stored checksums to collections.KeySet.
From v0.1.0+ibc-go-v8.0-wasmvm-v1.5 to v0.2.0-ibc-go-v8.3-wasmvm-v2.0
TheWasmEngine interface has been updated to reflect changes in the function signatures of Wasm VM:
MockWasmEngine interface.
Chains
TheSupportedCapabilities field of WasmConfig is now of type []string: