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

Minor: Incomplete validation of the GenesisState of the LightClient module #1585

Open
danwt opened this issue Nov 30, 2024 · 1 comment · May be fixed by #1663
Open

Minor: Incomplete validation of the GenesisState of the LightClient module #1585

danwt opened this issue Nov 30, 2024 · 1 comment · May be fixed by #1663
Labels
good first issue Good for newcomers

Comments

@danwt
Copy link
Contributor

danwt commented Nov 30, 2024

In x/lightclient/types/genesis.go:11-22 the Validate function of the GenesisState of the LightClient module is incomplete.
Specifically, the CanonicalClients slice is not deduplicated, allowing duplicate entries to be stored.
Additionally, the HeaderSigners slice is not validated to containing non-empty strings and does not include a mechanism to prevent duplicates as well.
These shortcomings could result in inconsistent states and inefficient storage usage.
Recommendation
We recommend enhancing the Validate function by implementing deduplication for the CanonicalClients slice and introducing string validation for the HeaderSigners slice to disallow empty entries.

@mtsitrin mtsitrin added the good first issue Good for newcomers label Dec 10, 2024
@NagaTulasi
Copy link
Contributor

Hi @mtsitrin, I would like to work on this.

@NagaTulasi NagaTulasi linked a pull request Dec 17, 2024 that will close this issue
29 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants