Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0955e3d
Store trie_log_storage as blob
usmansaleem Oct 19, 2023
7bc99d8
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 9, 2024
0ff4d56
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 16, 2024
f1212f5
changelog
usmansaleem Jan 16, 2024
06062bf
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 17, 2024
05d1318
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 18, 2024
6edb907
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 22, 2024
412d7b3
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 22, 2024
be639e3
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 23, 2024
7d7f466
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 28, 2024
07d4ee1
Fix merge conflicts
usmansaleem Jan 28, 2024
98d2c0f
Add gc flag for static data
usmansaleem Jan 29, 2024
0354c5d
update javadoc
usmansaleem Jan 29, 2024
e780dbd
spotless fix
usmansaleem Jan 29, 2024
43f10ca
Update changelog
usmansaleem Jan 29, 2024
61b8215
Updating plugin-api build.gradle with new hash as SegmentIdentifier i…
usmansaleem Jan 29, 2024
32a4627
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 29, 2024
7c6e4ef
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 31, 2024
95f4f23
Updating plugin-api build.gradle with new hash as SegmentIdentifier i…
usmansaleem Jan 31, 2024
5a86378
Merge remote-tracking branch 'upstream/main' into trielog_blobdb_fixed
usmansaleem Jan 31, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- Introduce `besu storage x-trie-log prune` experimental offline subcommand which will prune all redundant trie logs except the latest 512 [#6303](https://github.com/hyperledger/besu/pull/6303)
- Introduce caching mechanism to optimize Keccak hash calculations for account storage slots during block processing [#6452](https://github.com/hyperledger/besu/pull/6452)
- Added configuration options for `pragueTime` to genesis file for Prague fork development [#6473](https://github.com/hyperledger/besu/pull/6473)
- Moving trielog storage to RocksDB's blobdb to improve write amplications [#6289](https://github.com/hyperledger/besu/pull/6289)

### Bug fixes
- Fix the way an advertised host configured with `--p2p-host` is treated when communicating with the originator of a PING packet [#6225](https://github.com/hyperledger/besu/pull/6225)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
public enum KeyValueSegmentIdentifier implements SegmentIdentifier {
DEFAULT("default".getBytes(StandardCharsets.UTF_8)),
BLOCKCHAIN(new byte[] {1}, true, true),
WORLD_STATE(new byte[] {2}, new int[] {0, 1}, false, true),
WORLD_STATE(new byte[] {2}, new int[] {0, 1}, false, true, false),
PRIVATE_TRANSACTIONS(new byte[] {3}),
PRIVATE_STATE(new byte[] {4}),
PRUNING_STATE(new byte[] {5}, new int[] {0, 1}),
ACCOUNT_INFO_STATE(new byte[] {6}, new int[] {2}, false, true),
ACCOUNT_INFO_STATE(new byte[] {6}, new int[] {2}, false, true, false),
CODE_STORAGE(new byte[] {7}, new int[] {2}),
ACCOUNT_STORAGE_STORAGE(new byte[] {8}, new int[] {2}, false, true),
TRIE_BRANCH_STORAGE(new byte[] {9}, new int[] {2}, false, true),
TRIE_LOG_STORAGE(new byte[] {10}, new int[] {2}),
ACCOUNT_STORAGE_STORAGE(new byte[] {8}, new int[] {2}, false, true, false),
TRIE_BRANCH_STORAGE(new byte[] {9}, new int[] {2}, false, true, false),
TRIE_LOG_STORAGE(new byte[] {10}, new int[] {2}, true, false, true),
VARIABLES(new byte[] {11}), // formerly GOQUORUM_PRIVATE_WORLD_STATE

// previously supported GoQuorum private states
Expand All @@ -49,29 +49,32 @@ public enum KeyValueSegmentIdentifier implements SegmentIdentifier {
private final int[] versionList;
private final boolean containsStaticData;
private final boolean eligibleToHighSpecFlag;
private final boolean staticDataGarbageCollectionEnabled;

KeyValueSegmentIdentifier(final byte[] id) {
this(id, new int[] {0, 1, 2});
}

KeyValueSegmentIdentifier(
final byte[] id, final boolean containsStaticData, final boolean eligibleToHighSpecFlag) {
this(id, new int[] {0, 1, 2}, containsStaticData, eligibleToHighSpecFlag);
this(id, new int[] {0, 1, 2}, containsStaticData, eligibleToHighSpecFlag, false);
}

KeyValueSegmentIdentifier(final byte[] id, final int[] versionList) {
this(id, versionList, false, false);
this(id, versionList, false, false, false);
}

KeyValueSegmentIdentifier(
final byte[] id,
final int[] versionList,
final boolean containsStaticData,
final boolean eligibleToHighSpecFlag) {
final boolean eligibleToHighSpecFlag,
final boolean staticDataGarbageCollectionEnabled) {
this.id = id;
this.versionList = versionList;
this.containsStaticData = containsStaticData;
this.eligibleToHighSpecFlag = eligibleToHighSpecFlag;
this.staticDataGarbageCollectionEnabled = staticDataGarbageCollectionEnabled;
}

@Override
Expand All @@ -94,6 +97,11 @@ public boolean isEligibleToHighSpecFlag() {
return eligibleToHighSpecFlag;
}

@Override
public boolean isStaticDataGarbageCollectionEnabled() {
return staticDataGarbageCollectionEnabled;
}

@Override
public boolean includeInDatabaseVersion(final int version) {
return Arrays.contains(versionList, version);
Expand Down
2 changes: 1 addition & 1 deletion plugin-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Calculated : ${currentHash}
tasks.register('checkAPIChanges', FileStateChecker) {
description = "Checks that the API for the Plugin-API project does not change without deliberate thought"
files = sourceSets.main.allJava.files
knownHash = 'VpNy2KuAtEUc9hPguNivbjwy2YM3vIF444RCREJojqY='
knownHash = '3+WNtdl1idY70N/MwVBbopU2ZWyWiu12YV1qaYXprZ8='
}
check.dependsOn('checkAPIChanges')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,14 @@ default boolean includeInDatabaseVersion(final int version) {
* @return true if the segment is involved with the high spec flag
*/
boolean isEligibleToHighSpecFlag();

/**
* Enable garbage collection for static data. This should be enabled for static data which can be
* deleted or pruned.
*
* @return true if enabled, false otherwise.
*/
default boolean isStaticDataGarbageCollectionEnabled() {
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private ColumnFamilyDescriptor createColumnDescriptor(
if (segment.containsStaticData()) {
options
.setEnableBlobFiles(true)
.setEnableBlobGarbageCollection(false)
.setEnableBlobGarbageCollection(segment.isStaticDataGarbageCollectionEnabled())
.setMinBlobSize(100)
.setBlobCompressionType(CompressionType.LZ4_COMPRESSION);
}
Expand Down