-
Notifications
You must be signed in to change notification settings - Fork 624
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
Fix solo machine handshake verification bug #120
Conversation
…equence is incremented
I don't know of an efficient way to test this in an end to end manner so I opened #121. We definitely need end to end tests for this, but I don't see a reason to block this fix unless someone is unconvinced this will fix the issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, this looks correct to me though it means that the solomachine must sign each message with a new sequence in the correct order during the handshake.
So, solomachine must sign connection with sequence 0, clientstate with sequence 1, and consensus state with sequence 2 in order to successfully pass ConnOpenAck
.
This should be documented somewhere
@colin-axner Thanks for a quick fix. But, I'm still a bit unsure of how this fix solves the issue. I understand that solo machine has to increment the sequence after creating a proof. That means that a sequence/height should be passed along with each proof, but in Maybe I'm missing something, but, shouldn't we send a sequence number associated with each proof. NOTE: |
@devashishdxt You are 100% correct that this didn't fix the issue, the proof height being passed in by the connection keeper should be discarded and we should only use the client state lastest sequence as done in the ICS spec The proof height presumes that all the proofs are produced at the same height, but in the case of solo machines, this would be misbehaviour I'll open a fix shortly. Thanks a ton for paying careful attention!! Hopefully end to end tests can mitigate these issues in the future I'm also very interested in developer feedback for improving interaction with the solo machine since it was largely designed in a black box. Feel free to open any issues with suggestions! |
Actually upon further inspection, I believe there are several issues at play here. Timeout logic uses the proof height to obtain the consensus state associated with that height to check the timestamp. Solo machines do not set consensus states (as it is stored in the client state), this would result in all timeouts failing (this would be a bug in the spec as well) It is unclear to me based on the spec, if the proof height needs to be verified or not. Can we assume core IBC doesn't rely on the height of the proof height (outside of the timeout logic mentioned above)? I will discuss this with the spec folks and see if we can come to some resolution |
Description
closes: #119
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes