-
Notifications
You must be signed in to change notification settings - Fork 350
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
Client update error while forking from sovereign to consumer chain #2980
Comments
Where is hermes fetching validators list? |
@jtremback @sainoe You guys should probably take a look at this |
I managed to repro the issue, made some local changes to Stride-Labs/interchain-security#1 to be able to run with hermes v1.2.0.
This says that the header at height 1 on consumer chain had
I enabled trace level in hermes and also added some debugs. I think the initial client creation on the provider chain uses the wrong validator set hash for height 1 as that hash ( Side note: @romac, since the client needs to be updated after major valset changes, from height 1 to 858 in my run, there will be intermediate supporting headers (height 8 where next valset changes > 1/3rd) and I believe this is the first time we see this live. So we should keep an eye on this once we sort the client creation. |
From the validators at height H+1 (uses the validators RPC) |
Thanks for the thorough issue analysis @ancazamfir! It also seems to me that the consumer chain starts with a different validator set than the one used to create the client on the provider after the consumer proposal passes. |
Actually this is not exactly what happens. The validator sets are the same. Let me try to explain better what I think happens. The client is initially created with a "trusted" consensus state that has a height before the consumer proposal passes but with the validator set after the proposal passed. This initial state is not correct and because of the way the IBC (ics-02) protocol is defined, this inconsistency cannot be detected by the on-chain IBC (ics-02 and ics-07) client handlers. One way to fix this is
|
@sainoe do you know where in the code the consumer IBC client is created on the provider chain? We use the code and scripts in Stride-Labs/interchain-security#1. |
@ancazamfir, I don't have all the context of this issue, but this may be the method you're looking for. Consensus state is instantiated here from |
thanks @smarshall-spitzbart, that was very helpful! after browsing the code it became clear that the consumer client on provider chain is set with the initial height from the proposal. Note: the other changes are adapting to hermes v1.2.0 CLIs. I also changed the hermes config to disable some features not required by your setup. |
Thanks all for your inputs - I was able to build connection successfully by adding a change on provider chain side where client is created.
Updated revision height from 1 to 8 - where the block 8 is where validator set is updated to consumer chain one. |
Thank you Anca, Jun, and Shawn. Great work debugging this! |
Summary of Bug
I am trying to setup relayer using hermes v0.15.0 between two Cosmos chains for interchain-security provider chain and consumer chain after soft fork from sovereign to consumer chain.
To setup minimal version, locally, installed one node provider chain, 2 nodes consumer chain. And when setting up connection this issue persists.
An action done on the first block after soft fork is validator set update to provider chain's one. And this hermes operation started after waiting 10s executing the validator set update block.
ERROR log on hermes
Version
Steps to Reproduce
The error can be reproduced here by running follow commands
Stride-Labs/interchain-security#1
Acceptance Criteria
For Admin Use
The text was updated successfully, but these errors were encountered: