Repository navigation
feat(platform): use count sum tree for addresses - #2897
Merged
QuantumExplorer merged 5 commits intoDec 16, 2025
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: "2bab052ab6af2114bef769de25e89d508a3a362b353215b2037e79504d107f87"
)Xcode manual integration:
|
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
The address balances tree (
CLEAR_ADDRESS_POOL) was using aSumTreewhich doesn't track element counts. Switching toCountSumTreeprovides both sum aggregation and element counting, whichimproves fee estimation accuracy and enables more efficient queries.
Additionally, the
grove_insert_empty_sum_treeAPI was redundant sincegrove_insert_empty_treecan handle all tree types with an explicitTreeTypeparameter.What was done?
Tree Type Changes
CLEAR_ADDRESS_POOLfromSumTreetoCountSumTreein drive initialization (v2)CountSumTreetype and weightsAPI Consolidation
grove_insert_empty_sum_treefunctiongrove_insert_empty_treeto accept explicitTreeTypeparameter (NormalTree, SumTree, CountSumTree, etc.)TreeTypeFee Regression Test Updates
address_funds_transfer/tests.rsto reflect slightly higher costs with CountSumTreeidentity_credit_transfer_to_addresses/tests.rsfee estimation test (now succeeds with exact balance due to more accurate estimation)Bug Fixes
verify_identity_keys_by_identity_id: changed fromgrovedb::Error::WrongElementTypetoProofError::IncorrectValueSizewhen revision bytes have wrong lengthHow Has This Been Tested?
cargo test -p drive-abci address_funds_transfer::tests::tests::fee_regression- All 9 fee regression tests passcargo test -p drive-abci test_exact_actual_fee_balance_succeeds_with_128_outputs- Fee estimation accuracy test passescargo check -p drive --features verify- Verification code compiles correctlyBreaking Changes
None compared with 2.1
Checklist:
For repository code-owners and collaborators only