feat: Add fee vote maxes#7346
Open
mvadari wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
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 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"); |
Collaborator
Author
There was a problem hiding this comment.
Done in a different manner
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
🚀 New features to boost your workflow:
|
oleks-rip
reviewed
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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