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

polytone: migrate to CosmWasm `v2`

Open CyberHoward opened this issue 5 months ago • 3 comments

Description

CosmWasm v2 has been slowly gaining adoption throughout the ecosystem. As critical infrastructure, Polytone should be up-to-date with this latest version, allowing devs who are using CW v2 to make use of Polytone.

Issue Scope

While working to upgrade our own contracts we've identified two major changes that should be made to Polytone.

  1. SubMsgResponse's data field is deprecated. This field is currently used to retrieve and cache execution results before returning them in the Ack.
  2. Use Reply's Payload instead of state-caching. A new Payload field was added to the SubMsg which allows developers to pass data to the reply endpoint without needing to store it to state. Applying this to Polytone would reduce the gas usage and simplify the contract's implementation. It can also be used to cache the execution responses, further reducing gas-costs.

Any other issues encountered over the software's life should preferably also be addressed in this update.

Update Rollout

Polytone's canonical deployments are non-migratable. As a result rolling out this update will require a coordinated governance proposal on each deployed chain to migrate the contracts.

Open questions

  • Will migrating one side of the polytone channel cause the channel to break until the other side is migrated?
  • Are there any other issues that should be linked to this upgrade?

CyberHoward avatar Sep 05 '24 07:09 CyberHoward