Deprecation warning if Forest pruning is enabled (#6230)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/6241/head
Fabio Di Fabio 12 months ago committed by GitHub
parent c2578638d1
commit c2d1b7de55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      CHANGELOG.md
  2. 5
      besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
  3. 15
      besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java

@ -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

@ -2059,6 +2059,11 @@ public class BesuCommand implements DefaultCommandValues, Runnable {
"--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 {

@ -3815,6 +3815,21 @@ public class BesuCommandTest extends CommandTestAbstract {
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");

Loading…
Cancel
Save