-
Notifications
You must be signed in to change notification settings - Fork 386
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
All shares must contain a share version that belongs to a list of supported versions #830
Comments
Upon further investigation, this validity rule doesn't seem practical in Alternatively, if we don't want this to be a |
Closes #830 specifically: > Alternatively, if we don't want this to be a ProcessProposal validity rule, we can enforce this type of check when we parse the data square back into block data (e.g. [here](https://github.com/celestiaorg/celestia-app/blob/6b86e91eea1063c27c1ae461eddbe505f778df08/pkg/shares/parse_compact_shares.go#L14)) Co-authored-by: CHAMI Rachid <[email protected]>
I think we should consider doing this. If all blocks write shares with one share version, then we can add this as a field to Data and verify it in |
what you've discussed here makes sense as mentioned above already, before other validators vote, they check the data hash by regenerating it from the block data. If a block producer includes an unexpected version, then data hash will be different and the honest validators will reject that block. The only way to include this is with a colluding 2/3s. This will not yet have an effect on light clients atm, even with a colluding 2/3s, but as you have mentioned it might in the future when supporting multiple versions.
yes exactly, we have to add the ability to specify the version when creating a pfd, and keep track of that version in the celestia-core I think its worth mentioning that we don't actually need to add an extra check in |
This is an interesting benefit of allowing users to specify in their wire PFD which share version they intend to use. It also seems necessary if we'd like to support multiple share formats being included in the same block and would remove the need to store a block-wide share version in the block header. |
…#837) Closes celestiaorg#830 specifically: > Alternatively, if we don't want this to be a ProcessProposal validity rule, we can enforce this type of check when we parse the data square back into block data (e.g. [here](https://github.com/celestiaorg/celestia-app/blob/6b86e91eea1063c27c1ae461eddbe505f778df08/pkg/shares/parse_compact_shares.go#L14)) Co-authored-by: CHAMI Rachid <[email protected]>
#936 adds the share version to As a result, it no longer seems necessary to add a block validity rule that all shares must contain a share version that belongs to a list of supported share versions. |
Closes celestiaorg/celestia-app#830 specifically: > Alternatively, if we don't want this to be a ProcessProposal validity rule, we can enforce this type of check when we parse the data square back into block data (e.g. [here](https://github.com/celestiaorg/celestia-app/blob/696ea9b14d691f4c9538d82f25542731ef40ab35/pkg/shares/parse_compact_shares.go#L14)) Co-authored-by: CHAMI Rachid <[email protected]>
Problem
#659 introduced an info byte which contains a share version. Currently a block proposer could construct a share with a version that hasn't yet been defined (ex. share version
5
). The block that includes this share would be considered valid even though it should be considered invalid.Proposal
Introduce a new validity rule that ensures all shares contain a share version that belongs to a list of supported versions. Initially the list of supported versions should contain share version:
0
becausecelestia-app/pkg/appconsts/appconsts.go
Line 26 in e69283f
The text was updated successfully, but these errors were encountered: