-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add upgrade type verification function #3453
Add upgrade type verification function #3453
Conversation
…e-upgrade-type-and-validate-basic-functions
…e-basic-functions' into cian/issue#3451-add-verifiable-upgrade-type-and-validate-basic-functions
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.
Thank you, @chatton. Can we then remove VerifyChannelUpgradeTimeout
and VerifyChannelUpgradeSequence` functions?
expPass: false, | ||
}, | ||
{ | ||
name: "fails with bad client id", |
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.
name: "fails with bad client id", | |
name: "fails with invalid client id", |
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.
we bave "bad client id" for all other tests doing this check, if we want to change it we should probably do it everywhere (I think not in this PR though!)
) | ||
|
||
// NewUpgrade creates a new Upgrade instance. | ||
func NewUpgrade(modifiableFields ModifiableUpgradeFields, timeout UpgradeTimeout, lastPacketSent uint64) *Upgrade { |
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.
func NewUpgrade(modifiableFields ModifiableUpgradeFields, timeout UpgradeTimeout, lastPacketSent uint64) *Upgrade { | |
func NewUpgrade(upgradeFields UpgradeFields, timeout UpgradeTimeout, lastPacketSent uint64) *Upgrade { |
expPass: false, | ||
}, | ||
{ | ||
name: "verification fails when the ordering is different", |
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.
name: "verification fails when the ordering is different", | |
name: "fails when the upgrade field is different", |
upgrade = channeltypes.NewUpgrade( | ||
channeltypes.NewModifiableUpgradeFields(channeltypes.UNORDERED, []string{path.EndpointA.ConnectionID}, "v1.0.0"), | ||
channeltypes.NewUpgradeTimeout(clienttypes.ZeroHeight(), 100000), | ||
0, |
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.
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.
should last packet sent be 1 if we have not sent any packets?
…e-basic-functions' into cian/issue#3451-add-verifiable-upgrade-type-and-validate-basic-functions
@@ -364,16 +364,15 @@ func (k Keeper) VerifyNextSequenceRecv( | |||
return nil |
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.
the diff in this file is quite confusing, the following functions were removed
VerifyChannelUpgradeSequence
VerifyChannelUpgradeTimeout
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
// NewModifiableUpgradeFields returns a new ModifiableUpgradeFields instance. | ||
func NewModifiableUpgradeFields(ordering Order, connectionHops []string, version string) UpgradeFields { |
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.
nit: remove "Modifiable" here I guess?
Description
closes: #3446
Commit Message / Changelog Entry
N/A feature branch
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.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.