Skip to content

Conversation

@pauldelucia
Copy link
Member

@pauldelucia pauldelucia commented Jan 16, 2026

Issue being fixed or feature implemented

Fixes bug where validate_identity_public_key_contract_bounds was incorrectly calling requires_identity_encryption_bounded_key() instead of requires_identity_decryption_bounded_key() for the DECRYPTION case in SingleContractDocumentType bounds validation

What was done?

  • Added v1 implementation of validate_identity_public_key_contract_bounds with the fix
  • Created DRIVE_ABCI_VALIDATION_VERSIONS_V8 with validate_identity_public_key_contract_bounds: 1
  • Added Protocol Version 12 (PLATFORM_V12) using the new validation versions

How Has This Been Tested?

cargo test

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • New Features

    • Added Platform Version 12 support with enhanced validation capabilities.
    • Introduced updated identity public key contract bounds validation with expanded version support.
  • Bug Fixes

    • Fixed decryption bounded key validation issue in identity public key contract bounds checking.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions bot added this to the v3.0.0 milestone Jan 16, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 16, 2026

📝 Walkthrough

Walkthrough

The changes introduce platform version 12 support by adding v1 validation logic for identity public key contract bounds, creating DRIVE_ABCI_VALIDATION_VERSIONS_V8 with updated validation versioning, and updating the latest protocol version reference from v11 to v12 across the codebase.

Changes

Cohort / File(s) Summary
Identity Public Key Validation
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
Wires v1 validation module into dispatcher; expands supported versions from [0] to [0, 1]
Identity Public Key Validation v1
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
Implements v1 validation logic with per-key and batch validators; handles SingleContract and SingleContractDocumentType bounds, ENCRYPTION/DECRYPTION key purposes, uniqueness constraints, and missing contract/type error cases. Fixes bug in DECRYPTION path for document type bounds
ABCI Validation Versioning
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
Adds v8 validation versioning module; introduces DRIVE_ABCI_VALIDATION_VERSIONS_V8 constant with validate_identity_public_key_contract_bounds bumped from 0 to 1 and comprehensive validation field configuration
Platform Version v12
packages/rs-platform-version/src/version/mod.rs
packages/rs-platform-version/src/version/protocol_version.rs
packages/rs-platform-version/src/version/v12.rs
Adds v12 platform support; updates LATEST_VERSION and LATEST_PLATFORM_VERSION references from v11 to v12; defines PLATFORM_V12 with full configuration including DRIVE_ABCI_VALIDATION_VERSIONS_V8

Sequence Diagram(s)

sequenceDiagram
    participant Validator as v1 Validator
    participant Drive as Drive/Storage
    participant Contract as Contract Data
    participant Bounds as Bounds Check
    participant Result as Result Builder

    Validator->>Validator: For each identity_public_key
    Validator->>Bounds: Extract contract bounds
    alt Contract bounds present
        Bounds->>Drive: Fetch referenced contract
        alt Contract exists
            Drive-->>Bounds: Contract data
            Bounds->>Contract: Resolve bound type (SingleContract or SingleContractDocumentType)
            alt SingleContractDocumentType
                Contract->>Drive: Resolve document type by name
                alt Document type exists
                    Drive-->>Contract: Document type data
                else
                    Contract-->>Result: InvalidDocumentTypeError
                end
            end
            Bounds->>Bounds: Check key purpose (ENCRYPTION/DECRYPTION)
            alt Purpose valid
                Bounds->>Drive: Query for unique key conflicts
                alt Conflict exists
                    Drive-->>Result: IdentityPublicKeyAlreadyExistsError
                else
                    Drive-->>Result: Validation pass
                end
            else
                Bounds-->>Result: InvalidKeyPurposeError
            end
        else
            Drive-->>Result: DataContractNotPresentError
        end
    else
        Bounds-->>Result: Empty result (no bounds)
    end
    Result->>Validator: Merge per-key results
    Validator-->>Validator: Return combined validation result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A fresh v12 hops into view,
With bounds now checked in v1 too!
Contracts and keys in harmony dance,
While bugs in decryption get a second chance. ✨
From v11's past, we bravely advance!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the primary fix: correcting the decryption bounded key validation bug in contract bounds validation, matching the core objective of adding v1 validation with the bug fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs (2)

65-66: Address the TODO for execution context cost tracking.

The TODO indicates that contract fetching costs should be added to the execution context. This is a pre-existing pattern (likely copied from v0), but consider tracking this for a follow-up.

Would you like me to open an issue to track adding execution context cost for contract fetches?


84-181: Consider extracting common validation logic to reduce duplication.

The ENCRYPTION (lines 85-127) and DECRYPTION (lines 128-170) branches for SingleContract share nearly identical structure - only the method call (requires_identity_encryption_bounded_key vs requires_identity_decryption_bounded_key) differs. Similar duplication exists in the SingleContractDocumentType section.

