Skip to content

chore: Move consensus-state classes in separate module#23379

Open
netopyr wants to merge 7 commits intomainfrom
23311-move-consensus-state
Open

chore: Move consensus-state classes in separate module#23379
netopyr wants to merge 7 commits intomainfrom
23311-move-consensus-state

Conversation

@netopyr
Copy link
Contributor

@netopyr netopyr commented Feb 6, 2026

Description:

This PR moves the minimal set of state classes that are used by our modules into a new module consensus-state. We will have to move more classes later, but for the gossip, pces, and reconnect module, this is all we need.

Related issue(s):

Fixes #23311

Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
@netopyr netopyr added this to the v0.72 milestone Feb 6, 2026
@netopyr netopyr requested a review from poulok February 6, 2026 14:31
@netopyr netopyr self-assigned this Feb 6, 2026
@netopyr netopyr requested review from a team as code owners February 6, 2026 14:31
@trunk-io
Copy link

trunk-io bot commented Feb 6, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@lfdt-bot
Copy link

lfdt-bot commented Feb 6, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
# Conflicts:
#	platform-sdk/consensus-state/src/main/java/org/hiero/consensus/state/signed/SignedState.java
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/StateInitializer.java
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/reconnect/ReconnectStatePeerProtocol.java
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/snapshot/SignedStateFileReader.java
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/state/snapshot/SignedStateFileWriter.java
#	platform-sdk/swirlds-platform-core/src/main/java/module-info.java
#	platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/SignedStateFileReadWriteTest.java
#	platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/eventhandling/TransactionPrehandlerTests.java
#	platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/state/signed/DefaultStateHasherTests.java
#	platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/system/state/notifications/StateHashedNotificationTest.java
#	platform-sdk/swirlds-platform-core/src/test/java/com/swirlds/platform/wiring/SignedStateReserverTest.java
#	platform-sdk/swirlds-platform-core/src/testFixtures/java/com/swirlds/platform/test/fixtures/state/SignedStateUtils.java
Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
Signed-off-by: Michael Heinrichs <netopyr@users.noreply.github.com>
# Conflicts:
#	platform-sdk/swirlds-cli/src/main/java/org/hiero/consensus/pcli/recovery/EventRecoveryWorkflow.java
#	platform-sdk/swirlds-platform-core/src/main/java/com/swirlds/platform/gui/internal/GuiStateInfo.java
#	platform-sdk/swirlds-platform-core/src/testFixtures/java/module-info.java
@codacy-production
Copy link

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.01% (target: -1.00%) 44.44%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2a023e7) 91276 74848 82.00%
Head commit (ad7318c) 91279 (+3) 74844 (-4) 81.99% (-0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#23379) 9 4 44.44%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...sus/state/signed/DefaultStateGarbageCollector.java 0.00% 3 Missing ⚠️
...lds/platform/builder/PlatformComponentBuilder.java 0.00% 2 Missing ⚠️

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #23379      +/-   ##
============================================
- Coverage     78.02%   78.01%   -0.02%     
+ Complexity    23413    23407       -6     
============================================
  Files          2458     2459       +1     
  Lines         91459    91462       +3     
  Branches       9710     9710              
============================================
- Hits          71359    71352       -7     
- Misses        16511    16518       +7     
- Partials       3589     3592       +3     
Files with missing lines Coverage Δ Complexity Δ
...rc/main/java/com/hedera/node/app/ServicesMain.java 21.66% <ø> (ø) 6.00 <0.00> (ø)
.../org/hiero/consensus/state/config/StateConfig.java 50.00% <ø> (ø) 2.00 <0.00> (?)
...nsus/state/config/StateConfigurationExtension.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...ro/consensus/state/signed/ReservedSignedState.java 94.54% <ø> (ø) 23.00 <0.00> (?)
.../java/org/hiero/consensus/state/signed/SigSet.java 69.69% <ø> (ø) 12.00 <0.00> (?)
.../org/hiero/consensus/state/signed/SignedState.java 84.13% <ø> (ø) 54.00 <0.00> (?)
...ero/consensus/state/signed/SignedStateHistory.java 92.85% <ø> (ø) 6.00 <0.00> (?)
...nsus/state/signed/SignedStateInvalidException.java 33.33% <ø> (ø) 1.00 <0.00> (?)
...o/consensus/state/signed/SignedStateReference.java 86.95% <ø> (ø) 8.00 <0.00> (?)
...ro/consensus/state/snapshot/StateToDiskReason.java 100.00% <ø> (ø) 3.00 <0.00> (?)
... and 54 more

... and 8 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move required state classes to consensus-state module

3 participants