Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Initialize State before Platform construction #16081

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

thomas-swirlds-labs
Copy link
Contributor

@thomas-swirlds-labs thomas-swirlds-labs commented Oct 22, 2024

Description:

  • Removes dependency on Platform Context when initializing the States API
  • Moves initialization functionality to occur earlier in the Services startup phase
  • Refactoring migrateAndInitialize from Hedera into ServicesMain
  • Additional testing

Related issue(s):

Fixes #15993

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@thomas-swirlds-labs thomas-swirlds-labs added this to the v0.56 milestone Oct 22, 2024
@thomas-swirlds-labs thomas-swirlds-labs self-assigned this Oct 22, 2024
@thomas-swirlds-labs thomas-swirlds-labs changed the title Initialize State before Platform construction feat: Initialize State before Platform construction Oct 22, 2024
Copy link

github-actions bot commented Oct 22, 2024

Node: HAPI Test (Restart) Results

7 tests   1 ✅  2m 5s ⏱️
8 suites  0 💤
9 files    6 ❌
1 errors

For more details on these parsing errors and failures, see this check.

Results for commit 7802c69.

♻️ This comment has been updated with latest results.

Copy link

codacy-production bot commented Oct 22, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.06% (target: -1.00%) 8.15%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (6620006) 99734 61521 61.69%
Head commit (8e8ac92) 99807 (+73) 61509 (-12) 61.63% (-0.06%)

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 (#16081) 135 11 8.15%

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

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 8.14815% with 124 lines in your changes missing coverage. Please review.

Project coverage is 58.02%. Comparing base (6620006) to head (8e8ac92).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...rc/main/java/com/hedera/node/app/ServicesMain.java 0.00% 102 Missing ⚠️
...-app/src/main/java/com/hedera/node/app/Hedera.java 0.00% 8 Missing ⚠️
...irlds/platform/state/signed/StartupStateUtils.java 58.33% 5 Missing ⚠️
...irlds/platform/recovery/EventRecoveryWorkflow.java 0.00% 2 Missing ⚠️
...om/swirlds/platform/state/GenesisStateBuilder.java 0.00% 2 Missing ⚠️
...com/swirlds/platform/state/editor/StateEditor.java 0.00% 2 Missing ⚠️
...com/swirlds/platform/cli/CompareStatesCommand.java 0.00% 1 Missing ⚠️
...rlds/platform/cli/GenesisPlatformStateCommand.java 0.00% 1 Missing ⚠️
.../platform/cli/ValidateAddressBookStateCommand.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16081      +/-   ##
=============================================
- Coverage      58.08%   58.02%   -0.06%     
+ Complexity     19799    19794       -5     
=============================================
  Files           2726     2726              
  Lines          99917    99990      +73     
  Branches       10320    10326       +6     
=============================================
- Hits           58039    58023      -16     
- Misses         38259    38344      +85     
- Partials        3619     3623       +4     
Files with missing lines Coverage Δ
...re/src/main/java/com/swirlds/platform/Browser.java 0.00% <ø> (ø)
...tform/eventhandling/DefaultTransactionHandler.java 81.39% <100.00%> (+0.21%) ⬆️
...m/swirlds/platform/reconnect/ReconnectLearner.java 76.71% <100.00%> (+0.32%) ⬆️
...com/swirlds/platform/state/signed/SignedState.java 86.30% <100.00%> (ø)
...platform/state/snapshot/SignedStateFileReader.java 73.33% <100.00%> (ø)
...com/swirlds/platform/cli/CompareStatesCommand.java 0.00% <0.00%> (ø)
...rlds/platform/cli/GenesisPlatformStateCommand.java 0.00% <0.00%> (ø)
.../platform/cli/ValidateAddressBookStateCommand.java 0.00% <0.00%> (ø)
...irlds/platform/recovery/EventRecoveryWorkflow.java 18.27% <0.00%> (-0.20%) ⬇️
...om/swirlds/platform/state/GenesisStateBuilder.java 0.00% <0.00%> (ø)
... and 4 more

... and 10 files with indirect coverage changes

Impacted file tree graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

Successfully merging this pull request may close these issues.

Initialize State API **before** constructing PlatformBuilder to e.g. choose active Roster
2 participants