Skip to content

feat: Add fee vote maxes#7346

Open
mvadari wants to merge 4 commits into
ripple/se/feesfrom
mvadari/se/fee-max
Open

feat: Add fee vote maxes#7346
mvadari wants to merge 4 commits into
ripple/se/feesfrom
mvadari/se/fee-max

Conversation

@mvadari
Copy link
Copy Markdown
Collaborator

@mvadari mvadari commented May 27, 2026

High Level Overview of Change

This PR adds hard-cap maxes for the size and compute limits, currently set at twice the defaults.

Context of Change

Stay cautious

API Impact

N/A

Copilot AI review requested due to automatic review settings May 27, 2026 18:11
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces protocol-level maximums for Smart Escrow “Feature Extension” fee settings (compute and size limits), enforcing caps during config parsing, fee voting, and ttFEE transaction validation to prevent oversized fee parameters.

Changes:

  • Add protocol constants defining maximum allowed extension compute/size limits.
  • Enforce the maximums when reading fee-vote config and when tallying validator votes.
  • Reject ttFEE transactions that attempt to set extension limits above the maximums; extend unit tests accordingly.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/xrpld/core/detail/Config.cpp Ignore configured extension compute/size limits if they exceed the new hard caps.
src/xrpld/app/misc/FeeVoteImpl.cpp Add assertions for target limits and ignore out-of-range extension limit votes during voting.
src/test/app/FeeVote_test.cpp Update config parsing expectations and add tests for max enforcement + ttFEE rejection above max.
src/libxrpl/tx/transactors/system/Change.cpp Enforce max extension compute/size limits in ttFEE preclaim when Smart Escrow is enabled.
include/xrpl/protocol/Fees.h Introduce public constants for maximum extension compute/size limits.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/xrpld/app/misc/FeeVoteImpl.cpp Outdated
Comment on lines +117 to +125
FeeVoteImpl::FeeVoteImpl(FeeSetup const& setup, beast::Journal journal)
: target_(setup), journal_(journal)
{
XRPL_ASSERT(
target_.extension_compute_limit <= kMaxExtensionComputeLimit,
"xrpl::FeeVoteImpl::FeeVoteImpl : extension compute limit in range");
XRPL_ASSERT(
target_.extension_size_limit <= kMaxExtensionSizeLimit,
"xrpl::FeeVoteImpl::FeeVoteImpl : extension size limit in range");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a different manner

Comment thread include/xrpl/protocol/Fees.h
@mvadari mvadari requested review from oleks-rip and pwang200 May 27, 2026 18:25
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.5%. Comparing base (1f9675d) to head (abeebb1).

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           ripple/se/fees   #7346     +/-   ##
================================================
- Coverage            82.5%   82.5%   -0.0%     
================================================
  Files                1024    1024             
  Lines               78435   78446     +11     
  Branches             7435    7437      +2     
================================================
+ Hits                64718   64727      +9     
- Misses              13717   13719      +2     
Files with missing lines Coverage Δ
include/xrpl/protocol/Fees.h 100.0% <ø> (ø)
src/libxrpl/tx/transactors/system/Change.cpp 86.5% <100.0%> (+0.2%) ⬆️
src/xrpld/app/misc/FeeVoteImpl.cpp 95.1% <100.0%> (+0.3%) ⬆️
src/xrpld/core/detail/Config.cpp 78.2% <100.0%> (ø)

... and 1 file 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.

Comment thread src/test/app/FeeVote_test.cpp Outdated
Comment thread src/test/app/FeeVote_test.cpp Outdated
Copy link
Copy Markdown
Contributor

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

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.

3 participants