-
Notifications
You must be signed in to change notification settings - Fork 299
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
Tide up state pruner validation #8459
Tide up state pruner validation #8459
Conversation
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
The pull request focuses on refining the state pruner validation logic to enhance robustness and prevent issues with unsupported database versions.
- Removed
0
from retained slots range: Ensures state pruning logic inservices/chainstorage/src/main/java/tech/pegasys/teku/services/chainstorage/StorageService.java
is valid. - Validation for
LEVELDB_TREE
: Prevents state pruner creation when the database version isLEVELDB_TREE
inStorageService.java
. - Updated default value for
DEFAULT_STORAGE_RETAINED_SLOTS
: Changed from-1
to0
instorage/src/main/java/tech/pegasys/teku/storage/server/StorageConfiguration.java
. - Validation logic update: Ensures
retainedSlots
cannot be less than0
inStorageConfiguration.java
.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
storage/src/main/java/tech/pegasys/teku/storage/server/StorageConfiguration.java
Show resolved
Hide resolved
services/chainstorage/src/main/java/tech/pegasys/teku/services/chainstorage/StorageService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Gabriel Fukushima <[email protected]>
Signed-off-by: Gabriel Fukushima <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
Enhanced state pruner validation to prevent unsupported configurations and ensure robustness.
- Validation for
LEVELDB_TREE
: Added check inservices/chainstorage/src/main/java/tech/pegasys/teku/services/chainstorage/StorageService.java
to throwInvalidConfigurationException
if state pruner is enabled withLEVELDB_TREE
. - Test enhancements: Updated
storage/src/test/java/tech/pegasys/teku/storage/server/StorageConfigurationTest.java
to include tests ensuring state pruner cannot be enabled with tree mode storage. - Removed
0
from retained slots range: Ensures valid state pruning configurations inStorageService.java
.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
Enhanced state pruner validation to prevent unsupported configurations and ensure robustness.
- Validation for
LEVELDB_TREE
: Added check inservices/chainstorage/src/main/java/tech/pegasys/teku/services/chainstorage/StorageService.java
to throwInvalidConfigurationException
if state pruner is enabled withLEVELDB_TREE
. - Test enhancements: Updated
storage/src/test/java/tech/pegasys/teku/storage/server/StorageConfigurationTest.java
to include tests ensuring state pruner cannot be enabled with tree mode storage. - Removed
0
from retained slots range: Ensures valid state pruning configurations inStorageService.java
.
No major changes found since last review.
11 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
PR Description
Removes the value "0" from the possible range of retained slots. Adds validation to prevent state pruner to be created when the database version is on leveldb tree.
We already have a validation at the storage configuration level that checks for the frequency (which is ultimately how leveldb tree gets set) but if we change the frequency and leveldb tree is still used. We don't want to support that at the moment.
Fixed Issue(s)
Part of #8449
Documentation
doc-change-required
label to this PR if updates are required.Changelog