Repository navigation
test(sdk): run operation-proof tests in CI and select the verifier generation from the verifier - #5559
test(sdk): run operation-proof tests in CI and select the verifier generation from the verifier#5559shumkov wants to merge 6 commits into
Conversation
The version lists of #5515's tests named 12, 13 and the latest version, which was 14 on v5.0-dev. With protocol 15 as the latest version they no longer exercised protocol 14, which testnet runs, so a protocol 14 regression would go unnoticed once protocol 15 gets tables of its own. The lists are now ranges that run up to the latest version: - drive-proof-verifier identity_discovery signed_versions: V0 from 12, V1 from 13 (a sound proof no honest node sends), through latest + 1. - drive-abci identity_by_non_unique_public_key_hash: V0 at 12..=latest, V1 at 14..=latest; the V1 test also checks the answer's protocol version. - drive-abci nonunique_merged_proof: versions() is 12..=latest, and V1 is served from 14. With latest = 14 these produce the same lists as before, so the change is equally correct on v5.0-dev. Mutation check: with PLATFORM_V14 given DRIVE_ABCI_QUERY_VERSIONS_V1 (protocol 14 refuses V1), should_answer_v1_with_one_proof_from_protocol_14 passes before this change and fails after it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 62db704)
… the verifier verify_state_transition_was_executed_with_proof_for_query_version matched on the producer's table to pick v0 or v1, and only range-checked the caller's generation. A later verifier generation with a stricter check would then be skipped whenever an SDK verified an older producer's outcome. The dispatcher now matches on the caller's generation. Generations 0 and 1 share one implementation, the former v0 internal body, because they apply the same checks. The only producer-dependent input, whether the proof carries the owner balance, comes from the producer's prove_state_transition generation: 0 means no balance, 1 means balance, and any other value is refused as UnknownVersionMismatch naming prove_state_transition. The duplicated 0|1 guard is gone. The v1 module, a one-line call with carries_owner_balance = true, is removed. No behaviour change for any real table. PV1..PV13 and both mock tables have prove 0 / verify 0, and PV14 has prove 1 / verify 1. A temporary check over PLATFORM_VERSIONS plus TEST_PLATFORM_V2/V3 confirmed this (not committed). So for every known version the same body runs with the same flag. The existing suites pass unchanged: - drive verify_state_transition_was_executed_with_proof: 83 tests - drive-proof-verifier document_outcome - dash-sdk signed_version_tests Only synthetic tables behave differently, which is the point of the change. Two dispatcher tests pin it: - should_reject_unknown_verifier_or_producer_generation: an unknown prover generation in the producer's table is refused, naming the method. - should_not_read_the_producers_verifier_generation: the producer's verifier generation is never read. Red before, green after: with the old dispatcher both fail. The first returned GroveDB CorruptedData instead of UnknownVersionMismatch for prove_state_transition. The second returned UnknownVersionMismatch(verify.., 255) where the known-producer result is GroveDB CorruptedData. The version-table docs now say the verifier reads the layout from the producer's prove_state_transition, instead of saying the two must move in lockstep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ocol limits
Tests:
- The document-outcome security-floor test now asserts why each case fails.
A verifier table with an unknown generation must give the Drive
UnknownVersionMismatch for that method. A newer signed version (latest+1,
and the start of the mock range) must give GroveDBError, because the newest
rules need the owner balance the protocol 13 proof lacks. Mutation check:
with unknown newer versions mapped to PlatformVersion::first(), the loop
now fails ("version 15: invalid signature"). Before, it passed.
- The SDK document-outcome layout test adds a stored-below-producer case
(stored 13, protocol 14 answer, pinned and unpinned). It must verify in the
balance layout, keep the pin, and learn 14 only when unpinned. Mutation
check: with the pin check removed from maybe_update_protocol_version, the
new case fails ("stored 13, producer 14, pinned true: 14 != 13"). The old
loop, seeded only at latest, passed.
Vectors:
- The exporter builds the newer-version vector over the latest protocol, not
a fixed 14, and writes its contract as newer-contract.bin. Rerunning it after
a protocol changes the outcome layout yields a vector the newest rules still
read. Today latest is 14, so the rerun rewrote every existing vector
byte-for-byte. newer-contract.bin equals pv14-contract.bin.
Docs:
- The vector READMEs explain this. The corpus README notes that
document-outcome/ and identity-discovery/ are signed SDK fixtures, not
manifest-based corpus cases.
- put-operations.md now says the newer-protocol fallback verifies only while
the newer protocol keeps the layout. A layout change needs an SDK update,
and an absence-proved outcome could verify at a location the newer
protocol no longer uses.
- The proof.rs comment now says what the producer's version selects: query
construction for the non-unique lookup, but only the owner-balance layout
for state-transition outcomes.
No behaviour change: tests, fixtures and docs only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Before this commit, two suites that build real proofs and sign them with a test quorum lived in drive-proof-verifier: - document_outcome, the cross-version document-outcome tests - identity_discovery with its mainnet replay, the non-unique lookup tests CI does not run that crate's tests. To build the proofs, the crate's dev-dependencies enabled drive's fixtures-and-mocks feature, which pulls in full and server, plus dpp's random-identities and random-documents. With resolver 2, `cargo test -p drive-proof-verifier` then compiled the client library against server-featured drive. The architecture overview forbids that: a client-side crate never imports drive with server. The transport-free check uses `cargo tree -e normal`, so it could not see the problem. The suites and their signing harness move to rs-drive-abci/tests with `git mv`. drive-abci already has those dev-dependencies, and CI's nextest run includes it with --all-features. The dev-dependency features return to what they were before the suites were added. Now `cargo tree -p drive-proof-verifier -e features -i drive` (normal + dev) shows only the verify cut: no server, full or fixtures-and-mocks. Changes to make the suites build in drive-abci: - ContextProvider and ContextProviderError are imported through the drive_proof_verifier re-export, as nonunique_merged_proof.rs already does. - The vectors stay in rs-drive-proof-verifier/tests/vectors, next to the crate they verify, so the rs-sdk tests that replay them keep their paths. The suites and exporters read and write them via ../rs-drive-proof-verifier/tests/vectors. - The vector READMEs name the new generator commands. Verified locally: - `cargo test -p drive-abci --test document_outcome --test identity_discovery -- --include-ignored` with DASH_SDK_EXPORT_NONUNIQUE_VECTORS=1: 7 + 14 passed, exporters included. The exporters rewrote every committed vector byte-for-byte. - `cargo test -p drive-proof-verifier --all-features`: 356 lib tests and the vectors_* suites pass without the removed features. No behaviour change: tests and dev-dependency features only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From the self-review of this branch.
Test:
- The document-outcome security-floor loop also signs as
TEST_PROTOCOL_VERSION_2. That is a version mock-versions builds hold a
table for; drive-abci's tests enable the feature. It must still be read
with the newest rules. Mutation check: let proof_query_platform_version
look up 0x10000002..=0x10000003 instead of mapping them to latest. The
new case fails ("version 268435458: invalid signature"). The 0x10000000
case passes that mutant.
Docs and comments:
- The dispatcher's 0|1 arm states its inertness for the shipped versions
only (PV1-13 select 0/0, PV14 selects 1/1). It also says an unknown
prover generation is refused, instead of claiming any newer producer
verifies.
- The single-version wrapper says what layout it expects.
- put-operations.md:
- only an unpinned SDK raises its stored version, and never to an
unknown one (verified-version recording does keep unknown versions);
- outcomes that return data are expected to fail after a layout change.
- proof.rs: for the non-unique lookup, the producer's version also selects
the tables that decode a two-proof answer.
- The verify v3 table doc and the prove_state_transition field doc name the
full owned, fee-paying set, and say where a new prover generation must be
mapped.
- The READMEs and the identity_discovery_tests header point to drive-abci
and to the mainnet replay.
- The signed_response doc explains why a dev-dependency matters
(resolver 2).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
📖 Book Preview built successfully. Download the preview from the workflow artifacts. Updated at 2026-10-23T20:01:52.784Z |
|
Waiting for bot review — coderabbitai skipped after its own rate limit · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit fe8a7dd) · triage: critical |
|
@coderabbitai review |
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The verifier-dispatch refactor preserves the known protocol behavior and correctly separates caller-selected security checks from producer-selected proof layout. CI reports the relevant Rust, SDK, and book checks successful; the remaining issues are documentation and maintainability suggestions, with PR Hygiene still pending.
🟡 6 suggestion(s) | 💬 1 nitpick(s)
3 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Align the versioned-dispatch guide with the in-place refactor exception
book/src/versioning/versioned-dispatch.md:745-747
This PR edits the shipped verifier generation in place, changes its internal signature, and removes the former v1 wrapper. The contributing conventions explicitly permit output-identical in-place refactors when the proof is documented, but this guide still says shipped generations must never be modified and that old code is never deleted. These rules now contradict each other and will mislead future contributors reviewing similar refactors. Qualify this guide to reference the pure-refactor exception.
source: gpt-6.1-sol (phase2-reviewer: general)
🟡 Suggestion: Use an explicit proof-layout type instead of a positional boolean
packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs:90-104
The shared implementation now serves both verifier generations but receives the producer layout as the positional carries_owner_balance: bool argument. The call site at the dispatcher does not reveal what true means, and a future proof-layout generation would require extending or reinterpreting the boolean mapping. A small OwnerBalanceLayout enum would make the wire-layout choice explicit and force future layout cases to be handled in the mapping.
source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)
🟡 Suggestion: Derive owner-balance expectations from the named layout boundary
packages/rs-drive-abci/tests/document_outcome.rs:219
This test defines FIRST_OWNER_BALANCE_VERSION but asserts version >= 14 directly. The corresponding SDK test also uses producer >= 14. If a later prover generation introduces a different layout, these assertions will silently encode the old protocol threshold rather than the actual producer layout. Use the named boundary here and derive the SDK expectation from the producer's prove_state_transition generation.
source: muse-spark-1.3-contributor (phase1-reviewer: general, rust-quality)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — This is a large cross-cutting change to the proof-verification dispatcher inverify_state_transition_was_executed_with_proof, directly affecting proof compatibility and cryptographic verification behavior across protocol generations. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `book/src/versioning/versioned-dispatch.md`:
- [SUGGESTION] book/src/versioning/versioned-dispatch.md:745-747: Align the versioned-dispatch guide with the in-place refactor exception
This PR edits the shipped verifier generation in place, changes its internal signature, and removes the former v1 wrapper. The contributing conventions explicitly permit output-identical in-place refactors when the proof is documented, but this guide still says shipped generations must never be modified and that old code is never deleted. These rules now contradict each other and will mislead future contributors reviewing similar refactors. Qualify this guide to reference the pure-refactor exception.
In `packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/mod.rs`:
- [SUGGESTION] packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/mod.rs:117-123: Remove hardcoded protocol numbers from the verifier-dispatch comment
The comment documents the current table with the literal ranges "Protocol versions 1 to 13" and "protocol version 14". When another protocol version or prover layout is added, the implementation can remain correct while this explanation becomes stale. Describe the invariant in terms of paired verifier/prover tables and the producer's layout instead of enumerating today's protocol numbers.
- [SUGGESTION] packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/mod.rs:124-130: Give the shared implementation a generation-neutral name
The dispatcher routes both generation 0 and generation 1 to `verify_state_transition_was_executed_with_proof_v0`, while the former `v1` implementation has been deleted. Generation 1 remains selectable in the version tables, so the remaining function name and directory make it appear that generation 1 has no implementation. Rename the shared body to a generation-neutral name such as `verify_state_transition_was_executed_with_proof_shared`, or place the shared implementation in the dispatcher module while retaining the versioned dispatch arms.
- [SUGGESTION] packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/mod.rs:277-286: Avoid comparing Debug strings in the producer-generation dispatch test
The test verifies dispatch independence by comparing formatted `Debug` representations of two errors. This is brittle because unrelated changes to error formatting can break the test, while matching Debug output does not document the intended error shape. Assert the relevant error variant directly, especially that the producer's unknown verifier generation does not produce `UnknownVersionMismatch` for the verifier method.
In `packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs`:
- [SUGGESTION] packages/rs-drive/src/verify/state_transition/verify_state_transition_was_executed_with_proof/v0/mod.rs:90-104: Use an explicit proof-layout type instead of a positional boolean
The shared implementation now serves both verifier generations but receives the producer layout as the positional `carries_owner_balance: bool` argument. The call site at the dispatcher does not reveal what `true` means, and a future proof-layout generation would require extending or reinterpreting the boolean mapping. A small `OwnerBalanceLayout` enum would make the wire-layout choice explicit and force future layout cases to be handled in the mapping.
In `packages/rs-drive-abci/tests/document_outcome.rs`:
- [SUGGESTION] packages/rs-drive-abci/tests/document_outcome.rs:219: Derive owner-balance expectations from the named layout boundary
This test defines `FIRST_OWNER_BALANCE_VERSION` but asserts `version >= 14` directly. The corresponding SDK test also uses `producer >= 14`. If a later prover generation introduces a different layout, these assertions will silently encode the old protocol threshold rather than the actual producer layout. Use the named boundary here and derive the SDK expectation from the producer's `prove_state_transition` generation.
In `packages/rs-drive-proof-verifier/src/proof.rs`:
- [NITPICK] packages/rs-drive-proof-verifier/src/proof.rs:404-410: Wrap the reflowed state-transition comment
The sentence ending with "Metadata is untrusted until the signature binds it to the root" is substantially longer than the surrounding wrapped comment lines. Reflowing it would keep the new explanation readable and consistent with the rest of the block.
|
Bots are done — your move: post |
Changes from review: - versioned-dispatch.md: the "never modify a shipped generation" bullet now points to the exception already stated under "One directory per generation" and in the coding conventions. That exception covers an edit that is unreachable at, or gives identical output for, every protocol version selecting the generation, and is documented as such. Without it, the two chapters contradicted each other. - should_not_read_the_producers_verifier_generation also asserts that the producer's unknown verifier generation does not surface as UnknownVersionMismatch, so the intent is stated directly, not only through the result comparison. - document_outcome uses FIRST_OWNER_BALANCE_VERSION in place of a literal 14. - The proof.rs comment block is rewrapped. No behaviour change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re @thepastaclaw's findings that had no inline thread:
|
|
@shumkov on it — I've queued this as job |
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
Thanks for the clarifications. reviewsys handles validation and re-review on this PR, so it will check the fixes and the two deferred suggestions on the updated head. No code changes from me. |
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The reviewed changes correctly separate caller-selected verifier security rules from producer-selected proof layout, preserve the verify-only client dependency boundary, and move server-dependent proof fixtures into drive-abci. I found no in-scope correctness, security, consensus, or architecture defects at this head. Rust workspace tests and Kotlin tests are queued, while the JS build is in progress; no failed code check is present.
🔴 0 blocking | 🟡 0 suggestion(s) | 💬 0 nitpick(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (agent: phase1-reviewer, role: rust-quality); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
criticalbygpt-6.1-sol(effort low) — The diff substantially changes proof-verification dispatch and version-dependent compatibility on the cryptographic proof and peer-facing verification surface, including verify_state_transition_was_executed_with_proof and its version tables. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer,muse-spark-1.3-contributor— rust-quality (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Single stage: Phase 1 and Phase 2 reviewed this head side by side, with no blocker gate between them (triage tier)
- Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort xhigh); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort xhigh); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify the current code and confirm that no unresolved issues remain.
No unresolved findings remain from the prior review on this head.
|
Bots are done — your move: post |
Issue being fixed or feature implemented
Follow-up to #5541, from its two post-merge reviews:
server. The suites build real proofs, so fix(sdk): verify operation proofs signed by older and newer protocol versions #5541 gave drive-proof-verifier's dev-dependencies drive'sfixtures-and-mocks, which pulls infullandserver. With resolver 2, that compiles the client library against server-featured drive incargo test. The architecture overview forbids this. CI's transport-free check usescargo tree -e normal, so it could not see it.verify_state_transition_was_executed_with_proof_for_query_versionmatched on the producer's generation and only range-checked the caller's. A later verifier generation with a stricter check would then be skipped whenever an SDK verified an older producer's outcome.What was done?
test(sdk)).git mvmovesdocument_outcome.rs,identity_discovery.rs,identity_discovery/mainnet.rsand thesigned_responsesigning harness fromrs-drive-proof-verifier/teststors-drive-abci/tests. drive-abci already has those dev-dependencies, and CI's nextest run covers it. drive-proof-verifier's dev-dependency features are back to their pre-fix(sdk): verify operation proofs signed by older and newer protocol versions #5541 state: no drivefixtures-and-mocks, no dpprandom-*. The binary vectors stay inrs-drive-proof-verifier/tests/vectors, so the rs-sdk tests that replay them keep their paths. The suites and exporters reach them through../rs-drive-proof-verifier/tests/vectors.refactor(drive)). The dispatcher matches on the caller's generation. Generations 0 and 1 share one implementation, because they apply the same checks. The only producer-dependent input is whether the proof carries the owner balance. It now comes from the producer'sprove_state_transitiongeneration, the generation that decides the layout. An unknown prover generation is refused asUnknownVersionMismatchnamingprove_state_transition. The duplicated0 | 1guard is gone. The one-linev1module is removed. Version-table docs: the verify v3 table no longer says the two generations must move in lockstep, and theprove_state_transitionfield doc now says verifiers read the producer's layout from it.test(sdk)):UnknownVersionMismatchfor an unknown verifier generation, andGroveDBErrorfor every newer signed version.PlatformVersion::latest()with its ownnewer-contract.bin. Rerunning the exporter after a layout change therefore gives a vector the newest rules still read.put-operations.mdsays the newer-protocol fallback verifies only while the newer protocol keeps the layout, and gives the absence caveat.document-outcome/andidentity-discovery/are signed SDK fixtures, not manifest corpus cases.-x: the non-unique lookup tests cover every served protocol version. With latest = 14 the version lists are unchanged on this branch.In-place changes to shipped generations
verify_state_transition_was_executed_with_proofgenerations 0 (PV1–PV14) and 1 (PV14, active on testnet) are restructured in place. This is a pure refactor with identical output for every protocol version:carries_owner_balance = (N == 1), with N read from the producer's table.carries_owner_balance = (producer's prove_state_transition == 1).PLATFORM_VERSIONSplusTEST_PLATFORM_V2/V3confirmed this; it is not committed.#[cfg(test)]code only, so consensus cannot change.How Has This Been Tested?
Dispatcher, red before and green after. With the old dispatcher, both new or updated dispatcher tests fail:
should_reject_unknown_verifier_or_producer_generationgotGroveDB(CorruptedData(..))instead ofUnknownVersionMismatchforprove_state_transition.should_not_read_the_producers_verifier_generationgotUnknownVersionMismatch(verify_state_transition_was_executed_with_proof, 255)where the known-producer result isGroveDB(CorruptedData(..)).With the new code,
cargo test -p drive --lib verify_state_transition_was_executed_with_proofpasses 83 tests. The 81 existing ones are unchanged.Mutation checks:
PlatformVersion::first()inproof_query_platform_version. The strengthened security-floor loop fails (version 15: invalid signature); the old loop passed.maybe_update_protocol_version. The new stored-below-producer case fails (stored 13, producer 14, pinned true: 14 != 13); the old pinned loop passed.Moved suites:
DASH_SDK_EXPORT_NONUNIQUE_VECTORS=1 cargo test -p drive-abci --test document_outcome --test identity_discovery -- --include-ignoredpasses 7 + 14, exporters included. The exporters rewrote every committed vector byte-for-byte.drive-proof-verifier without the removed features:
cargo test -p drive-proof-verifier --all-featurespasses 356 lib tests plus thevectors_*suites.cargo tree -p drive-proof-verifier -e features -i drive(normal + dev) showedfixtures-and-mocks,fullandserverbefore and none after.Other suites:
cargo test -p dash-sdk --features mocks --lib signed_version_tests: 16 passed.cargo test -p drive-abci --test nonunique_merged_proof: 12 passed.cargo test -p drive-abci --lib identity_by_non_unique_public_key_hash: 14 passed.Checks:
cargo check --workspace --all-targets --lockedpasses. CI's clippy command (--workspace --all-targets --all-features -D warnings) passes, and was rerun on the touched crates after the review fixes.cargo fmt --all --checkis clean.Mock version in the security-floor loop. The test now also signs as
TEST_PROTOCOL_VERSION_2. Mutation check: letproof_query_platform_versionlook up real mock versions. The new case fails (version 268435458: invalid signature). The0x10000000case passes that mutant.CI: the moved suites run in the drive-abci nextest step of the Rust workspace job. In run 39966843902,
drive-abci::document_outcomehad 6 passed anddrive-abci::identity_discoveryhad 13 passed (the two exporters are#[ignore]d). The two dispatcher tests indrivealso passed. Summary: 19681 tests run, 19681 passed, 1417 skipped.Notes for reviewers
--package drive-proof-verifierto the CI nextest list and adds one more signed test underrs-drive-proof-verifier/tests. Once PR 1 lands, this PR merges v5.0-dev, moves that test into drive-abci too, and keeps PR 1's CI-list line, which still covers the crate's lib andvectors_*tests.book/src/versioning/versioned-dispatch.mdsays, without exception, "Never modify a shipped generation, not even by threading a parameter" and "Old code is never deleted".coding-conventions.mdallows a pure in-place refactor that is documented in the PR, as above. This PR follows the conventions chapter. It is client-side verification code that block replay never runs. The absolute bullet should get the same exception.carries_owner_balanceremains aboolon the shared body, as it already was. A third layout would need a layout enum.newer-*vector is still built over protocol 14. Its README already says it verifies while the newest rules build the protocol 14 query.Breaking Changes
None. The
pubsignatures are unchanged. Every changed path is client-side verification or test code.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
fe8a7dd/self-reviewedWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.Summary by CodeRabbit
Improvements
Documentation