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

Deprecation warning if Forest pruning is enabled #6230

Merged
merged 4 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 23.10.4

### Breaking Changes

### Deprecations
- Forest pruning (`pruning-enabled` options) is deprecated and will be removed soon. To save disk space consider switching to Bonsai data storage format [#6230](https://github.com/hyperledger/besu/pull/6230)

### Additions and Improvements
- Add error messages on authentication failures with username and password [#6212](https://github.com/hyperledger/besu/pull/6212)

### Bug fixes


## 23.10.3

### Breaking Changes
Expand Down
5 changes: 5 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -2059,6 +2059,11 @@ private void issueOptionWarnings() {
"--privacy-onchain-groups-enabled",
"--privacy-flexible-groups-enabled");
}

if (isPruningEnabled()) {
logger.warn(
"Forest pruning is deprecated and will be removed soon. To save disk space consider switching to Bonsai data storage format.");
}
}

private void configure() throws Exception {
Expand Down
15 changes: 15 additions & 0 deletions besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3815,6 +3815,21 @@ public void pruningParametersAreCaptured() throws Exception {
assertThat(pruningArg.getValue().getBlockConfirmations()).isEqualTo(4);
}

@Test
public void pruningLogsDeprecationWarning() {
parseCommand("--pruning-enabled");

verify(mockControllerBuilder).isPruningEnabled(true);

assertThat(commandOutput.toString(UTF_8)).isEmpty();
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
verify(mockLogger)
.warn(
contains(
"Forest pruning is deprecated and will be removed soon."
+ " To save disk space consider switching to Bonsai data storage format."));
}

@Test
public void devModeOptionMustBeUsed() throws Exception {
parseCommand("--network", "dev");
Expand Down