diff --git a/platform-sdk/docs/core/wiring-diagram.svg b/platform-sdk/docs/core/wiring-diagram.svg index c68203693ea7..05913d6c4929 100644 --- a/platform-sdk/docs/core/wiring-diagram.svg +++ b/platform-sdk/docs/core/wiring-diagram.svg @@ -1 +1 @@ -
Transaction Handling
State Verification
State Signature Collection
State File Management
Preconsensus Event Stream
PCES Replay
Miscellaneous
Event Intake
Event Creation
Consensus
Branch Detection
❔🌀
Consensus Engine
❔🚦
🌀
🚽
EventCreationManager
❔❤️🌀🏥🚦
TransactionPool
♻️❔🏥🖋️🚦
♻️
⚰️
Mystery Input
RunningEventHashOverride
❤️
🏥
💨
🚦
PcesWriter
✅❔🌀📀🚽
💾
📀
latestCompleteStateNexus
🌀
💢
ISS Detector
💀
💥
🖋️
latestImmutableStateNexus
gossip
❔🌀🏥📬🚦
notifier
❔💢💥🚦
🍎
📝
📬
🔮
🔰
consensus events
rounds
rounds
event window
flush request
future hash
self events
get transactions
GossipEvent
non-validated events
unordered events
health info
check system health
checkSignedStates
evaluate status
heartbeat
PlatformStatusAction
IssNotification
non-deduplicated events
mystery data
checkForBranches
GossipEvent
unsequenced event
GossipEvent
GossipEvent
events to gossip
preconsensus signatures
GossipEvent
events to write
durable event info
handleConsensusRound
hash override
self events
stale events
publishStaleEvent
non-validated events
hashed states
handleStateAndRound
consensus events
hashed states
signState
states
complete state
complete state notification
state written notification
PlatformStatusAction
minimum identifier to store
submit transaction
PlatformStatus
unhashed state and round
registerState
setState
submit transaction
futures
unhashed event
unhashed event
done streaming pces
\ No newline at end of file +
Transaction Handling
State Verification
State Signature Collection
State File Management
Preconsensus Event Stream
PCES Replay
Miscellaneous
Event Intake
Event Creation
Consensus
Branch Detection
❔🌀
Consensus Engine
❔🚦
🌀
🚽
EventCreationManager
❔❤️🌀🏥🚦
TransactionPool
♻️❔🏥🖋️🚦
♻️
⚰️
PostHashCollector
Mystery Input
RunningEventHashOverride
❤️
🏥
💨
🚦
PcesWriter
✅❔🌀📀🚽
💾
📀
latestCompleteStateNexus
🌀
💢
ISS Detector
💀
💥
🖋️
latestImmutableStateNexus
gossip
❔🌀🏥📬🚦
notifier
❔💢💥🚦
🍎
📝
📬
🔮
🔰
consensus events
rounds
rounds
event window
flush request
future hash
self events
get transactions
GossipEvent
GossipEvent
unordered events
health info
check system health
checkSignedStates
evaluate status
heartbeat
PlatformStatusAction
IssNotification
non-deduplicated events
mystery data
checkForBranches
GossipEvent
unsequenced event
GossipEvent
GossipEvent
events to gossip
preconsensus signatures
GossipEvent
events to write
durable event info
non-validated events
handleConsensusRound
hash override
self events
stale events
publishStaleEvent
non-validated events
hashed states
handleStateAndRound
consensus events
hashed states
signState
states
complete state
complete state notification
state written notification
PlatformStatusAction
minimum identifier to store
submit transaction
PlatformStatus
unhashed state and round
registerState
setState
submit transaction
futures
unhashed event
unhashed event
done streaming pces
\ No newline at end of file diff --git a/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/WiringConfig.java b/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/WiringConfig.java index bd43f80208f6..180418dc326f 100644 --- a/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/WiringConfig.java +++ b/platform-sdk/swirlds-common/src/main/java/com/swirlds/common/wiring/WiringConfig.java @@ -41,8 +41,8 @@ */ @ConfigData("platform.wiring") public record WiringConfig( - @ConfigProperty(defaultValue = "true") boolean healthMonitorEnabled, - @ConfigProperty(defaultValue = "false") boolean hardBackpressureEnabled, + @ConfigProperty(defaultValue = "false") boolean healthMonitorEnabled, + @ConfigProperty(defaultValue = "true") boolean hardBackpressureEnabled, @ConfigProperty(defaultValue = "1.0") double defaultPoolMultiplier, @ConfigProperty(defaultValue = "0") int defaultPoolConstant, @ConfigProperty(defaultValue = "500") int healthMonitorSchedulerCapacity, diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/consensus/ConsensusConfig.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/consensus/ConsensusConfig.java index 60cd9d1a6908..6ec2ca755902 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/consensus/ConsensusConfig.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/consensus/ConsensusConfig.java @@ -36,5 +36,5 @@ @ConfigData("consensus") public record ConsensusConfig( @ConfigProperty(defaultValue = "26") int roundsNonAncient, - @ConfigProperty(defaultValue = "2000") int roundsExpired, + @ConfigProperty(defaultValue = "500") int roundsExpired, @ConfigProperty(defaultValue = "12") int coinFreq) {} diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/creation/EventCreationConfig.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/creation/EventCreationConfig.java index 75abf2bb0304..a97b35cda929 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/creation/EventCreationConfig.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/event/creation/EventCreationConfig.java @@ -54,5 +54,5 @@ public record EventCreationConfig( @ConfigProperty(defaultValue = "10") double antiSelfishnessFactor, @ConfigProperty(defaultValue = "10") int tipsetSnapshotHistorySize, @ConfigProperty(defaultValue = "1024") int eventIntakeThrottle, - @ConfigProperty(defaultValue = "false") boolean useLegacyBackpressure, + @ConfigProperty(defaultValue = "true") boolean useLegacyBackpressure, @ConfigProperty(defaultValue = "5s") Duration maximumPermissibleUnhealthyDuration) {} diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/eventhandling/EventConfig.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/eventhandling/EventConfig.java index 2d731fab9117..7b58ebf4fc9f 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/eventhandling/EventConfig.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/eventhandling/EventConfig.java @@ -44,7 +44,7 @@ public record EventConfig( @ConfigProperty(defaultValue = "/opt/hgcapp/eventsStreams") String eventsLogDir, @ConfigProperty(defaultValue = "true") boolean enableEventStreaming, @ConfigProperty(defaultValue = "false") boolean useBirthRoundAncientThreshold, - @ConfigProperty(defaultValue = "false") boolean useOldStyleIntakeQueue) { + @ConfigProperty(defaultValue = "true") boolean useOldStyleIntakeQueue) { /** * @return the {@link AncientMode} based on useBirthRoundAncientThreshold diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gossip/sync/config/SyncConfig.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gossip/sync/config/SyncConfig.java index 4299f0194908..0bfa8a3c7ae1 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gossip/sync/config/SyncConfig.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gossip/sync/config/SyncConfig.java @@ -55,14 +55,14 @@ public record SyncConfig( @ConfigProperty(defaultValue = "25") int syncSleepAfterFailedNegotiation, @ConfigProperty(defaultValue = "17") int syncProtocolPermitCount, - @ConfigProperty(defaultValue = "true") boolean onePermitPerPeer, + @ConfigProperty(defaultValue = "false") boolean onePermitPerPeer, @ConfigProperty(defaultValue = "1000") int syncProtocolHeartbeatPeriod, @ConfigProperty(defaultValue = "true") boolean waitForEventsInIntake, @ConfigProperty(defaultValue = "true") boolean filterLikelyDuplicates, @ConfigProperty(defaultValue = "3s") Duration nonAncestorFilterThreshold, @ConfigProperty(defaultValue = "500ms") Duration syncKeepalivePeriod, @ConfigProperty(defaultValue = "1m") Duration maxSyncTime, - @ConfigProperty(defaultValue = "5000") int maxSyncEventCount, + @ConfigProperty(defaultValue = "0") int maxSyncEventCount, @ConfigProperty(defaultValue = "5s") Duration unhealthyGracePeriod, @ConfigProperty(defaultValue = "5") double permitsRevokedPerSecond, @ConfigProperty(defaultValue = "0.1") double permitsReturnedPerSecond, diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformSchedulersConfig.java b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformSchedulersConfig.java index f16ae1118fde..4799d22714db 100644 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformSchedulersConfig.java +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/PlatformSchedulersConfig.java @@ -65,11 +65,11 @@ @ConfigData("platformSchedulers") public record PlatformSchedulersConfig( @ConfigProperty(defaultValue = "500") int eventHasherUnhandledCapacity, - @ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC") + @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration internalEventValidator, - @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE UNHANDLED_TASK_METRIC") + @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration eventDeduplicator, - @ConfigProperty(defaultValue = "CONCURRENT CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") + @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration eventSignatureValidator, @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration orphanBuffer, @@ -77,7 +77,7 @@ public record PlatformSchedulersConfig( defaultValue = "SEQUENTIAL_THREAD CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC BUSY_FRACTION_METRIC") TaskSchedulerConfiguration consensusEngine, - @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC") + @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(5000) FLUSHABLE SQUELCHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration eventCreationManager, @ConfigProperty(defaultValue = "DIRECT") TaskSchedulerConfiguration selfEventSigner, @ConfigProperty(defaultValue = "SEQUENTIAL_THREAD CAPACITY(20) UNHANDLED_TASK_METRIC") @@ -125,7 +125,7 @@ public record PlatformSchedulersConfig( @ConfigProperty(defaultValue = "DIRECT_THREADSAFE") TaskSchedulerConfiguration transactionPool, @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration gossip, - @ConfigProperty(defaultValue = "CONCURRENT CAPACITY(5000) UNHANDLED_TASK_METRIC") + @ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration eventHasher, @ConfigProperty(defaultValue = "CONCURRENT CAPACITY(-1) UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration postHashCollector, @@ -133,4 +133,4 @@ public record PlatformSchedulersConfig( TaskSchedulerConfiguration branchDetector, @ConfigProperty(defaultValue = "SEQUENTIAL CAPACITY(500) FLUSHABLE UNHANDLED_TASK_METRIC") TaskSchedulerConfiguration branchReporter, - @ConfigProperty(defaultValue = "false") boolean hashCollectorEnabled) {} + @ConfigProperty(defaultValue = "true") boolean hashCollectorEnabled) {} diff --git a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/generate-platform-diagram.sh b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/generate-platform-diagram.sh index 032194b749fd..c85579e369d1 100755 --- a/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/generate-platform-diagram.sh +++ b/platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/wiring/generate-platform-diagram.sh @@ -35,7 +35,7 @@ pcli diagram \ -s 'PcesWriter:durable event info:📝' \ -s 'HealthMonitor:health info:🏥' \ -g 'Orphan Buffer:OrphanBuffer,OrphanBufferSplitter' \ - -g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer' \ + -g 'Event Intake:EventHasher,InternalEventValidator,EventDeduplicator,EventSignatureValidator,Orphan Buffer,PostHashCollector' \ -g 'Consensus Engine:ConsensusEngine,ConsensusEngineSplitter,eventWindowManager,getKeystoneEventSequenceNumber,getConsensusEvents' \ -g 'State Snapshot Manager:saveToDiskFilter,StateSnapshotManager,extractOldestMinimumGenerationOnDisk,toStateWrittenToDiskAction,toNotification' \ -g 'State File Management:State Snapshot Manager,📀,💾' \ diff --git a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/event/stale/TransactionResubmitterTests.java b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/event/stale/TransactionResubmitterTests.java index 24614e768840..ee4970b92cf8 100644 --- a/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/event/stale/TransactionResubmitterTests.java +++ b/platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/event/stale/TransactionResubmitterTests.java @@ -78,7 +78,11 @@ void basicBehaviorTest() { final long round; if (tooOld) { - round = randotron.nextLong(1, currentRound - maxSignatureAge); + if (currentRound - maxSignatureAge > 1) { + round = randotron.nextLong(1, currentRound - maxSignatureAge); + } else { + round = 1; + } } else { round = randotron.nextLong(currentRound - maxSignatureAge, currentRound); } diff --git a/platform-sdk/swirlds-unit-tests/core/swirlds-platform-test/src/test/java/com/swirlds/platform/test/event/tipset/EventCreationManagerTests.java b/platform-sdk/swirlds-unit-tests/core/swirlds-platform-test/src/test/java/com/swirlds/platform/test/event/tipset/EventCreationManagerTests.java index 328b239ea858..bea5d1c59b28 100644 --- a/platform-sdk/swirlds-unit-tests/core/swirlds-platform-test/src/test/java/com/swirlds/platform/test/event/tipset/EventCreationManagerTests.java +++ b/platform-sdk/swirlds-unit-tests/core/swirlds-platform-test/src/test/java/com/swirlds/platform/test/event/tipset/EventCreationManagerTests.java @@ -117,10 +117,6 @@ void statusPreventsCreation() { assertSame(eventsToCreate.get(1), e1); } - /** - * this type of back pressure is disabled now, delete this test when we commit to removing it permanently - */ - @Disabled @Test void backpressurePreventsCreation() { final BaseEventHashedData e0 = manager.maybeCreateEvent(); @@ -164,6 +160,10 @@ void ratePreventsCreation() { assertSame(eventsToCreate.get(1), e1); } + /** + * This form of backpressure is not currently enabled. + */ + @Disabled @Test void unhealthyNodePreventsCreation() { final BaseEventHashedData e0 = manager.maybeCreateEvent();