-
Notifications
You must be signed in to change notification settings - Fork 621
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
change FrozenSequence to boolean in solo machine #169
Conversation
return exported.Frozen | ||
} | ||
|
||
return exported.Active | ||
} | ||
|
||
// IsFrozen returns true if the client is frozen. | ||
func (cs ClientState) IsFrozen() bool { |
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.
This should have been deleted in the Status pr
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.
Have you removed it from localhost?
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.
yup, I think this one got added back during a merge of main when I fixed the solo machine bug
// GetFrozenHeight returns the frozen sequence of the client. | ||
// Return exported.Height to satisfy interface | ||
// Revision number is always 0 for a solo-machine | ||
func (cs ClientState) GetFrozenHeight() exported.Height { | ||
return clienttypes.NewHeight(0, cs.FrozenSequence) | ||
return clienttypes.NewHeight(0, 1) |
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.
this will be removed by #165
@@ -445,10 +440,6 @@ func produceVerificationArgs( | |||
} | |||
// sequence is encoded in the revision height of height struct | |||
sequence := height.GetRevisionHeight() | |||
if cs.IsFrozen() { |
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.
should have been removed by Status pr, this is checked in 02-client
@@ -16,7 +16,7 @@ message ClientState { | |||
// latest sequence of the client state | |||
uint64 sequence = 1; | |||
// frozen sequence of the solo machine | |||
uint64 frozen_sequence = 2 [(gogoproto.moretags) = "yaml:\"frozen_sequence\""]; | |||
bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; |
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.
this is proto breaking. Should I make a v2? @AdityaSripal @fedekunze
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.
I could alternatively deprecate the frozen sequence field and add a new field is_frozen
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.
Going to try to do a v2. I think it is good practice
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.
Cool, I just changed the package from v1 -> v2
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #169 +/- ##
=======================================
Coverage 79.91% 79.91%
=======================================
Files 107 107
Lines 6417 6409 -8
=======================================
- Hits 5128 5122 -6
+ Misses 931 929 -2
Partials 358 358
|
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.
ACK
fixed changelog, removed GetFrozenHeight solo machine function
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.
LGTM. Check localhost has been changed correctly after Status PR.
return exported.Frozen | ||
} | ||
|
||
return exported.Active | ||
} | ||
|
||
// IsFrozen returns true if the client is frozen. | ||
func (cs ClientState) IsFrozen() bool { |
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.
Have you removed it from localhost?
Description
This will be a lot easier to do now since the solo machine was broken and we don't have to worry about backwards compatibility
closes: #36
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