Repository navigation
feat(platform)!: state transition minimum required balance for fees - #2899
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
✅ gRPC Query Coverage Report |
Contributor
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "80465036e25dc75593eba861e15fc45cf885ee8502eeb0fae4242108b1f916d9"
)Xcode manual integration:
|
lklimek
reviewed
Dec 16, 2025
lklimek
approved these changes
Dec 16, 2025
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.
Issue being fixed or feature implemented
Refactors estimated fee validation logic from drive-abci to dpp, centralizing fee calculation and balance validation in the data layer. This improves code organization, reduces duplication, and
makes fee estimation logic reusable across different contexts.
What was done?
New Trait Hierarchy in dpp
Created a three-tier trait hierarchy for fee estimation and validation:
- calculate_min_required_fee(&self, platform_version) -> Result<Credits, ProtocolError>
- Extends base trait with validate_estimated_fee() default implementation
- calculate_amount_available() for fee strategy-based amount calculation
- Extends base trait with validate_estimated_fee() for identity balance checks
Implementations Added (15 total)
Address-based transitions (4):
Identity-based transitions (8):
Asset-lock-based transitions (3):
Fee Version Structure Changes
Renamed fee fields for clarity:
drive-abci Simplification
Removed modules (~600 lines deleted):
Simplified:
Platform Versioning
How Has This Been Tested?
Verify dpp builds
cargo check -p dpp
Verify drive-abci builds
cargo check -p drive-abci
Run existing tests
cargo test -p drive-abci --test strategy_tests
Breaking Changes
Yep, they are there. The fee amounts should work with versioning.
Checklist:
For repository code-owners and collaborators only