solana icon indicating copy to clipboard operation
solana copied to clipboard

Remove congestion multiplier from calculate fee

Open tao-stones opened this issue 5 months ago • 2 comments

Problem

congestion_multiplier variable in sdk::fee_structure::calculate_fee(...) does not have to do with congestion, it actually zeros out transaction fee for tests that don't handle transaction fees - those tests sets fee rate to zero in genesis config.

It is better to sync up fee_structure with fee_rate_governor during bank initialization to support those tests.

Summary of Changes

  • set fee_structure.lamports_per_signature by fee_rate_governor during bank initialization
  • remove congestion_multiplier in calculation_fee()

Fixes #

tao-stones avatar Jan 20 '24 00:01 tao-stones

as Draft until rebaseed after #34821 is merged

tao-stones avatar Jan 20 '24 00:01 tao-stones

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a5c470d) 81.7% compared to head (d8fff7f) 81.7%. Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #34865     +/-   ##
=========================================
- Coverage    81.7%    81.7%   -0.1%     
=========================================
  Files         826      826             
  Lines      223413   223411      -2     
=========================================
- Hits       182614   182573     -41     
- Misses      40799    40838     +39     

codecov[bot] avatar Jan 20 '24 02:01 codecov[bot]