Skip to content

Commit fc0b28a

Browse files
fab-10jflo
authored andcommitted
Deprecation warning if Forest pruning is enabled (besu-eth#6230)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: jflo <justin+github@florentine.us>
1 parent 4492c89 commit fc0b28a

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 23.10.4
4+
5+
### Breaking Changes
6+
7+
### Deprecations
8+
- 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)
9+
10+
### Additions and Improvements
11+
- Add error messages on authentication failures with username and password [#6212](https://github.com/hyperledger/besu/pull/6212)
12+
13+
### Bug fixes
14+
15+
316
## 23.10.3
417

518
### Breaking Changes

besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,6 +2059,11 @@ private void issueOptionWarnings() {
20592059
"--privacy-onchain-groups-enabled",
20602060
"--privacy-flexible-groups-enabled");
20612061
}
2062+
2063+
if (isPruningEnabled()) {
2064+
logger.warn(
2065+
"Forest pruning is deprecated and will be removed soon. To save disk space consider switching to Bonsai data storage format.");
2066+
}
20622067
}
20632068

20642069
private void configure() throws Exception {

besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3815,6 +3815,21 @@ public void pruningParametersAreCaptured() throws Exception {
38153815
assertThat(pruningArg.getValue().getBlockConfirmations()).isEqualTo(4);
38163816
}
38173817

3818+
@Test
3819+
public void pruningLogsDeprecationWarning() {
3820+
parseCommand("--pruning-enabled");
3821+
3822+
verify(mockControllerBuilder).isPruningEnabled(true);
3823+
3824+
assertThat(commandOutput.toString(UTF_8)).isEmpty();
3825+
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
3826+
verify(mockLogger)
3827+
.warn(
3828+
contains(
3829+
"Forest pruning is deprecated and will be removed soon."
3830+
+ " To save disk space consider switching to Bonsai data storage format."));
3831+
}
3832+
38183833
@Test
38193834
public void devModeOptionMustBeUsed() throws Exception {
38203835
parseCommand("--network", "dev");

0 commit comments

Comments
 (0)