Skip to content
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

Disallow negative values for Tendermint client state duration parameters #2542

Closed
3 tasks
hu55a1n1 opened this issue Oct 13, 2022 · 0 comments · Fixed by #2555
Closed
3 tasks

Disallow negative values for Tendermint client state duration parameters #2542

hu55a1n1 opened this issue Oct 13, 2022 · 0 comments · Fixed by #2555
Assignees
Labels
07-tendermint help wanted Issues for which we would appreciate help/support from the community type: bug Something isn't working as expected
Milestone

Comments

@hu55a1n1
Copy link

Summary of Bug

I think we're currently allowing negative values for TrustingPeriod, UnbondingPeriod and MaxClockDrift while the spec forbids negative values and uses uint64 to represent them ->

if cs.TrustingPeriod == 0 {
return sdkerrors.Wrap(ErrInvalidTrustingPeriod, "trusting period cannot be zero")
}
if cs.UnbondingPeriod == 0 {
return sdkerrors.Wrap(ErrInvalidUnbondingPeriod, "unbonding period cannot be zero")
}
if cs.MaxClockDrift == 0 {
return sdkerrors.Wrap(ErrInvalidMaxClockDrift, "max clock drift cannot be zero")
}

Expected Behaviour

Disallow negative values for these parameters.

Version

v5.0.0


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega crodriguezvega added type: bug Something isn't working as expected 07-tendermint help wanted Issues for which we would appreciate help/support from the community labels Oct 14, 2022
@crodriguezvega crodriguezvega self-assigned this Oct 16, 2022
@crodriguezvega crodriguezvega moved this to In review in ibc-go Oct 16, 2022
@crodriguezvega crodriguezvega added this to the v6.0.0 milestone Oct 17, 2022
Repository owner moved this from In review to Done in ibc-go Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
07-tendermint help wanted Issues for which we would appreciate help/support from the community type: bug Something isn't working as expected
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants