-
Notifications
You must be signed in to change notification settings - Fork 332
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
Convert frozen height to None when raw frozen height is zero #1640
Conversation
@@ -200,6 +200,15 @@ impl TryFrom<RawClientState> for ClientState { | |||
.clone() | |||
.ok_or_else(Error::missing_trusting_period)?; | |||
|
|||
let frozen_height = raw.frozen_height.and_then(|raw_height| { |
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.
Raw frozen height is defined as an Option
here ->
/// Block height when the client was frozen due to a misbehaviour
#[prost(message, optional, tag = "6")]
pub frozen_height: ::core::option::Option<super::super::super::core::client::v1::Height>,
I would've expected gaiad to respond with a None
instead of RawHeight::zero()
to indicate a client that isn't frozen. Seems to me like a bug in ibc-go(?), although I agree we need this fix for now anyway.
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.
It seem like we need to update the E2E python script. I suspect the CI fails because the frozen_height has to be marked Optional[Height]
instead of Height
:
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.
Thanks Soares!
…lsystems#1640) * Convert frozen height to None when raw frozen height is zero * Fix Python E2E test
Fixes #1619
Description
This fixes a conversion error in #1619 which converts a raw zero frozen height to
Some(height)
. This causes the client refresh code to always fail and produce errors in the log that looks like:The error was not picked up by the CI because it is an error on the client worker, and therefore does not cause tests to crash.
PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.