Skip to content

Commit

Permalink
Merge branch 'develop' into 05786-5396-misc-startup-improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Cody Littley <cody@swirldslabs.com>
  • Loading branch information
cody-littley committed Mar 30, 2023
2 parents 84d4b64 + 6583dc1 commit c244baa
Show file tree
Hide file tree
Showing 46 changed files with 1,282 additions and 291 deletions.
1 change: 1 addition & 0 deletions hedera-node/configuration/dev/bootstrap.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bootstrap.throttleDefsJson.resource=throttles-dev.json
virtualdatasource.jasperdbToMerkledb=true
9 changes: 6 additions & 3 deletions hedera-node/configuration/dev/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@
<Logger name="com.swirlds" level="INFO" additivity="false">
<AppenderRef ref="fileLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</AppenderRef>

<AppenderRef ref="vMapLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
</Filters>
Expand Down Expand Up @@ -183,8 +185,9 @@
<MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDd & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
Expand Down
1 change: 1 addition & 0 deletions hedera-node/configuration/dev/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ state.signedStateKeep, 10
useLoopbackIp, false
waitAtStartup, false
jasperDb.iteratorInputBufferBytes, 16777216
merkleDb.iteratorInputBufferBytes, 16777216
virtualMap.preferredFlushQueueSize, 10000
transThrottle, false
9 changes: 6 additions & 3 deletions hedera-node/configuration/mainnet/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,19 @@
<Logger name="com.swirlds" level="INFO" additivity="false">
<AppenderRef ref="fileLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</AppenderRef>

<AppenderRef ref="vMapLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
</Filters>
Expand Down Expand Up @@ -181,8 +183,9 @@
<MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
Expand Down
2 changes: 1 addition & 1 deletion hedera-node/configuration/mainnet/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ state.signedStateKeep, 10
throttle7extra, 0.5
useLoopbackIp, false
waitAtStartup, false
jasperDb.storagePath, /opt/hgcapp/services-hedera/HapiApp2.0/data/saved
jasperDb.iteratorInputBufferBytes, 16777216
merkleDb.iteratorInputBufferBytes, 16777216
virtualMap.preferredFlushQueueSize, 10000
state.mainClassNameOverride, com.hedera.services.ServicesMain
prometheusEndpointEnabled, true
Expand Down
9 changes: 6 additions & 3 deletions hedera-node/configuration/preprod/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,19 @@
<Logger name="com.swirlds" level="INFO" additivity="false">
<AppenderRef ref="fileLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</AppenderRef>

<AppenderRef ref="vMapLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
</Filters>
Expand Down Expand Up @@ -243,8 +245,9 @@
<MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
Expand Down
2 changes: 1 addition & 1 deletion hedera-node/configuration/preprod/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ state.signedStateKeep, 10
throttle7extra, 0.5
useLoopbackIp, false
waitAtStartup, false
jasperDb.storagePath, /opt/hgcapp/services-hedera/HapiApp2.0/data/saved
jasperDb.iteratorInputBufferBytes, 16777216
merkleDb.iteratorInputBufferBytes, 16777216
virtualMap.preferredFlushQueueSize, 10000
prometheusEndpointEnabled, true
state.mainClassNameOverride, com.hedera.services.ServicesMain
Expand Down
9 changes: 6 additions & 3 deletions hedera-node/configuration/previewnet/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@
<Logger name="com.swirlds" level="INFO" additivity="false">
<AppenderRef ref="fileLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</AppenderRef>

<AppenderRef ref="vMapLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
</Filters>
Expand Down Expand Up @@ -183,8 +185,9 @@
<MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
Expand Down
2 changes: 1 addition & 1 deletion hedera-node/configuration/previewnet/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ state.signedStateKeep, 10
throttle7extra, 0.5
useLoopbackIp, false
waitAtStartup, false
jasperDb.storagePath, /opt/hgcapp/services-hedera/HapiApp2.0/data/saved
jasperDb.iteratorInputBufferBytes, 16777216
merkleDb.iteratorInputBufferBytes, 16777216
virtualMap.preferredFlushQueueSize, 10000
state.mainClassNameOverride, com.hedera.services.ServicesMain
prometheusEndpointEnabled, true
Expand Down
9 changes: 6 additions & 3 deletions hedera-node/configuration/testnet/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@
<Logger name="com.swirlds" level="INFO" additivity="false">
<AppenderRef ref="fileLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="STATE_HASH" onMatch="DENY" onMismatch="NEUTRAL"/>
</Filters>
</AppenderRef>