A helper function parameterized by purpose could reduce ~100 lines of duplication. However, since this mirrors the v0 structure and this is a targeted bug fix, this refactor can be deferred.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 760df0c and 07d26a6.

📒 Files selected for processing (7)
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
  • packages/rs-platform-version/src/version/mod.rs
  • packages/rs-platform-version/src/version/protocol_version.rs
  • packages/rs-platform-version/src/version/v12.rs
🧰 Additional context used
📓 Path-based instructions (1)
**/*.rs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.rs: Rust code must pass cargo clippy --workspace linter checks
Rust code must be formatted using cargo fmt --all

**/*.rs: Use 4-space indent for Rust files
Follow rustfmt defaults and keep code clippy-clean for Rust modules
Use snake_case for Rust module names
Use PascalCase for Rust type names
Use SCREAMING_SNAKE_CASE for Rust constants

Files:

  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs
  • packages/rs-platform-version/src/version/protocol_version.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-platform-version/src/version/v12.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
  • packages/rs-platform-version/src/version/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
🧠 Learnings (18)
📓 Common learnings
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2673
File: packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/mod.rs:1164-1197
Timestamp: 2025-06-18T03:44:14.385Z
Learning: QuantumExplorer determined that a CodeRabbit suggestion about fixing signable_bytes calculation in identity update tests with contract-bound keys was incorrect - the code flow is working as intended without the suggested changes.
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs:148-151
Timestamp: 2024-11-20T16:05:40.200Z
Learning: In `packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs`, when converting public keys from `QuorumForSavingV0` to `VerificationQuorum`, it's acceptable to use `.expect()` for public key conversion, as the conversion has been verified and panics are acceptable in this context.
Learnt from: shumkov
Repo: dashpay/platform PR: 2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:89-89
Timestamp: 2024-10-04T09:07:11.452Z
Learning: In tests located in the `packages/rs-drive-abci/tests` directory, the team prefers to use specific protocol versions (e.g., `PROTOCOL_VERSION_1`) instead of `PROTOCOL_VERSION_LATEST`.
Learnt from: shumkov
Repo: dashpay/platform PR: 2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:89-89
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In tests located in the `packages/rs-drive-abci/tests` directory, the team prefers to use specific protocol versions (e.g., `PROTOCOL_VERSION_1`) instead of `PROTOCOL_VERSION_LATEST`.
📚 Learning: 2024-10-08T13:28:03.529Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2227
File: packages/rs-drive-abci/src/platform_types/platform_state/mod.rs:141-141
Timestamp: 2024-10-08T13:28:03.529Z
Learning: When converting `PlatformStateV0` to `PlatformStateForSavingV1` in `packages/rs-drive-abci/src/platform_types/platform_state/mod.rs`, only version `0` needs to be handled in the match on `platform_state_for_saving_structure_default` because the changes are retroactive.

Applied to files:

  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs
  • packages/rs-platform-version/src/version/protocol_version.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-platform-version/src/version/v12.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
  • packages/rs-platform-version/src/version/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-11-20T10:01:50.837Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2257
File: packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs:94-94
Timestamp: 2024-11-20T10:01:50.837Z
Learning: In `packages/rs-drive-abci/src/platform_types/platform_state/v0/old_structures/mod.rs`, when converting with `PublicKey::try_from`, it's acceptable to use `.expect()` to handle potential conversion errors.

Applied to files:

  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2025-11-25T13:10:23.481Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T13:10:23.481Z
Learning: Use `rs-platform-version` for protocol versioning

Applied to files:

  • packages/rs-platform-version/src/version/protocol_version.rs
📚 Learning: 2024-10-04T09:08:47.901Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-04T09:08:47.901Z
Learning: In the Rust test file `packages/rs-drive-abci/tests/strategy_tests/main.rs`, specific protocol versions like `PROTOCOL_VERSION_1` are intentionally used in tests instead of `PROTOCOL_VERSION_LATEST`.

Applied to files:

  • packages/rs-platform-version/src/version/protocol_version.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-platform-version/src/version/v12.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
  • packages/rs-platform-version/src/version/mod.rs
📚 Learning: 2024-10-18T15:39:51.172Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2254
File: packages/rs-sdk/src/sdk.rs:585-585
Timestamp: 2024-10-18T15:39:51.172Z
Learning: The 'platform' project uses Rust version 1.80, so code in 'packages/rs-sdk' can use features available in Rust 1.80, such as the `abs_diff()` method.

Applied to files:

  • packages/rs-platform-version/src/version/protocol_version.rs
  • packages/rs-platform-version/src/version/v12.rs
