fix(drive-abci): call update checkpoints#2920
Conversation
WalkthroughThis PR updates the project version across all package manifests from 3.0.0-dev.1 to 3.0.0-dev.2 (with dash-spv bumping from 4.0.0-dev.1 to 4.0.0-dev.2), and introduces a configurable checkpoint disabling feature in the ABCI engine with corresponding version schema updates to support optional checkpoint operations. Changes
Sequence Diagram(s)sequenceDiagram
participant FB as finalize_block_proposal
participant UC as update_checkpoints
participant UCv0 as update_checkpoints_v0
participant Config as PlatformTestConfig
participant Drive as Drive/IO
FB->>UC: call with version option
UC->>UC: match on version
alt version is None
UC-->>FB: Ok(()) - no-op path
else version is Some(0)
UC->>UCv0: call update_checkpoints_v0
UCv0->>Config: check disable_checkpoints flag
alt disable_checkpoints == true
Config-->>UCv0: return Ok(()) - skip checkpoint
UCv0-->>UC: Ok(())
else disable_checkpoints == false
UCv0->>Drive: compute and write checkpoints
Drive-->>UCv0: checkpoint result
UCv0-->>UC: Ok(())
end
UC-->>FB: Ok(())
else version is Some(other)
UC-->>FB: Err(UnknownVersionMismatch)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rs (1)
17-21: Doc comment refers to wrong function.The doc comment mentions "update_state_cache" but this function is
update_checkpoints. Consider updating the documentation to accurately describe the checkpoint update functionality.🔎 Suggested fix
- /// Updates the drive cache at the end of finalize block. This does a few things like merging - /// the data contract cache and the platform versions cache. + /// Updates checkpoints at the end of finalize block. Creates periodic database snapshots + /// based on the configured checkpoint interval.packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs (1)
409-414: Add assertion to verify checkpoint creation in this test.The test explicitly enables checkpoints (
disable_checkpoints: false) but only asserts that address transfers executed. Since the test is namedrun_chain_address_transitions_with_checkpoints, add a verification that checkpoints were actually created by checkingplatform.drive.checkpoints.load()contains entries after the chain execution completes.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (43)
Cargo.tomlpackage.jsonpackages/bench-suite/package.jsonpackages/dapi-grpc/package.jsonpackages/dapi/package.jsonpackages/dash-spv/package.jsonpackages/dashmate/package.jsonpackages/dashpay-contract/package.jsonpackages/dpns-contract/package.jsonpackages/feature-flags-contract/package.jsonpackages/js-dapi-client/package.jsonpackages/js-dash-sdk/package.jsonpackages/js-evo-sdk/package.jsonpackages/js-grpc-common/package.jsonpackages/keyword-search-contract/package.jsonpackages/masternode-reward-shares-contract/package.jsonpackages/platform-test-suite/package.jsonpackages/rs-drive-abci/src/config.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/v11.rspackages/token-history-contract/package.jsonpackages/wallet-lib/package.jsonpackages/wallet-utils-contract/package.jsonpackages/wasm-dpp/package.jsonpackages/wasm-dpp2/package.jsonpackages/wasm-drive-verify/package.jsonpackages/wasm-sdk/package.jsonpackages/withdrawals-contract/package.json
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs
📄 CodeRabbit inference engine (CLAUDE.md)
**/*.rs: Rust code must passcargo clippy --workspacelinter checks
Rust code must be formatted usingcargo 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-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rspackages/rs-drive-abci/src/config.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rspackages/rs-platform-version/src/version/v11.rs
**/tests/**/*.{js,jsx,ts,tsx,rs}
📄 CodeRabbit inference engine (AGENTS.md)
**/tests/**/*.{js,jsx,ts,tsx,rs}: Name tests descriptively, starting with 'should …'
Unit and integration tests should not perform network calls; mock dependencies
Files:
packages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
🧠 Learnings (41)
📓 Common learnings
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 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.
📚 Learning: 2024-10-06T16:18:07.994Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2215
File: packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs:119-120
Timestamp: 2024-10-06T16:18:07.994Z
Learning: In the `run_block_proposal` function in `packages/rs-drive-abci/src/execution/engine/run_block_proposal/mod.rs`, it's acceptable to pass `platform_state` to `perform_events_on_first_block_of_protocol_change`, even if `block_platform_state` has been updated.
Applied to files:
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
📚 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-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rspackages/rs-drive-abci/src/config.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rspackages/rs-platform-version/src/version/v11.rs
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 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.
Applied to files:
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
📚 Learning: 2025-01-23T09:23:32.740Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2405
File: packages/rs-sdk/src/sync.rs:88-95
Timestamp: 2025-01-23T09:23:32.740Z
Learning: The `block_on` function in `packages/rs-sdk/src/sync.rs` is currently only used in tests, and its WebAssembly implementation is deferred until there's a user request for it.
Applied to files:
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rs
📚 Learning: 2025-09-03T14:42:29.958Z
Learnt from: thephez
Repo: dashpay/platform PR: 2754
File: packages/wasm-sdk/docs.html:1970-1971
Timestamp: 2025-09-03T14:42:29.958Z
Learning: In packages/wasm-sdk/, the docs.html file is auto-generated from api-definitions.json. Any documentation fixes should be made in api-definitions.json rather than directly in docs.html, as manual changes to docs.html would be overwritten during regeneration.
Applied to files:
packages/wasm-drive-verify/package.jsonpackages/wasm-dpp/package.jsonpackages/wasm-dpp2/package.jsonpackages/wasm-sdk/package.json
📚 Learning: 2025-09-03T14:41:16.196Z
Learnt from: thephez
Repo: dashpay/platform PR: 2754
File: packages/wasm-sdk/AI_REFERENCE.md:766-766
Timestamp: 2025-09-03T14:41:16.196Z
Learning: In packages/wasm-sdk/, the AI_REFERENCE.md file is auto-generated from api-definitions.json. Any documentation fixes should be made in api-definitions.json rather than directly in AI_REFERENCE.md, as manual changes to AI_REFERENCE.md would be overwritten during regeneration.
Applied to files:
packages/wasm-drive-verify/package.jsonpackages/wasm-dpp/package.jsonpackages/wasm-dpp2/package.jsonpackages/wasm-sdk/package.json
📚 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: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`.
Applied to files:
packages/rs-drive-abci/src/config.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/v11.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-drive-abci/src/config.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/v11.rs
📚 Learning: 2024-11-25T01:17:02.001Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2347
File: packages/rs-drive/tests/query_tests.rs:438-460
Timestamp: 2024-11-25T01:17:02.001Z
Learning: In Rust test files (`packages/rs-drive/tests/query_tests.rs`), when code is used only in tests, defining explicit enums for fields (like the `status` field in the `Withdrawal` struct) may not be necessary; using primitive types is acceptable.
Applied to files:
packages/rs-drive-abci/src/config.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-platform-version/src/version/mocks/v3_test.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/tests/strategy_tests/test_cases/voting_tests.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
📚 Learning: 2024-09-30T12:11:35.148Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2186
File: packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/identity_credit_withdrawal/mod.rs:48-54
Timestamp: 2024-09-30T12:11:35.148Z
Learning: In the identity credit withdrawal transition code, the field `platform_version.drive_abci.validation_and_processing.state_transitions.identity_credit_withdrawal_state_transition.transform_into_action` is not an `Option` type, so handling `None` cases is unnecessary.
Applied to files:
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rspackages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rspackages/rs-platform-version/src/version/mocks/v3_test.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs
📚 Learning: 2024-11-03T10:39:11.242Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2305
File: packages/rs-drive-abci/src/abci/handler/finalize_block.rs:81-0
Timestamp: 2024-11-03T10:39:11.242Z
Learning: In `packages/rs-drive-abci/src/abci/handler/finalize_block.rs`, the use of `.expect("commit transaction")` after `app.commit_transaction(platform_version)` is intentional due to the provided comment explaining its necessity. Do not flag this usage in future reviews.
Applied to files:
packages/rs-drive-abci/src/platform_types/platform/mod.rspackages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rspackages/rs-drive-abci/src/test/helpers/setup.rspackages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.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-drive-abci/src/platform_types/platform/mod.rs
📚 Learning: 2025-10-29T11:37:57.299Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2818
File: packages/dashmate/test/unit/templates/dynamicCompose.spec.js:1-4
Timestamp: 2025-10-29T11:37:57.299Z
Learning: In the dashpay/platform repository's dashmate package (packages/dashmate), test files do not need to import `expect` from chai because test/bootstrap.js sets it up globally with `global.expect = expect;`. The bootstrap file is automatically loaded by Mocha.
Applied to files:
packages/platform-test-suite/package.json
📚 Learning: 2025-10-15T14:45:30.856Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2716
File: packages/dashmate/src/test/constants/services.js:4-4
Timestamp: 2025-10-15T14:45:30.856Z
Learning: In the dashmate codebase (packages/dashmate), during the DAPI Rust migration (rs-dapi), the old service keys `dapi_api` and `dapi_core_streams` are intentionally kept in `generateEnvsFactory.js` for backward compatibility even though the test constants in `src/test/constants/services.js` have been updated to use `rs_dapi`. These deprecated keys will be removed in a future PR after the transition is complete.
Applied to files:
packages/js-dash-sdk/package.jsonpackages/dashmate/package.jsonpackages/dapi/package.json
📚 Learning: 2025-03-11T09:39:23.071Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2489
File: packages/rs-dpp/Cargo.toml:32-32
Timestamp: 2025-03-11T09:39:23.071Z
Learning: In the Dash Platform project, dependencies are currently managed using Git repository references with tags (repo+tag format in Cargo.toml) rather than published crates, as the team is not currently publishing crates to crates.io.
Applied to files:
packages/js-dash-sdk/package.json
📚 Learning: 2024-11-22T08:19:14.448Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2345
File: packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs:93-99
Timestamp: 2024-11-22T08:19:14.448Z
Learning: In `packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/v0/mod.rs`, the `insert_contract` method requires an owned `BlockInfo`, so cloning `block_info` is necessary when calling it.
Applied to files:
packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs
📚 Learning: 2024-09-28T20:43:05.154Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 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.
Applied to files:
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rs
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: lklimek
Repo: dashpay/platform PR: 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`.
Applied to files:
packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.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/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.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/drive_abci_versions/drive_abci_method_versions/v7.rspackages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rspackages/rs-platform-version/src/version/v11.rs
📚 Learning: 2025-01-19T07:36:46.042Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 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.
Applied to files:
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rsCargo.tomlpackages/rs-platform-version/src/version/v11.rs
📚 Learning: 2024-10-17T08:52:54.300Z
Learnt from: shumkov
Repo: dashpay/platform PR: 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.
Applied to files:
Cargo.toml
📚 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: Run Rust tests for packages using `cargo test -p <package_name>` and all Rust tests with `cargo test --workspace`
Applied to files:
Cargo.toml
📚 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:
Cargo.tomlpackages/rs-platform-version/src/version/v11.rs
📚 Learning: 2025-10-09T16:00:42.724Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2716
File: packages/rs-dash-event-bus/Cargo.toml:4-4
Timestamp: 2025-10-09T16:00:42.724Z
Learning: Rust edition 2024 was released and stabilized in Rust 1.85 on February 20, 2025. Using `edition = "2024"` in Cargo.toml is valid and supported.
Applied to files:
Cargo.toml
📚 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 (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.
Applied to files:
packages/rs-platform-version/src/version/mocks/v3_test.rs
📚 Learning: 2024-10-09T00:22:57.778Z
Learnt from: shumkov
Repo: dashpay/platform PR: 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.
Applied to files:
packages/dashmate/package.json
📚 Learning: 2025-07-10T00:37:09.586Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2690
File: packages/wasm-sdk/src/queries/document.rs:383-384
Timestamp: 2025-07-10T00:37:09.586Z
Learning: In the Dash platform, DPNS (Dash Platform Name Service) contracts have the same ID across all networks (mainnet, testnet, etc.), so hardcoding the DPNS contract ID is appropriate and doesn't need to be configurable.
Applied to files:
packages/dpns-contract/package.json
📚 Learning: 2025-10-23T13:04:39.160Z
Learnt from: thephez
Repo: dashpay/platform PR: 2816
File: packages/js-dapi-client/lib/networkConfigs.js:17-40
Timestamp: 2025-10-23T13:04:39.160Z
Learning: For the testnet DAPI address whitelist in packages/js-dapi-client/lib/networkConfigs.js, nodes may be intentionally excluded even if they are ENABLED if they are running pre-2.1 versions. Version compatibility is an important filtering criterion beyond just enabled status.
Applied to files:
packages/dapi/package.json
📚 Learning: 2024-10-29T14:40:54.727Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2277
File: packages/rs-sdk/src/core/transaction.rs:0-0
Timestamp: 2024-10-29T14:40:54.727Z
Learning: In `packages/rs-sdk/src/platform/document_query.rs` and `packages/rs-sdk/src/core/transaction.rs`, certain places don't implement `IntoInner`, so direct error mappings cannot be simplified using `IntoInner`. A TODO comment has been added to address this in a future PR.
Applied to files:
packages/rs-drive-abci/src/test/helpers/setup.rs
📚 Learning: 2025-10-09T15:59:28.329Z
Learnt from: lklimek
Repo: dashpay/platform PR: 2716
File: packages/rs-dapi/src/services/platform_service/broadcast_state_transition.rs:181-187
Timestamp: 2025-10-09T15:59:28.329Z
Learning: In `packages/rs-dapi/src/services/platform_service/broadcast_state_transition.rs`, the maintainer requires logging full state transition bytes (`tx_bytes = hex::encode(st_bytes)`) at debug level when a state transition passes CheckTx but is removed from the block by the proposer, to facilitate debugging of this rare edge case.
Applied to files:
packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs
📚 Learning: 2025-09-22T05:59:31.140Z
Learnt from: shumkov
Repo: dashpay/platform PR: 2783
File: packages/js-evo-sdk/tests/functional/dpns.spec.mjs:2-2
Timestamp: 2025-09-22T05:59:31.140Z
Learning: The dist/evo-sdk.module.js file in packages/js-evo-sdk is a generated build artifact created during the build process, not a source file that should exist in the repository.
Applied to files:
packages/js-evo-sdk/package.json
📚 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 JavaScript/TypeScript for client SDKs, developer tools, and test suite
Applied to files:
packages/js-evo-sdk/package.jsonpackages/wasm-sdk/package.json
📚 Learning: 2025-09-03T16:37:11.605Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2756
File: packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_list/update_state_masternode_list/v0/mod.rs:11-11
Timestamp: 2025-09-03T16:37:11.605Z
Learning: In packages/rs-dpp/Cargo.toml, the abci feature already includes core_rpc_client, and core_rpc_client is defined as ["dep:dashcore-rpc"]. This means rs-drive-abci can access dashcore-rpc types through dpp when using the abci feature.
Applied to files:
packages/rs-platform-version/src/version/v11.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/v11.rs
📚 Learning: 2025-07-28T20:00:08.502Z
Learnt from: QuantumExplorer
Repo: dashpay/platform PR: 2711
File: packages/wasm-sdk/AI_REFERENCE.md:771-783
Timestamp: 2025-07-28T20:00:08.502Z
Learning: In packages/wasm-sdk/AI_REFERENCE.md, the documentation correctly shows the actual SDK method signatures (including identityCreate and identityTopUp with their full parameter lists), which may differ from the UI inputs shown in fixed_definitions.json. The UI may collect fewer parameters from users while handling additional requirements internally.
Applied to files:
packages/wasm-sdk/package.json
📚 Learning: 2025-09-02T13:30:17.703Z
Learnt from: thephez
Repo: dashpay/platform PR: 2739
File: packages/wasm-sdk/test/ui-automation/tests/state-transitions.spec.js:1-171
Timestamp: 2025-09-02T13:30:17.703Z
Learning: In packages/wasm-sdk/index.html, state transition definitions are loaded dynamically from api-definitions.json via the loadApiDefinitions() function that fetches './api-definitions.json'. The UI doesn't have hardcoded transition definitions - instead it populates categories, types, inputs, and labels from this JSON configuration file at runtime.
Applied to files:
packages/wasm-sdk/package.json
📚 Learning: 2025-09-02T13:30:17.703Z
Learnt from: thephez
Repo: dashpay/platform PR: 2739
File: packages/wasm-sdk/test/ui-automation/tests/state-transitions.spec.js:1-171
Timestamp: 2025-09-02T13:30:17.703Z
Learning: In packages/wasm-sdk/index.html, state transition definitions are loaded dynamically from api-definitions.json rather than being hardcoded in the HTML file. The UI loads transition categories, types, inputs, and labels from this JSON configuration file.
Applied to files:
packages/wasm-sdk/package.json
📚 Learning: 2025-09-03T19:33:21.688Z
Learnt from: thephez
Repo: dashpay/platform PR: 2754
File: packages/wasm-sdk/api-definitions.json:1285-1285
Timestamp: 2025-09-03T19:33:21.688Z
Learning: In packages/wasm-sdk/api-definitions.json, thephez prefers to keep the existing "ripemd160hash20bytes1234" placeholder for ECDSA_HASH160 data field in documentation examples rather than using a valid base64-encoded format, maintaining consistency with the previous documentation approach.
Applied to files:
packages/wasm-sdk/package.json
🧬 Code graph analysis (2)
packages/rs-drive-abci/src/platform_types/platform/mod.rs (2)
packages/rs-drive-abci/src/config.rs (1)
default_testnet(784-823)packages/rs-drive/src/open/mod.rs (1)
open(30-74)
packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs (2)
packages/rs-drive-abci/src/logging/mod.rs (1)
init_for_tests(21-36)packages/rs-drive-abci/tests/strategy_tests/execution.rs (1)
run_chain_for_strategy(51-784)
⏰ 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). (80)
- GitHub Check: Rust packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive 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 packages (dapi-grpc) / Unused dependencies
- GitHub Check: Rust packages (dapi-grpc) / Check each feature
- GitHub Check: Rust packages (dapi-grpc) / Tests
- GitHub Check: Rust packages (wasm-sdk) / Linting
- GitHub Check: Build Docker images (RS-DAPI, rs-dapi, rs-dapi) / Build RS-DAPI image
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (46)
packages/wasm-dpp/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the workspace-wide version update.
packages/feature-flags-contract/package.json (1)
3-3: LGTM!Version bump aligns with the coordinated 3.0.0-dev.2 release.
package.json (1)
3-3: LGTM!Root package version bump to 3.0.0-dev.2 is consistent with the PR objectives.
packages/js-evo-sdk/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the workspace-wide update.
packages/platform-test-suite/package.json (1)
4-4: LGTM!Version bump aligns with the 3.0.0-dev.2 release.
packages/wasm-drive-verify/package.json (1)
6-6: LGTM!Version bump to 3.0.0-dev.2 is consistent with the workspace-wide update.
packages/dash-spv/package.json (1)
3-3: LGTM!Version bump from 4.0.0-dev.1 to 4.0.0-dev.2 follows the coordinated dev release increment pattern.
packages/js-grpc-common/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the workspace-wide update.
packages/withdrawals-contract/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/js-dapi-client/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/dapi/package.json (1)
4-4: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/bench-suite/package.json (1)
4-4: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/dashmate/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/dpns-contract/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/wallet-lib/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 10.0.0-dev.1 to 10.0.0-dev.2 aligns with the repository-wide version bump for this release. Note that wallet-lib uses a different major version (10.x) compared to other platform packages (3.x), which is expected.
packages/token-history-contract/package.json (1)
3-3: LGTM! Version bump is consistent with the dev release.The version increment from 3.0.0-dev.1 to 3.0.0-dev.2 aligns with the repository-wide version bump for this release.
packages/wallet-utils-contract/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 aligns with the coordinated release across the repository.
packages/masternode-reward-shares-contract/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the repository-wide update.
Cargo.toml (1)
48-48: LGTM!Workspace version bump to 3.0.0-dev.2 aligns with the coordinated release across both Rust crates and npm packages.
packages/wasm-sdk/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the repository-wide update.
packages/dashpay-contract/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the repository-wide update.
packages/dapi-grpc/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the repository-wide update.
packages/js-dash-sdk/package.json (1)
3-3: LGTM!Version bump to 6.0.0-dev.2 follows the SDK's versioning scheme while maintaining the dev.1 → dev.2 increment pattern consistent with other packages.
packages/wasm-dpp2/package.json (1)
3-3: LGTM!Version bump to 3.0.0-dev.2 is consistent with the repository-wide update.
packages/keyword-search-contract/package.json (1)
3-3: Version bump is appropriate.The version update aligns with the workspace-wide increment to 3.0.0-dev.2 as described in the PR objectives.
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/mod.rs (2)
9-9: LGTM: New version module added.The addition of
pub mod v7follows the established versioning pattern and aligns with the PR's version bump to 3.0.0-dev.2.
135-135: LGTM: Field type changed to support optional checkpoints.The type change from
FeatureVersiontoOptionalFeatureVersionis intentional and enables the configurable checkpoint feature introduced in this PR. This aligns with the testing configuration changes that allowdisable_checkpointsto be set.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v1.rs (1)
120-120: LGTM: Retroactive update to disable checkpoints in v1.Changing
update_checkpointsfrom0toNoneis consistent with the type change toOptionalFeatureVersion. This retroactively disables checkpoint processing for version 1, which aligns with the PR's objective to fix checkpoint handling.packages/rs-drive-abci/src/platform_types/platform/mod.rs (1)
128-139: LGTM: Improved config initialization logic.The new match-based initialization ensures that when no config is provided, the default testnet config's
db_pathis synchronized with the provided path argument. This prevents inconsistency between the path argument and the config's db_path field. The subsequentDrive::open(&config.db_path, ...)call now correctly uses the config's path.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v3.rs (1)
120-120: LGTM: Consistent retroactive update for v3.Changing
update_checkpointstoNoneis consistent with the changes in v1 and v2, ensuring uniform checkpoint handling across all version configurations.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v2.rs (1)
121-121: LGTM: Consistent retroactive update for v2.The change from
0toNonemaintains consistency with other version files and properly reflects the optional checkpoint feature.packages/rs-platform-version/src/version/mocks/v3_test.rs (1)
155-155: LGTM: Test mock updated to match implementation.The test mock correctly reflects the change to
None, ensuring test consistency with the actual v3 configuration.packages/rs-drive-abci/tests/strategy_tests/test_cases/voting_tests.rs (1)
56-56: LGTM: Test explicitly disables checkpoint processing.Setting
disable_checkpoints: trueis appropriate for this test, which focuses on contested documents behavior rather than checkpoint functionality. This improves test isolation by removing unnecessary checkpoint processing overhead.packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs (1)
227-228: Critical fix: update_checkpoints now called during block finalization.The call is correctly placed after
update_drive_cacheand before retrievingblock_platform_state_owned. Error propagation via?is appropriate. Theupdate_checkpointsimplementation properly handles theOptionalFeatureVersionby checking forNonewhenplatform_version.drive_abci.methods.block_end.update_checkpointsis accessed, returningOk(())for disabled features and routing to version-specific implementations for enabled versions.packages/rs-drive-abci/src/config.rs (1)
882-884: LGTM!The new
disable_checkpointsfield follows the existing naming conventions and documentation style of other disable flags inPlatformTestConfig. Setting it totrueby default in bothDefaultanddefault_minimal_verifications()is appropriate for test performance.packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/v0/mod.rs (1)
25-29: LGTM!The early return is correctly placed before any checkpoint computation, avoiding unnecessary work when checkpoints are disabled. The
#[cfg(feature = "testing-config")]guard ensures this code path is only available in test builds.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v5.rs (1)
120-125: LGTM!The change from
0toNoneforupdate_checkpointsis consistent with the versioning strategy where checkpoint updates are only enabled in V7 (for protocol version 11). This retroactively reflects that checkpoints weren't functioning in earlier versions.packages/rs-drive-abci/src/execution/platform_events/block_end/update_checkpoints/mod.rs (1)
44-50: LGTM!The version dispatch correctly handles the
Option<usize>type:
NonereturnsOk(())(no-op when checkpoints disabled)Some(0)delegates to the v0 implementation- Unknown versions produce an appropriate error
This pattern aligns with the codebase's established versioning approach.
packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v4.rs (1)
116-121: LGTM!Consistent with the versioning changes across v1-v6, setting
update_checkpointstoNoneto indicate checkpoints were not active in this version.packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v6.rs (1)
118-123: LGTM!Consistent change across the version hierarchy. V6 now correctly indicates checkpoints were not active.
packages/rs-drive-abci/tests/strategy_tests/test_cases/address_tests.rs (2)
344-346: Test covers checkpoint-enabled execution path.The test name
run_chain_address_transitions_with_checkpointsaccurately describes its purpose. It enables checkpoint processing viadisable_checkpoints: falseand verifies the chain executes correctly.
430-439: LGTM!The assertion verifies that address transfers execute successfully when checkpoints are enabled, which confirms the checkpoint integration doesn't break core functionality.
packages/rs-platform-version/src/version/v11.rs (2)
18-18: LGTM!Import correctly updated to use V7 method versions which enables checkpoint updates.
33-39: Checkpoint functionality is correctly enabled in V7.
DRIVE_ABCI_METHOD_VERSIONS_V7properly setsupdate_checkpoints: Some(0)in theblock_endsection, confirming checkpoint support is enabled for Protocol version 11 (3.0.0).packages/rs-platform-version/src/version/drive_abci_versions/drive_abci_method_versions/v7.rs (1)
1-127: LGTM! Checkpoint updates now enabled.The v7 method versions constant is well-structured and correctly enables checkpoint updates via
update_checkpoints: Some(0)on line 121, which aligns with the PR objective to call update checkpoints that were previously not being invoked.packages/rs-drive-abci/src/test/helpers/setup.rs (1)
74-78: LGTM! Database path synchronization ensures test isolation.The changes consistently ensure that
config.db_pathmatches the temporary directory path across all platform builder flows. This prevents potential mismatches between where the platform expects data and where the test's temporary directory is located, which is essential for proper test isolation.Note that any user-provided
db_pathin the config will be overwritten, which is the intended behavior for test scenarios usingTempDir.Also applies to: 94-98, 242-244
We were not calling update checkpoints. This fixes that. Added a test. Also bumped versions to 3.0.0-dev.2.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.