Skip to content

Conversation

@QuantumExplorer
Copy link
Member

@QuantumExplorer QuantumExplorer commented Jun 29, 2025

Issue being fixed or feature implemented

Add support for protocol version 10, including necessary updates to the versioning system.

What was done?

  • Updated the main versioning module to include PROTOCOL_VERSION_10.
  • Added a new module v10 to define the specifics of protocol version 10.
  • Updated constants to reflect the latest platform version as PLATFORM_V10 and LATEST_VERSION.

How Has This Been Tested?

Changes have been validated through existing unit tests that cover protocol versioning.

Breaking Changes

None

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.

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • New Features

    • Introduced support for protocol version 10, now recognized as the latest platform version.
    • Added a new module for version 10, consolidating all relevant platform components and versioning.
  • Chores

    • Updated constants and version references throughout the platform to reflect protocol version 10 as the current standard.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 29, 2025

Walkthrough

The codebase updates its protocol and platform versioning from version 9 to version 10. This includes introducing a new v10 module, updating constants to reference version 10, and aggregating all relevant versioned components for the new platform version. No logic or control flow changes are present.

Changes

File(s) Change Summary
.../src/version/mod.rs Updated to use protocol version 10 as latest; added public v10 module.
.../src/version/protocol_version.rs Imported PLATFORM_V10, updated PLATFORM_VERSIONS and LATEST_PLATFORM_VERSION to v10.
.../src/version/v10.rs Added new file defining PROTOCOL_VERSION_10 and PLATFORM_V10 aggregating versioned components.

Sequence Diagram(s)

sequenceDiagram
    participant App
    participant VersionMod
    participant ProtocolVersion
    participant V10

    App->>VersionMod: Import LATEST_VERSION, v10
    VersionMod->>V10: Access PROTOCOL_VERSION_10, PLATFORM_V10
    App->>ProtocolVersion: Import LATEST_PLATFORM_VERSION
    ProtocolVersion->>V10: Access PLATFORM_V10
Loading

Possibly related PRs

Poem

Hopping forward, version ten,
A leap beyond the world of nine—again!
New constants bloom, new modules grow,
Platform and protocol in a shiny row.
With every jump, we future-proof our den,
Cheers to the code, from this rabbit’s pen! 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcbbad1 and 85853f8.

