You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes when I am sending a message between my two chains, I would get an error like the below:
failed to execute message; message index: 1: acknowledge packet verification failed: packet acknowledgement verification failed: failed packet acknowledgement verification for client (07-tendermint-0): consensus state does not exist for height 0-82: consensus state not found: invalid request
So my friend and I did some digging into the code and find out that packet commit responses are generated with FetchCommitResponse at the beginning of sendTxFromEventPackets method and never get updated again. So in a case when updateMsg somehow has its height higher than the packet commit responses created previously. The height in updateMsg is always greater than proofHeight in the commit responses, since each retry.Do in sendTxFromEventPackets only updates updateMsg with the lastest height, not the commit responses. With this, light client can never verify those old proofHeight in the commit responses of messages/acknowledgements.
Then we did some quick fix with the following steps
We moved FetchCommitResponse into rlyPackets loop in retry.Do right before calling rp.Msg(src, dst) as the following
for_, rp:=rangerlyPackets {
rp.FetchCommitResponse(src, dst)
msg, err:=rp.Msg(src, dst)
iferr!=nil {
ifsrc.debug {
src.Log(fmt.Sprintf("- [%s] failed to create relay packet message bound for %s of type %T, retrying: %s",
src.ChainID, dst.ChainID, rp, err))
}
returnerr
}
txs.Src=append(txs.Src, msg)
}
Moving FetchCommitResponse did help with the error, but there is still a chance that updateClient height is not always equal to proofHeight in commit responses after multiple retries. So we modified FetchCommitResponse to take targetHeight as the third argument and passed the latest height from updateMsg which is created before rlyPackets loop.
There might be a better way to do this, but I just want to let you know what we did to fix the error.
The text was updated successfully, but these errors were encountered:
Hi all,
Sometimes when I am sending a message between my two chains, I would get an error like the below:
So my friend and I did some digging into the code and find out that packet commit responses are generated with
FetchCommitResponse
at the beginning ofsendTxFromEventPackets
method and never get updated again. So in a case whenupdateMsg
somehow has its height higher than the packet commit responses created previously. The height inupdateMsg
is always greater thanproofHeight
in the commit responses, since eachretry.Do
insendTxFromEventPackets
only updatesupdateMsg
with the lastest height, not the commit responses. With this, light client can never verify those oldproofHeight
in the commit responses of messages/acknowledgements.Then we did some quick fix with the following steps
FetchCommitResponse
intorlyPackets
loop inretry.Do
right before callingrp.Msg(src, dst)
as the followingFetchCommitResponse
did help with the error, but there is still a chance thatupdateClient
height is not always equal toproofHeight
in commit responses after multiple retries. So we modifiedFetchCommitResponse
to taketargetHeight
as the third argument and passed the latest height fromupdateMsg
which is created beforerlyPackets
loop.There might be a better way to do this, but I just want to let you know what we did to fix the error.
The text was updated successfully, but these errors were encountered: