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

refactor: enhance SwirldState preHandle and handleConsensusRound methods with consumer for system transactions #16897

Merged
merged 4 commits into from
Dec 6, 2024

Conversation

mustafauzunn
Copy link
Collaborator

Description:

To accommodate the serializing of transaction bytes inside hedera.app and get system transactions back to the platform we should make a change in the core hedera.app entry point which is SwirldState API.

We should enhance preHandle and handleConsensusRound methods with an additional argument, which is a callback in the form of Consumer<List<ScopedSystemTransaction<StateSignatureTransaction>>> stateSignatureTransactions

It will be later used to populate SystemTransactions in it.

Related issue(s):

Fixes #16703

Notes for reviewer:

Checklist

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

…ods with consumer for system transactions

Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
@mustafauzunn mustafauzunn added the Platform Tickets pertaining to the platform label Dec 4, 2024
@mustafauzunn mustafauzunn added this to the v0.58 milestone Dec 4, 2024
@mustafauzunn mustafauzunn self-assigned this Dec 4, 2024
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 63.89%. Comparing base (a838b95) to head (1a79a6c).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...rm/eventhandling/DefaultTransactionPrehandler.java 33.33% 2 Missing ⚠️
.../java/com/swirlds/platform/system/SwirldState.java 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             develop   #16897      +/-   ##
=============================================
- Coverage      63.89%   63.89%   -0.01%     
- Complexity     20599    20600       +1     
=============================================
  Files           2541     2541              
  Lines          95241    95243       +2     
  Branches        9952     9952              
=============================================
+ Hits           60852    60853       +1     
- Misses         30792    30793       +1     
  Partials        3597     3597              
Files with missing lines Coverage Δ
.../demo/addressbook/AddressBookTestingToolState.java 0.00% <ø> (ø)
.../demo/consistency/ConsistencyTestingToolState.java 0.00% <ø> (ø)
...java/com/swirlds/demo/iss/ISSTestingToolState.java 0.00% <ø> (ø)
...rlds/demo/migration/MigrationTestingToolState.java 0.00% <ø> (ø)
...wirlds/demo/platform/PlatformTestingToolState.java 0.00% <ø> (ø)
...mo/stats/signing/StatsSigningTestingToolState.java 0.00% <ø> (ø)
...om/swirlds/demo/stress/StressTestingToolState.java 0.00% <ø> (ø)
...irlds/platform/recovery/EventRecoveryWorkflow.java 18.27% <100.00%> (ø)
...wirlds/platform/state/PlatformMerkleStateRoot.java 73.46% <ø> (ø)
...com/swirlds/platform/state/SwirldStateManager.java 96.55% <ø> (ø)
... and 3 more

... and 13 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Dec 4, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) 57.14%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (a838b95) 98006 64258 65.57%
Head commit (1a79a6c) 98008 (+2) 64259 (+1) 65.57% (+0.00%)

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 (#16897) 7 4 57.14%

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

@mustafauzunn mustafauzunn marked this pull request as ready for review December 5, 2024 09:02
@mustafauzunn mustafauzunn requested a review from a team as a code owner December 5, 2024 09:02
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
Signed-off-by: Mustafa Uzun <mustafa.uzun@limechain.tech>
@mustafauzunn mustafauzunn merged commit 710adf4 into develop Dec 6, 2024
44 of 46 checks passed
@mustafauzunn mustafauzunn deleted the 16703-enhance-swirld-state-with-callback branch December 6, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Tickets pertaining to the platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhance SwirldState API with additional callback
2 participants