Closed cwgoes closed 4 years ago
So, at the moment, I can do:
./two-chains.sh
(set environment variables accordingly)
Setting clients works fine:
relayer --home $RLY tx clients ibc0 ibc1 ibconeclient ibczeroclient
The first connection-step works fine:
relayer --home $RLY tx connection-step ibc0 ibc1 ibconeclient ibczeroclient ibconeconn ibczeroconn
The second fails:
relayer --home $RLY tx connection-step ibc0 ibc1 ibconeclient ibczeroclient ibconeconn ibczeroconn
{"height":"6","txhash":"6B954F53057A24C2DB194BE30FAA7834AC88406E7476AA8E64BD96970E375253","codespace":"client","code":14,"raw_log":"connection state verification failed: key mismatch on operation #0: expected ibconeconn but got connection/ibconeconn: failed to execute message; message index: 1","gas_wanted":"200000","gas_used":"116000"}
Also, to even get to this error, I have to alter the error logic again - https://github.com/cosmos/cosmos-sdk/pull/5697/commits/7465f9be625a553d442860652eb771bdda525ebc.
I'm not totally sure that my changes to the proof paths are correct; when I revert them I get:
{"height":"16","txhash":"E1D9E1CF1941043D0E5EC3BA49CF4F4A26AC460E6DE0CC20881BF85FB6067106","codespace":"client","code":14,"raw_log":"connection state verification failed: calculated root hash is invalid: expected [94 197 194 250 51 5 186 54 114 107 48 85 54 104 156 115 208 216 165 135 217 245 125 154 241 184 121 109 49 237 138 146] but got [28 0 255 77 7 105 199 212 24 235 180 224 30 86 54 56 202 188 117 51 97 98 167 201 44 223 63 151 73 178 147 38]: failed to execute message; message index: 1","gas_wanted":"200000","gas_used":"116003"}
(on the second connection step)
This error is after the key mismatch one though, per https://github.com/tendermint/tendermint/blob/master/crypto/merkle/proof.go#L60, so my earlier attempted fixes may not have fixed the problem anyways.
Switching https://github.com/cosmos/cosmos-sdk/blob/ibc-alpha/x/ibc/23-commitment/merkle.go#L91 to KeyEncodingHex
does not help, same mis-match.
I'm pretty lost here, do you have any ideas @AdityaSripal / does this match your debugging?
Testing in progress.