📚 Learning: 2024-11-20T16:05:40.200Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2257
File: packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs:148-151
Timestamp: 2024-11-20T16:05:40.200Z
Learning: In `packages/rs-drive-abci/src/platform_types/signature_verification_quorum_set/v0/for_saving.rs`, when converting public keys from `QuorumForSavingV0` to `VerificationQuorum`, it's acceptable to use `.expect()` for public key conversion, as the conversion has been verified and panics are acceptable in this context.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-10-06T16:11:34.946Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2215
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/create_owner_identity/v1/mod.rs:19-30
Timestamp: 2024-10-06T16:11:34.946Z
Learning: In the Rust file `packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/create_owner_identity/v1/mod.rs`, within the `create_owner_identity_v1` function, the `add_public_keys` method of the `Identity` struct cannot fail and does not require explicit error handling.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-10-03T11:51:06.980Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2201
File: packages/rs-platform-version/src/version/v2.rs:1186-1188
Timestamp: 2024-10-03T11:51:06.980Z
Learning: In the `IdentityTransitionVersions` structure within `packages/rs-platform-version/src/version/v2.rs`, the field `credit_withdrawal` does not need the `identity_` prefix since it is already encompassed within identity state transitions.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-11-20T20:43:41.185Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2257
File: packages/rs-drive-abci/tests/strategy_tests/masternodes.rs:212-220
Timestamp: 2024-11-20T20:43:41.185Z
Learning: In `packages/rs-drive-abci/tests/strategy_tests/masternodes.rs`, the pattern of generating a `PrivateKey`, converting it to bytes, and reconstructing a `BlsPrivateKey` from those bytes is intentional. Avoid suggesting to simplify this code in future reviews.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-10-21T01:03:42.458Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2227
File: packages/rs-dpp/src/core_types/validator_set/v0/mod.rs:299-299
Timestamp: 2024-10-21T01:03:42.458Z
Learning: In the `test_serialize_deserialize_validator_set_v0` test within `packages/rs-dpp/src/core_types/validator_set/v0/mod.rs`, deterministic BLS keys cannot be easily used; therefore, using `BlsPublicKey::generate()` is acceptable.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2024-10-04T14:16:05.798Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2207
File: packages/rs-drive-proof-verifier/src/proof.rs:1646-1664
Timestamp: 2024-10-04T14:16:05.798Z
Learning: In the implementation of `FromProof<platform::GetContestedResourceIdentityVotesRequest>` in `packages/rs-drive-proof-verifier/src/proof.rs`, when matching `maybe_votes`, using `.expect()` on `v.into_iter().next()` is acceptable because the prior match arm `Some(v) if v.is_empty()` ensures that the map is not empty, preventing a panic.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs
📚 Learning: 2025-11-25T13:10:23.481Z
Learnt from: CR
Repo: dashpay/platform PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T13:10:23.481Z
Learning: Use Rust for core platform components (Drive, DAPI server, DPP implementation)

Applied to files:

  • packages/rs-platform-version/src/version/v12.rs
📚 Learning: 2025-05-28T16:22:26.334Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2644
File: packages/rs-drive/src/cache/system_contracts.rs:18-19
Timestamp: 2025-05-28T16:22:26.334Z
Learning: In packages/rs-drive/src/cache/system_contracts.rs, the `active_since_protocol_version` field in `ActiveSystemDataContract` struct is intentionally added for future use, not current implementation. QuantumExplorer confirmed this is "meant for later" when questioned about the `#[allow(unused)]` attribute.

Applied to files:

  • packages/rs-platform-version/src/version/v12.rs
  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:89-89
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In tests located in the `packages/rs-drive-abci/tests` directory, the team prefers to use specific protocol versions (e.g., `PROTOCOL_VERSION_1`) instead of `PROTOCOL_VERSION_LATEST`.

Applied to files:

  • packages/rs-platform-version/src/version/v12.rs
  • packages/rs-platform-version/src/version/mod.rs
📚 Learning: 2024-09-29T13:13:54.230Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2182
File: packages/rs-platform-version/src/version/drive_abci_versions.rs:116-121
Timestamp: 2024-09-29T13:13:54.230Z
Learning: In the `DriveAbciWithdrawalConstants` struct, prefer verbose field names even if they are lengthy.

Applied to files:

  • packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs
📚 Learning: 2025-04-11T09:08:05.652Z
Learnt from: pauldelucia
Repo: dashpay/platform PR: 2523
File: packages/rs-drive/src/drive/contract/update/update_contract/v1/update_description/v1/mod.rs:147-151
Timestamp: 2025-04-11T09:08:05.652Z
Learning: Description length validation for data contracts is already handled in the data contract validation process, specifically in packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
📚 Learning: 2025-06-18T03:44:14.385Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2673
File: packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_update/mod.rs:1164-1197
Timestamp: 2025-06-18T03:44:14.385Z
Learning: QuantumExplorer determined that a CodeRabbit suggestion about fixing signable_bytes calculation in identity update tests with contract-bound keys was incorrect - the code flow is working as intended without the suggested changes.

