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

chore: Clean up HIP-423 loose ends #16734

Merged

Conversation

tinker-michaelj
Copy link
Collaborator

@tinker-michaelj tinker-michaelj commented Nov 22, 2024

Description:

  • Refactors ScheduleService state to a block stream-friendly representation that avoids O(n^2) footprint for updating a second n times.
  • Adds expiry validation and response codes.
  • Implements ingest throttle on the number of transactions scheduling.maxTxnPerSec=100 that can be scheduled for a single second.
  • Implements consensus throttling where the scheduled capacity of a single second is set relative to total network capacity by the scheduling.schedulableCapacityFraction=1:10 property.
    • Reuses app's consensus throttling strategy by adding a Throttle.Factory to the AppContext.

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
@tinker-michaelj tinker-michaelj added this to the v0.57 milestone Nov 22, 2024
@tinker-michaelj tinker-michaelj self-assigned this Nov 22, 2024
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 83.56164% with 84 lines in your changes missing coverage. Please review.

Project coverage is 63.59%. Comparing base (dac374c) to head (54bdb02).

Files with missing lines Patch % Lines
...dera/node/app/workflows/handle/HandleWorkflow.java 79.09% 14 Missing and 9 partials ⚠️
...rvice/schedule/impl/WritableScheduleStoreImpl.java 79.68% 12 Missing and 1 partial ⚠️
...ra/node/app/blocks/impl/KVStateChangeListener.java 0.00% 12 Missing ⚠️
.../hedera/node/app/throttle/ThrottleAccumulator.java 76.00% 8 Missing and 4 partials ⚠️
...app/service/schedule/impl/ScheduleServiceImpl.java 87.01% 5 Missing and 5 partials ⚠️
...ice/token/impl/handlers/FinalizeRecordHandler.java 14.28% 6 Missing ⚠️
...-app/src/main/java/com/hedera/node/app/Hedera.java 78.57% 2 Missing and 1 partial ⚠️
...app/workflows/standalone/TransactionExecutors.java 76.92% 3 Missing ⚠️
.../node/app/workflows/prehandle/PreHandleResult.java 33.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@                               Coverage Diff                                @@
##             15055-POC-long-term-scheduled-transactions   #16734      +/-   ##
================================================================================
+ Coverage                                         63.41%   63.59%   +0.17%     
- Complexity                                        20316    20400      +84     
================================================================================
  Files                                              2545     2547       +2     
  Lines                                             94666    94887     +221     
  Branches                                           9887     9916      +29     
================================================================================
+ Hits                                              60037    60344     +307     
+ Misses                                            31008    30923      -85     
+ Partials                                           3621     3620       -1     
Files with missing lines Coverage Δ
.../utils/sysfiles/domain/throttling/ScaleFactor.java 100.00% <100.00%> (ø)
...ce/addressbook/impl/helpers/AddressBookHelper.java 55.17% <ø> (ø)
.../main/java/com/hedera/node/app/spi/AppContext.java 33.33% <ø> (ø)
...com/hedera/node/app/blocks/BlockStreamManager.java 100.00% <ø> (ø)
...om/hedera/node/app/blocks/impl/BlockImplUtils.java 79.46% <100.00%> (+0.37%) ⬆️
...a/node/app/blocks/impl/BlockStreamManagerImpl.java 94.88% <100.00%> (+0.10%) ⬆️
...e/app/blocks/impl/BoundaryStateChangeListener.java 63.95% <100.00%> (+1.30%) ⬆️
...ode/app/blocks/schemas/V0560BlockStreamSchema.java 100.00% <100.00%> (ø)
...a/com/hedera/node/app/services/AppContextImpl.java 100.00% <ø> (ø)
...a/com/hedera/node/app/store/ServiceApiFactory.java 93.33% <100.00%> (ø)
... and 26 more

... and 32 files with indirect coverage changes

Impacted file tree graph

---- 🚨 Try these New Features:

Copy link

codacy-production bot commented Nov 22, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.17% (target: -1.00%) 87.67%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (dac374c) 97431 63469 65.14%
Head commit (7923878) 97650 (+219) 63773 (+304) 65.31% (+0.17%)

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 (#16734) 511 448 87.67%

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

Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
@tinker-michaelj tinker-michaelj marked this pull request as draft November 22, 2024 04:58
JivkoKelchev and others added 4 commits November 22, 2024 12:27
Signed-off-by: Zhivko Kelchev <zhivko.kelchev@limechain.tech>
Signed-off-by: Zhivko Kelchev <zhivko.kelchev@limechain.tech>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
@tinker-michaelj tinker-michaelj marked this pull request as ready for review November 24, 2024 21:41
tinker-michaelj and others added 12 commits November 24, 2024 15:42
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Co-authored-by: Joseph S. <121976561+jsync-swirlds@users.noreply.github.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
Signed-off-by: Michael Tinker <michael.tinker@swirldslabs.com>
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.

2 participants