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

Current Store API prevents us from properly upgrading to the upcoming ibc v0.20.0 #66

Open
plafer opened this issue Oct 19, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@plafer
Copy link
Contributor

plafer commented Oct 19, 2022

The current Store API only allows us to set serialized values.

This is incompatible with the upcoming ibc v0.20.0 which implemented ADR 4. Specifically, we would like to store Box<dyn ClientState> for the client_state_store, and Box<dyn ConsensusState> for the consensus_state_store. We can't store the serialized version, because we don't know how to transform Vec<u8> -> Box<dyn ClientState> without additional information (e.g. the ClientId).

One solution is to create an enum of all types stored in the IBC store (Sequence, PacketCommitment, Box<dyn ClientState>, etc), and have that enum be the type of the value for the IBC store. Proofs will work just fine as well; we just need to ensure that the values in the store are properly serialized before they're fed to the proof algorithm, which I believe is already the case (here and here for example).

@plafer plafer added the enhancement New feature or request label Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant