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

Delegate store operation of ClientState and ConsensusState in Initialize to contract #3956

Closed
3 tasks
crodriguezvega opened this issue Jun 26, 2023 · 1 comment
Assignees
Labels
08-wasm type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.

Comments

@crodriguezvega
Copy link
Contributor

Surfaced from Interchain IBC team's review of 08-wasm at hash https://github.com/strangelove-ventures/ibc-go/commit/96e9930ab87a171a3ae6ac9717ee25bfda77212b

Summary

Instead of 08-wasm module being responsible for storing the ClientState and ConsensusState provided in MsgCreateClient, delegate that responsibility to the light client contract.

Problem Definition

The 08-wasm module is not completely a proxy client, since the implementation of Initialize function of the ClientState interface takes care of storing the client state and the consensus state provided in MsgCreateClient, instead of delegating to the light client contract the responsibility to store both (and any other additional metadata).

Proposal

The light client contracts already take care of updating the ClientState and ConsensusState when a ClientMessage is provided in MsgUpdateClient (see UpdateState). Therefore it would make sense that the light client contract does the same thing in Initialize. This also enables the light contracts to set any additional data (e.g. metadata) at light client initialisation.

Tagging @misko9 @blasrodri to hear their thoughts, since this change impacts the contracts.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega crodriguezvega added needs discussion Issues that need discussion before they can be worked on type: refactor Architecture, code or CI improvements that may or may not tackle technical debt. 08-wasm labels Jun 26, 2023
@crodriguezvega crodriguezvega modified the milestones: v7.3.0, 08-wasm/v1.0.0 Jun 26, 2023
@crodriguezvega crodriguezvega removed the needs discussion Issues that need discussion before they can be worked on label Jul 7, 2023
@crodriguezvega crodriguezvega self-assigned this Jul 7, 2023
@crodriguezvega
Copy link
Contributor Author

Closed by #4033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08-wasm type: refactor Architecture, code or CI improvements that may or may not tackle technical debt.
Projects
Archived in project
Development

No branches or pull requests

1 participant