-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ClientState in x/ibc/07 diverges from that in ICS 07 #6736
Comments
Thanks, we should fix this discrepancy.
The client state should only need to store the latest validator set, I believe. cc @AdityaSripal is that wrong? I've added Do we have a canonical |
yea, there is no proto file because 02-client migration is blocked on Tendermint |
Why does the client need to store its own identifier ( |
it's part of the interface. It technically doesn't need to tho |
It would be nice to remove it in my opinion, since it's confusing to store the same data in two distinct places. |
Looked into removing the Header, and realized it cannot be removed: https://github.com/cosmos/cosmos-sdk/blob/master/x/ibc/07-tendermint/update.go#L92 So long as we use The |
Hmm, this won't work e.g. with https://github.com/cosmos/ics/issues/420, unless we can reconstruct the |
We could... As far as I can tell the
Now If we do that, then yes; we can remove all of the Header stuff from |
I think that would be preferable, as we do want to support consensus state updates from past headers. |
We have discussed with Josef that we are missing some fields in Client and Consensus State so header verification (as part of update) can be done correctly. We will also need to make some changes to checkMisbehaviourAndUpdateState to be able to verify if submitted data is a valid fork. I would suggest creating an issue in IBC repo and do the work first there (as it will most probably leader to ICS07 changes) and then follow up here. We should probably avoid doing changes at the code level without fixing the spec first? Does this make sense? @cwgoes |
@cwgoes: When you create an issue in the IBC repo, could you please tag me there so that I can participate in the discussion? I am working on light client specs both for light nodes and IBC. Thanks! |
Might also be nice for the light.Verify to take a new LightHeader struct or Header interface which only exposed the relevant fields it needed cc @melekes |
My understanding of the state of affairs - https://github.com/cosmos/ics/issues/456. |
ClientState in x/ibc/07-tendermint looks like this:
While in the ICS 07 it looks like:
There also doesn't seem to be a protobuf file.
Should this divergence be reconciled? It seems things were added in the code that were necessary and that needs to be updated in the spec?
But also
Header
field in the code is a full on SignedHeader and ValidatorSet, so it includes the full Header, Commit, and ValidatorSet. Is all this really necessary? Having the Commit stored in here seems especially unecessary. From the spec, it looks like we just need a few fields from the header (height, timestamp) and the validator set.The text was updated successfully, but these errors were encountered: