Skip to content

Conversation

@joshmarinacci
Copy link
Contributor

@joshmarinacci joshmarinacci commented Nov 20, 2025

Description:

To support custom fees properly we need custom extras in the Simple Fees fee schedule. This PR:

  • adds two new extras to the Simple Fees fee schedule protobuf.
  • updates ConsensusCreateTopicFeeCalculator and ConsensusSubmitMessageFeeCalculator to use these new extras.
  • sets prices on the extras in the fee schedule to match the published prices.
  • adds two unit tests for custom fees to ConsensusServiceSimpleFeesSuite.

It also exposes readableStore in CalculatorState.

Related issue(s):

partially Fixes ##22171

Notes for reviewer:

Checklist

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

@joshmarinacci joshmarinacci requested review from a team as code owners November 20, 2025 00:10
@lfdt-bot
Copy link

lfdt-bot commented Nov 20, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@codacy-production
Copy link

codacy-production bot commented Nov 20, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.02% (target: -1.00%) 37.50%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (063ba56) 104800 78410 74.82%
Head commit (d6c70ec) 104816 (+16) 78402 (-8) 74.80% (-0.02%)

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 (#22252) 8 3 37.50%

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

@joshmarinacci joshmarinacci self-assigned this Nov 20, 2025
@joshmarinacci joshmarinacci added this to the v0.69 milestone Nov 20, 2025
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

❌ Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...alculator/ConsensusSubmitMessageFeeCalculator.java 20.00% 4 Missing ⚠️
.../calculator/ConsensusCreateTopicFeeCalculator.java 0.00% 1 Missing and 2 partials ⚠️

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #22252      +/-   ##
============================================
- Coverage     70.97%   70.94%   -0.03%     
+ Complexity    24616    24596      -20     
============================================
  Files          2698     2694       -4     
  Lines        104935   104913      -22     
  Branches      11029    11032       +3     
============================================
- Hits          74478    74433      -45     
- Misses        26441    26465      +24     
+ Partials       4016     4015       -1     
Files with missing lines Coverage Δ Complexity Δ
.../calculator/ConsensusCreateTopicFeeCalculator.java 50.00% <0.00%> (-10.00%) 3.00 <0.00> (ø)
...alculator/ConsensusSubmitMessageFeeCalculator.java 64.28% <20.00%> (-35.72%) 3.00 <0.00> (ø)

... and 20 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

delete old disabled tests
expose readableStore() in CalculatorState

Signed-off-by: Josh Marinacci <[email protected]>
address comments

Signed-off-by: Josh Marinacci <[email protected]>
Signed-off-by: Josh Marinacci <[email protected]>
@joshmarinacci joshmarinacci force-pushed the custom-fees-refactor-alt branch from d6c70ec to 8746713 Compare December 1, 2025 18:22
Signed-off-by: Josh Marinacci <[email protected]>
set fees for the custom fees extras

Signed-off-by: Josh Marinacci <[email protected]>
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.

4 participants