Applied to files:

  • packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs
🧬 Code graph analysis (2)
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs (1)
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs (6)
  • validate_identity_public_keys_contract_bounds_v1 (31-55)
  • identity_public_keys_with_witness (39-51)
  • drive (115-115)
  • drive (158-158)
  • drive (238-238)
  • drive (274-274)
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs (1)
packages/rs-dpp/src/validation/validation_result.rs (2)
  • merge_many_errors (71-79)
  • new_with_error (104-109)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: Rust packages (drive-abci) / Unused dependencies
  • GitHub Check: Rust packages (drive-abci) / Check each feature
  • GitHub Check: Rust packages (drive-abci) / Tests
  • GitHub Check: Rust packages (drive-abci) / Linting
  • GitHub Check: Rust packages (drive) / Tests
  • GitHub Check: Rust packages (wasm-dpp2) / Tests
  • GitHub Check: Rust packages (rs-dapi-client) / Tests
  • GitHub Check: Rust packages (dpp) / Tests
  • GitHub Check: Rust packages (wasm-dpp) / Tests
  • GitHub Check: Rust packages (wasm-sdk) / Tests
  • GitHub Check: Rust packages (dash-sdk) / Tests
  • GitHub Check: Rust packages (rs-sdk-ffi) / Tests
  • GitHub Check: Build Docker images (Drive, drive, drive-abci, SDK_TEST_DATA=true
    ) / Build Drive image
  • GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
  • GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
  • GitHub Check: Build JS packages / Build JS
  • GitHub Check: Rust crates security audit
  • GitHub Check: Swift SDK and Example build (warnings as errors)
🔇 Additional comments (15)
packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/v1/mod.rs (3)

1-4: LGTM! Clear documentation of the bug fix.

The comment accurately describes the bug being fixed - the DECRYPTION case was incorrectly calling the ENCRYPTION method for SingleContractDocumentType bounds validation.


31-55: LGTM! Clean aggregation pattern.

The public entry point correctly iterates over all keys, validates each individually, and merges errors using the idiomatic merge_many_errors pattern from the validation framework.


252-286: Core bug fix correctly implemented.

The DECRYPTION case for SingleContractDocumentType bounds now correctly calls requires_identity_decryption_bounded_key() (line 255) instead of the erroneous requires_identity_encryption_bounded_key(). This aligns with the SingleContract bounds handling (lines 128-170) and the ENCRYPTION case handling (lines 216-251).

packages/rs-drive-abci/src/execution/validation/state_transition/common/validate_identity_public_key_contract_bounds/mod.rs (2)

11-14: LGTM! Module wiring for v1.

The v1 module is correctly declared and the import for validate_identity_public_keys_contract_bounds_v1 is properly added.


39-51: LGTM! Version dispatch correctly extended.

The match statement properly routes version 1 to the new v1 implementation, and the known_versions vector is updated to [0, 1] for accurate error messaging.

packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/mod.rs (1)

8-8: LGTM! v8 validation versions module declared.

The new v8 module is declared following the existing pattern for validation version modules (v1-v7).

packages/rs-platform-version/src/version/protocol_version.rs (3)

30-30: LGTM! Import for PLATFORM_V12.

Import correctly added for the new platform version.


46-59: LGTM! PLATFORM_VERSIONS array extended.

PLATFORM_V12 is correctly appended to the versions array, maintaining sequential order.


67-67: LGTM! Latest platform version updated.

LATEST_PLATFORM_VERSION correctly references PLATFORM_V12.

packages/rs-platform-version/src/version/mod.rs (3)

3-3: LGTM! Import updated for protocol version 12.

The import correctly references PROTOCOL_VERSION_12 from the new v12 module.


20-20: LGTM! v12 module declared.

The new v12 module is properly declared following the existing versioning pattern.


34-34: LGTM! Latest version updated to protocol version 12.

LATEST_VERSION correctly references PROTOCOL_VERSION_12, aligning with the new platform version introduction.

packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_validation_versions/v8.rs (2)

9-20: Correct version bump for the decryption-bounded-key fix.
The move to validate_identity_public_key_contract_bounds: 1 cleanly captures the fix in the validation versioning.


11-222: LGTM for the v8 validation table.
The immutable, fully specified version table is clear and consistent with versioned validation design.

packages/rs-platform-version/src/version/v12.rs (1)

31-69: v12 wiring looks correct.
PLATFORM_V12 cleanly integrates DRIVE_ABCI_VALIDATION_VERSIONS_V8 and keeps the rest of the version matrix consistent.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

@QuantumExplorer QuantumExplorer modified the milestones: v3.0.0, v3.1.0 Jan 23, 2026
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