📒 Files selected for processing (3)
  • packages/rs-platform-version/src/version/mod.rs (3 hunks)
  • packages/rs-platform-version/src/version/protocol_version.rs (3 hunks)
  • packages/rs-platform-version/src/version/v10.rs (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-04T09:08:48.470Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/protocol_version.rs:155-157
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In the dashmate default configurations, the default protocol version for local networks has been removed, and an update mechanism for the protocol version in the consensus parameters has been implemented.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-24T08:18:22.301Z
Learning: Platform versioning is handled by the rs-platform-version package, ensuring protocol compatibility across components.
Learnt from: lklimek
PR: dashpay/platform#2318
File: .github/workflows/tests-build-image.yml:45-45
Timestamp: 2024-11-13T10:31:30.891Z
Learning: In the dashpay/platform repository, changes to `.github/workflows/tests-build-image.yml` that switch the Docker image platform from `linux/arm64` to `linux/amd64` for testing purposes are acceptable when required to run on GitHub-hosted runners. ARM64 testing is covered on the testnet.
Learnt from: QuantumExplorer
PR: dashpay/platform#2439
File: packages/rs-dpp/src/errors/consensus/state/token/mod.rs:4-22
Timestamp: 2025-01-23T02:10:08.979Z
Learning: The user QuantumExplorer prefers to handle documentation of breaking changes separately from the code changes, particularly for token-related error types and validation rules.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-09-28T20:43:05.154Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/mocks/v3_test.rs:617-617
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In cases where `consensus_params_update` versions are set differently across files, the discrepancies may be intentional due to different platform versions.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/mocks/v3_test.rs:617-617
Timestamp: 2024-10-04T09:08:04.494Z
Learning: In cases where `consensus_params_update` versions are set differently across files, the discrepancies may be intentional due to different platform versions.
Learnt from: shumkov
PR: dashpay/platform#2365
File: packages/dashmate/src/listr/tasks/ssl/VerificationServer.js:6-6
Timestamp: 2024-12-03T05:49:08.409Z
Learning: The project requires Node.js version 20 or higher, so features available from Node.js 20 onwards can be used without concern for backward compatibility.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_sum_item_or_add_to_if_already_exists/mod.rs:37-54
Timestamp: 2024-10-09T00:22:57.778Z
Learning: The explicit handling of version `0` in functions, and returning an `UnknownVersionMismatch` error for other versions, is an intentional design choice in the codebase.
Learnt from: QuantumExplorer
PR: dashpay/platform#2257
File: packages/rs-drive-abci/src/mimic/test_quorum.rs:159-164
Timestamp: 2024-11-20T16:16:01.830Z
Learning: QuantumExplorer prefers not to receive auto-generated messages asking to post on social media.
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
packages/rs-platform-version/src/version/protocol_version.rs (20)
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-24T08:18:22.301Z
Learning: Platform versioning is handled by the rs-platform-version package, ensuring protocol compatibility across components.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-09T00:22:57.778Z
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`.
Learnt from: shumkov
PR: dashpay/platform#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`.
Learnt from: lklimek
PR: dashpay/platform#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.
Learnt from: QuantumExplorer
PR: dashpay/platform#2215
File: packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs:105-105
Timestamp: 2024-10-06T16:17:34.571Z
Learning: In `run_block_proposal` in `packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs`, when retrieving `last_block_time_ms`, it's acceptable to use `platform_state` instead of `block_platform_state`, even after updating the protocol version.
Learnt from: QuantumExplorer
PR: dashpay/platform#2215
File: packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs:105-105
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In `run_block_proposal` in `packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs`, when retrieving `last_block_time_ms`, it's acceptable to use `platform_state` instead of `block_platform_state`, even after updating the protocol version.
Learnt from: shumkov
PR: dashpay/platform#2201
File: packages/rs-platform-version/src/version/v2.rs:1186-1188
Timestamp: 2024-10-09T00:22:57.778Z
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.
Learnt from: shumkov
PR: dashpay/platform#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.
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2248
File: packages/rs-drive-abci/src/main.rs:106-111
Timestamp: 2024-10-17T08:52:54.300Z
Learning: In this project, the environment variable `CARGO_PKG_RUST_VERSION` is defined and can be used safely with the `env!` macro.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/mocks/v3_test.rs:617-617
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In cases where `consensus_params_update` versions are set differently across files, the discrepancies may be intentional due to different platform versions.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-platform-version/src/version/mocks/v3_test.rs:617-617
Timestamp: 2024-10-04T09:08:04.494Z
Learning: In cases where `consensus_params_update` versions are set differently across files, the discrepancies may be intentional due to different platform versions.
Learnt from: lklimek
PR: dashpay/platform#2139
File: packages/rs-drive-proof-verifier/src/types.rs:0-0
Timestamp: 2024-10-09T00:22:57.778Z
Learning: Build failures are intended when new versions are added to the `Version` enum in `TryFrom` implementations, so that developers are forced to handle them explicitly. Therefore, it's acceptable not to include a wildcard arm for `Some(_)` when matching on `response.version`.
Learnt from: lklimek
PR: dashpay/platform#2139
File: packages/rs-drive-proof-verifier/src/types.rs:0-0
Timestamp: 2024-09-27T08:25:11.059Z
Learning: Build failures are intended when new versions are added to the `Version` enum in `TryFrom` implementations, so that developers are forced to handle them explicitly. Therefore, it's acceptable not to include a wildcard arm for `Some(_)` when matching on `response.version`.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-09-28T20:43:05.154Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: shumkov
PR: dashpay/platform#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
PR: dashpay/platform#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`.
Learnt from: lklimek
PR: dashpay/platform#2232
File: packages/rs-sdk/src/mock/sdk.rs:90-95
Timestamp: 2024-10-10T10:30:19.883Z
Learning: In `packages/rs-sdk/src/mock/sdk.rs`, the `load_expectations` method in `MockDashPlatformSdk` remains asynchronous (`async`) for backward compatibility, even though it now delegates to the synchronous `load_expectations_sync` method.
packages/rs-platform-version/src/version/mod.rs (17)
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-09T00:22:57.778Z
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`.
Learnt from: shumkov
PR: dashpay/platform#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`.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-24T08:18:22.301Z
Learning: Platform versioning is handled by the rs-platform-version package, ensuring protocol compatibility across components.
Learnt from: lklimek
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#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
PR: dashpay/platform#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`.
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2201
File: packages/rs-platform-version/src/version/v2.rs:1186-1188
Timestamp: 2024-10-09T00:22:57.778Z
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.
Learnt from: shumkov
PR: dashpay/platform#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.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-09-28T20:43:05.154Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: shumkov
PR: dashpay/platform#2248
File: packages/rs-drive-abci/src/main.rs:106-111
Timestamp: 2024-10-17T08:52:54.300Z
Learning: In this project, the environment variable `CARGO_PKG_RUST_VERSION` is defined and can be used safely with the `env!` macro.
Learnt from: lklimek
PR: dashpay/platform#2139
File: packages/rs-drive-proof-verifier/src/types.rs:0-0
Timestamp: 2024-09-27T08:25:11.059Z
Learning: Build failures are intended when new versions are added to the `Version` enum in `TryFrom` implementations, so that developers are forced to handle them explicitly. Therefore, it's acceptable not to include a wildcard arm for `Some(_)` when matching on `response.version`.
Learnt from: pauldelucia
PR: dashpay/platform#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.
Learnt from: QuantumExplorer
PR: dashpay/platform#2431
File: packages/rs-drive/Cargo.toml:55-60
Timestamp: 2025-01-19T07:36:46.042Z
Learning: The grovedb dependencies in packages/rs-drive/Cargo.toml and related files are intentionally kept at specific revisions rather than using the latest stable version, with plans to update them at a later time.
Learnt from: pauldelucia
PR: dashpay/platform#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 (ensuring it's between 3 and 100 characters) is already handled at the data contract validation level in packages/rs-dpp/src/data_contract/methods/validate_update/v0/mod.rs, making additional checks in the update operations redundant.
packages/rs-platform-version/src/version/v10.rs (14)
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2206
File: packages/rs-drive-abci/tests/strategy_tests/main.rs:1162-1162
Timestamp: 2024-10-09T00:22:57.778Z
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`.
Learnt from: shumkov
PR: dashpay/platform#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`.
Learnt from: lklimek
PR: dashpay/platform#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.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-24T08:18:22.301Z
Learning: Platform versioning is handled by the rs-platform-version package, ensuring protocol compatibility across components.
Learnt from: QuantumExplorer
PR: dashpay/platform#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.
Learnt from: shumkov
PR: dashpay/platform#2248
File: packages/rs-drive-abci/src/main.rs:106-111
Timestamp: 2024-10-17T08:52:54.300Z
Learning: In this project, the environment variable `CARGO_PKG_RUST_VERSION` is defined and can be used safely with the `env!` macro.
Learnt from: QuantumExplorer
PR: dashpay/platform#2215
File: packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs:105-105
Timestamp: 2024-10-06T16:17:34.571Z
Learning: In `run_block_proposal` in `packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs`, when retrieving `last_block_time_ms`, it's acceptable to use `platform_state` instead of `block_platform_state`, even after updating the protocol version.
Learnt from: QuantumExplorer
PR: dashpay/platform#2215
File: packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs:105-105
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In `run_block_proposal` in `packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs`, when retrieving `last_block_time_ms`, it's acceptable to use `platform_state` instead of `block_platform_state`, even after updating the protocol version.
Learnt from: CR
PR: dashpay/platform#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-24T08:18:22.301Z
Learning: The rs-platform-value package is used for cross-language data representation, facilitating interoperability between Rust and JavaScript.
Learnt from: shumkov
PR: dashpay/platform#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
PR: dashpay/platform#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`.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-10-09T00:22:57.778Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
Learnt from: QuantumExplorer
PR: dashpay/platform#2182
File: packages/rs-drive/src/util/grove_operations/batch_insert_if_not_exists_return_existing_element/mod.rs:46-50
Timestamp: 2024-09-28T20:43:05.154Z
Learning: In this codebase, match statements for versions are intentionally designed to handle known versions and treat unknown versions as mismatches.
⏰ Context from checks skipped due to timeout of 90000ms (16)
  • GitHub Check: Rust packages (drive-abci) / Check each feature
  • GitHub Check: Rust packages (drive-abci) / Linting
  • GitHub Check: Rust packages (drive-abci) / Tests
  • GitHub Check: Rust packages (drive-abci) / Unused dependencies
  • GitHub Check: Rust packages (dpp) / Tests
  • GitHub Check: Rust packages (dpp) / Check each feature
  • GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
  • GitHub Check: Rust packages (dpp) / Unused dependencies
  • GitHub Check: Rust packages (dpp) / Linting
  • GitHub Check: Rust packages (wasm-dpp) / Tests
  • GitHub Check: Rust packages (wasm-dpp) / Linting
  • GitHub Check: Rust packages (wasm-dpp) / Formatting
  • GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
  • GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
  • GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
  • GitHub Check: Build JS packages / Build JS
🔇 Additional comments (9)
packages/rs-platform-version/src/version/protocol_version.rs (3)

19-19: LGTM: Import follows established pattern.

The import of PLATFORM_V10 from the new v10 module is correctly placed and follows the existing import structure.


54-54: LGTM: Version addition follows sequential pattern.

Adding PLATFORM_V10 to the end of the PLATFORM_VERSIONS array maintains the sequential ordering and follows the established pattern.


63-63: LGTM: Latest version update is correct.

Updating LATEST_PLATFORM_VERSION to reference PLATFORM_V10 correctly establishes version 10 as the current latest version.

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

3-3: LGTM: Import is properly placed.

The import of PROTOCOL_VERSION_10 from the new v10 module is correctly positioned and follows the established import pattern.


18-18: LGTM: Module declaration follows naming convention.

The pub mod v10; declaration correctly follows the established naming convention and module structure.


32-32: LGTM: Latest version update is correct.

Updating LATEST_VERSION to PROTOCOL_VERSION_10 correctly establishes version 10 as the current latest protocol version.

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

1-28: LGTM: Imports are comprehensive and well-organized.

All necessary version components are properly imported following the established import structure. The imports cover all required subsystems including consensus, DPP, drive ABCI, drive, fee, system data contracts, and system limits.


30-30: LGTM: Protocol version constant follows convention.

The PROTOCOL_VERSION_10 constant is correctly defined with value 10, maintaining the sequential versioning pattern.


32-65: LGTM: Platform version structure is comprehensive and well-documented.

The PLATFORM_V10 struct correctly aggregates all versioned components and follows the established pattern. The documentation clearly indicates this is for Platform release 2.1.0, providing valuable context for the version.

The structure includes all necessary components:

  • Protocol version correctly set to 10
  • Drive, drive ABCI, DPP versions properly configured
  • System components (data contracts, limits, fee) included
  • Consensus version specified
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@QuantumExplorer QuantumExplorer added this to the v2.1 milestone Jun 29, 2025
@QuantumExplorer QuantumExplorer changed the title feat: add protocol version 10 support chore(platform): add protocol version 10 support Jun 29, 2025
Copy link
Member Author

@QuantumExplorer QuantumExplorer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self Reviewed

@QuantumExplorer QuantumExplorer merged commit 206a633 into v2.1-dev Jun 29, 2025
56 of 58 checks passed
@QuantumExplorer QuantumExplorer deleted the featadd-protocol-version-10 branch June 29, 2025 09:57
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.

2 participants