<AppenderRef ref="vMapLog">
<Filters>
<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
</Filters>
Expand Down Expand Up @@ -183,8 +185,9 @@
<MarkerFilter marker="MERKLE_GENERATION" onMatch="DENY" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_LOCKS" onMatch="DENY" onMismatch="NEUTRAL"/>

<!-- JasperDB & Virtual Merkle -->
<!-- JasperDB / MerkleDb & Virtual Merkle -->
<MarkerFilter marker="JASPER_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="MERKLE_DB" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
<MarkerFilter marker="VIRTUAL_MERKLE_STATS" onMatch="ACCEPT" onMismatch="NEUTRAL"/>

<MarkerFilter marker="DISABLED" onMatch="DENY" onMismatch="DENY" />
Expand Down
2 changes: 1 addition & 1 deletion hedera-node/configuration/testnet/settings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ state.signedStateKeep, 10
throttle7extra, 0.5
useLoopbackIp, false
waitAtStartup, false
jasperDb.storagePath, /opt/hgcapp/services-hedera/HapiApp2.0/data/saved
jasperDb.iteratorInputBufferBytes, 16777216
merkleDb.iteratorInputBufferBytes, 16777216
virtualMap.preferredFlushQueueSize, 10000
state.mainClassNameOverride, com.hedera.services.ServicesMain
chatter.useChatter, false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ hedera.prefetch.threadPoolSize=4
hedera.prefetch.codeCacheTtlSecs=600
utilPrng.isEnabled=true
tokens.autoCreations.isEnabled=true
virtualdatasource.jasperdbToMerkledb=false
virtualdatasource.jasperdbToMerkledb=true
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public void simulateContractTransaction() {
private void registerConstructables() {
try {
Constructables.registerForAccounts();
Constructables.registerForJasperDb();
Constructables.registerForMerkleMap();
Constructables.registerForVirtualMap();
Constructables.registerForVirtualDataSource();
Constructables.registerForContractStorage();
} catch (final ConstructableRegistryException e) {
throw new IllegalStateException(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.swirlds.merkle.map.MerkleMap;
import com.swirlds.merkle.tree.MerkleBinaryTree;
import com.swirlds.merkle.tree.MerkleTreeInternalNode;
import com.swirlds.merkledb.MerkleDbDataSourceBuilder;
import com.swirlds.virtualmap.VirtualMap;
import com.swirlds.virtualmap.internal.cache.VirtualNodeCache;
import com.swirlds.virtualmap.internal.merkle.VirtualMapState;
Expand Down Expand Up @@ -129,8 +130,11 @@ public static void registerForVirtualMap() throws ConstructableRegistryException
.registerConstructable(new ClassConstructorPair(VirtualNodeCache.class, VirtualNodeCache::new));
}

public static void registerForJasperDb() throws ConstructableRegistryException {
public static void registerForVirtualDataSource() throws ConstructableRegistryException {
ConstructableRegistry.getInstance()
.registerConstructable(new ClassConstructorPair(JasperDbBuilder.class, JasperDbBuilder::new));
ConstructableRegistry.getInstance()
.registerConstructable(
new ClassConstructorPair(MerkleDbDataSourceBuilder.class, MerkleDbDataSourceBuilder::new));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ class BootstrapPropertiesTest {
entry(HEDERA_RECORD_STREAM_COMPRESS_FILES_ON_CREATION, true),
entry(TOKENS_AUTO_CREATIONS_ENABLED, true),
entry(WORKFLOWS_ENABLED, Set.of()),
entry(VIRTUALDATASOURCE_JASPERDB_TO_MERKLEDB, false));
entry(VIRTUALDATASOURCE_JASPERDB_TO_MERKLEDB, true));

@Test
void containsProperty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,4 +211,4 @@ hedera.prefetch.threadPoolSize=4
hedera.prefetch.codeCacheTtlSecs=600
utilPrng.isEnabled=true
tokens.autoCreations.isEnabled=true
virtualdatasource.jasperdbToMerkledb=false
virtualdatasource.jasperdbToMerkledb=true
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,4 @@ stats.runningAvgHalfLifeSecs=10.0
stats.speedometerHalfLifeSecs=10.0
utilPrng.isEnabled=true
tokens.autoCreations.isEnabled=true
virtualdatasource.jasperdbToMerkledb=false
virtualdatasource.jasperdbToMerkledb=true

0 comments on commit c244baa

Please sign in to comment.