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

Simplify fee charging #1479

Closed
wants to merge 20 commits into from
Closed

Conversation

tinker-michaelj
Copy link
Collaborator

@tinker-michaelj tinker-michaelj commented May 26, 2021

Related issues:

Summary of the change:

  • Replace ItemizableFeeCharging with a much simpler NarratedCharging that supports just the charging actions actually needed by the TxnFeeChargingPolicy.
  • Add some EET specs in the RecordCreationSuite that use uncheckedSubmit to validate the network fee is charged to a node that submits a transaction without performing its required prechecks.
    • Add uncheckedSubmit=2-50 to dev api-permission.properties so these specs can run in CI.

External impacts:
None.

Applicable documentation

  • Javadoc

tinker-michaelj added 20 commits May 22, 2021 10:51
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
Signed-off-by: tinker-michaelj <[email protected]>
@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #1479 (882187a) into master (dca836f) will decrease coverage by 0.04%.
The diff coverage is 88.70%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1479      +/-   ##
============================================
- Coverage     91.39%   91.35%   -0.05%     
+ Complexity     5899     5864      -35     
============================================
  Files           461      460       -1     
  Lines         16932    16875      -57     
  Branches       1783     1779       -4     
============================================
- Hits          15475    15416      -59     
- Misses          991      994       +3     
+ Partials        466      465       -1     
Impacted Files Coverage Δ
...om/hedera/services/context/TransactionContext.java 100.00% <ø> (ø)
...vices/legacy/services/state/AwareProcessLogic.java 30.35% <0.00%> (ø)
...in/java/com/hedera/services/utils/TxnAccessor.java 0.00% <ø> (ø)
...services/fees/charging/NarratedLedgerCharging.java 89.18% <89.18%> (ø)
...dera/services/context/AwareTransactionContext.java 100.00% <100.00%> (+0.82%) ⬆️
...ain/java/com/hedera/services/context/NodeInfo.java 100.00% <100.00%> (ø)
...a/com/hedera/services/context/ServicesContext.java 94.69% <100.00%> (+0.11%) ⬆️
...a/services/fees/charging/TxnFeeChargingPolicy.java 100.00% <100.00%> (ø)
...a/com/hedera/services/utils/SignedTxnAccessor.java 97.43% <100.00%> (+0.06%) ⬆️
...main/java/com/hedera/services/fees/TxnFeeType.java 0.00% <0.00%> (-100.00%) ⬇️
... and 1 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 dca836f...882187a. Read the comment docs.

@tinker-michaelj
Copy link
Collaborator Author

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.

Remove unnecessary generality from ItemizableFeeCharging
1 participant