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

I01: stateHistoryRetentionPeriod not validated #2072

Open
alysiahuggins opened this issue Sep 26, 2024 · 0 comments
Open

I01: stateHistoryRetentionPeriod not validated #2072

alysiahuggins opened this issue Sep 26, 2024 · 0 comments

Comments

@alysiahuggins
Copy link
Contributor

Affected Code: LightClient.sol (line 210)

Summary: The property stateHistoryRetentionPeriod is not validated
during initialization, but it requires a minimum of 1 hour when updat-
ing it (on lines 439-445). This inconsistency could result in the period
being initialized to less than 1 hour, leading to an unexpected state.

Suggestion: We suggest to validate whether the property
stateHistoryRetentionPeriod is greater than 1 hour at initialization time.
This would result in removing the revert condition whether
stateHistoryRetentionPeriod is less than 1 hour in
setstateHistoryRetentionPeriod if the value can only be increased.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant