-
Notifications
You must be signed in to change notification settings - Fork 638
types: is a Proposal
with Height == 0
valid?
#2210
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
Comments
In the data structures spec doc it says height > 0 https://github.com/cometbft/cometbft/blob/main/spec/core/data_structures.md#header |
Or The introduction of this parameter, which appears not to be really documented, was ADR 078. Not 100% clear to me that it must be greater than zero. |
|
Indeed. We allow for 0 but we then replace 0 by 1: https://github.com/cometbft/cometbft/blob/main/types/genesis.go#L76-L81 |
This comment should encourage updating the documentation once genesis fields/validation rules are changed: https://github.com/cometbft/cometbft/blob/main/types/genesis.go#L24-L27 The documentation https://docs.cometbft.com/v0.38/core/using-cometbft#fields is not exactly clear regarding that. |
This parameter was introduced by cc247c0. Originally, |
Last time this documentation was updated: 226af0a |
Uh oh!
There was an error while loading. Please reload this page.
A
Proposal
with height 0 is considered valid, see:cometbft/types/proposal.go
Lines 53 to 55 in 9613e7a
The associated test unit only tests height -1, see:
cometbft/types/proposal_test.go
Line 136 in 9613e7a
But as @sergio-mena pointed out in #2206 (comment):
The text was updated successfully, but these errors were encountered: