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

Redo network throttles and automate congestion pricing #1204

Merged
merged 68 commits into from
Apr 5, 2021

Conversation

tinker-michaelj
Copy link
Collaborator

@tinker-michaelj tinker-michaelj commented Mar 28, 2021

Related issues

Summary of the change:

  1. Introduce a new design for throttling Hedera operations.
  2. Get throttle definitions from the new system file 0.0.123 as an instance of the ThrottleDefinitions protobuf type. (At network genesis, bootstrap file 0.0.123 from the JAR resource given by bootstrap.throttleDefsJson.resource.)
  3. Create a deterministic throttle capable of enforcing discrete rates from 1/1000th tps (1 mtps) to ~9M tps.
  4. Keep the handleTransaction throttle's current usage in state in the MerkleNetworkContext.
  5. When the usage of any bucket mapped to CryptoTransfer exceeds given thresholds for at least fees.minCongestionPeriod seconds, scale fees by associated multipliers using a new TxnRateFeeMultiplierSource component.
  6. Refactor the last handful of PropertiesLoader properties to close Rationalize based on Platform properties taxonomy :: Node-local/Network and Static/Dynamic #104.
    • Rework NettyServerManager with TDD as the ConfigDrivenNettyFactory.
    • Extract permissions management into a small HapiOpPermissions manager.
    • Add a README on Services property-based config.

Applicable documentation

  • Javadoc
  • HAPI protobuf comments
  • README

tinker-michaelj added 22 commits March 22, 2021 17:29
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
@tinker-michaelj tinker-michaelj marked this pull request as draft March 28, 2021 02:48
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
@codecov
Copy link

codecov bot commented Mar 28, 2021

Codecov Report

Merging #1204 (92bd4cc) into master (2ff1e35) will decrease coverage by 0.16%.
The diff coverage is 95.82%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1204      +/-   ##
============================================
- Coverage     87.66%   87.49%   -0.17%     
- Complexity     5292     5612     +320     
============================================
  Files           432      450      +18     
  Lines         15699    16838    +1139     
  Branches       1627     1756     +129     
============================================
+ Hits          13762    14732     +970     
- Misses         1497     1621     +124     
- Partials        440      485      +45     
Impacted Files Coverage Δ Complexity Δ
...dera/services/context/AwareTransactionContext.java 95.20% <0.00%> (ø) 40.00 <0.00> (ø)
...dera/services/contracts/execution/DomainUtils.java 98.18% <ø> (ø) 12.00 <0.00> (ø)
.../hedera/services/legacy/handler/FreezeHandler.java 82.90% <ø> (-0.15%) 14.00 <0.00> (ø)
...es/legacy/handler/SmartContractRequestHandler.java 53.41% <0.00%> (+49.87%) 35.00 <0.00> (+33.00)
...vices/throttling/TimedFunctionalityThrottling.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...vices/legacy/services/state/AwareProcessLogic.java 18.40% <30.76%> (-1.19%) 6.00 <2.00> (-2.00)
...vices/state/initialization/SystemFilesManager.java 87.50% <66.66%> (-12.50%) 1.00 <0.00> (ø)
...n/java/com/hedera/services/config/FileNumbers.java 82.92% <75.00%> (-0.86%) 12.00 <1.00> (+1.00) ⬇️
...ra/services/legacy/handler/TransactionHandler.java 66.99% <75.67%> (+2.89%) 52.00 <14.00> (+9.00)
...a/com/hedera/services/state/forensics/FcmDump.java 82.14% <82.14%> (ø) 5.00 <5.00> (?)
... and 85 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ff1e35...92bd4cc. Read the comment docs.

tinker-michaelj added 5 commits March 28, 2021 10:35
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
tinker-michaelj added 28 commits March 31, 2021 12:13
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
…eriod

Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
…erlaps w/ linked schedule key

Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
… in SteadyStateThrottlingCheck

Signed-off-by: tinker-michaelj <michael.tinker@hedera.com>
@tinker-michaelj tinker-michaelj merged commit 08fcb23 into master Apr 5, 2021
@tinker-michaelj tinker-michaelj deleted the new-throttling-spec branch April 5, 2021 20:35
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.

Rationalize based on Platform properties taxonomy :: Node-local/Network and Static/Dynamic
1 participant