rippled icon indicating copy to clipboard operation
rippled copied to clipboard

Fee setting and handling improvements

Open ximinez opened this issue 3 years ago • 0 comments

High Level Overview of Change

This branch resolves #3932. The concept of "fee units" has been (almost) completely removed. It remains in a few places to preserve backward compatibility. Additionally, a new amendment, XRPFees has been introduced which, if enabled by the validators, will convert all representations of fees in the code, ledger, and protocol that are still raw numbers into XRPAmounts.

Additionally, it fixes an issue where a sidechain / test network is able to confirm a 0 drop base fee, but is unable to accept submissions of transactions with 0 drop fees. The transaction engine appears to be perfectly fine with such fees, but fee escalation logic had an unstated assumption that the base fee would never be 0. This fix works around that assumption while still enabling fee escalation to raise required fees when the network gets busy - it effectively treats the base fee as 1 drop for purposes of getting into the open ledger ONLY when fees are escalated. No amendment is required for this fix because it only affects transaction submission, not processing. I am reasonably sure this solution is complete, but I would encourage anybody dealing with the issue to test this branch to ensure I haven't missed any edge cases.

Type of Change

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • [X ] Tests (You added tests for code that already exists, or your new feature included in this PR)

ximinez avatar Jul 21 '22 17:07 ximinez