Skip to content

feat(drive-abci): strategy tests for platform addresses - #2892

Merged
QuantumExplorer merged 106 commits into
feat/platformAddressesfrom
feat/singleUseKeys-proofs-sam-strategy-tests-2
Dec 11, 2025
Merged

QuantumExplorer merged 106 commits into
feat/platformAddressesfrom
feat/singleUseKeys-proofs-sam-strategy-tests-2

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Dec 11, 2025 •

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Strategy tests did not cover the new address-based state transitions (AddressFundsTransfer, AddressCreditWithdrawal, IdentityCreateFromAddresses, IdentityTopUpFromAddresses, etc.). This made it
difficult to test these transitions in randomized execution scenarios alongside existing identity-based operations.

What was done?

Strategy Test Infrastructure

  • Added AddressesWithBalance helper struct to track address balances and nonces during strategy test execution, with support for in-block staging and commit/rollback semantics
  • Added AddressTransfer and AddressWithdrawal operation types to OperationType enum with proper serialization/deserialization
  • Implemented create_address_transfer_transition and create_address_withdrawal_transition functions in strategy.rs

Validation Improvements

  • Changed legacy state transitions (DataContractCreate, Batch, IdentityCreate, etc.) to return UnsupportedFeatureError instead of empty validation result in validate_structure, making it
    explicit that client-side structure validation is not implemented
  • Updated SDK's ensure_valid_state_transition_structure to allow UnsupportedFeatureError to pass through, enabling broadcast of legacy transitions while still catching real validation errors
    for address-based transitions

Test Updates

  • Added new strategy test file addresses_with_balance.rs
  • Updated verify_state_transitions.rs to properly validate address balances after transitions
  • Extended various existing strategy tests to include address-based operations
  • Added inputs() method to StateTransition enum for retrieving address inputs

How Has This Been Tested?

  • cargo check -p dash-sdk passes
  • cargo check -p dpp --features state-transition-validation passes
  • cargo check -p strategy-tests -p drive-abci --tests passes
  • Existing strategy tests continue to pass with the new address tracking infrastructure

@coderabbitai

coderabbitai Bot commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/singleUseKeys-proofs-sam-strategy-tests-2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

✅ gRPC Query Coverage Report

================================================================================
gRPC Query Coverage Report - NEW QUERIES ONLY
================================================================================

Total queries in proto: 49
Previously known queries: 47
New queries found: 2

================================================================================

New Query Implementation Status:
--------------------------------------------------------------------------------
✓ getAddressInfo                                /home/runner/work/platform/platform/packages/rs-sdk/src/platform/query.rs
✓ getAddressesInfos                             /home/runner/work/platform/platform/packages/rs-sdk/src/platform/fetch_many.rs

================================================================================
Summary:
--------------------------------------------------------------------------------
New queries implemented: 2 (100.0%)
New queries missing: 0 (0.0%)

Total known queries: 49
  - Implemented: 46
  - Not implemented: 2
  - Excluded: 1

Not implemented queries:
  - getConsensusParams
  - getTokenPreProgrammedDistributions

@github-actions

Copy link
Copy Markdown
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: "88f907f0a6adebd666872e649f7db9fb83531d79abac272698797c4da0d8df33"
)

Xcode manual integration:

  • Download 'DashSDKFFI.xcframework' artifact from the run link above.
  • Drag it into your app target (Frameworks, Libraries & Embedded Content) and set Embed & Sign.
  • If using the Swift wrapper package, point its binaryTarget to the xcframework location or add the package and place the xcframework at the expected path.

@QuantumExplorer
QuantumExplorer merged commit 23ef0c8 into feat/platformAddresses Dec 11, 2025
@QuantumExplorer
QuantumExplorer deleted the feat/singleUseKeys-proofs-sam-strategy-tests-2 branch December 11, 2025 01:28
@thephez thephez added this to the v3.0 milestone Dec 22, 2025
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.

4 participants