Repository navigation
fix(sdk): check document query shapes before sending them - #5558
Conversation
…nding Every document view (Document, Documents, the count / sum / average views and their split forms, ranked, having, composite) is fetched with the same DocumentQuery and the same wire encoding. A query built for one view and fetched as another is served by every node, and the view's verifier then refuses the answer for the request alone. The SDK reports that as Error::Proof, which is retried and bans each node that answered. Adds FromProof::check_request with a default that accepts every request, and tests that each view refuses, before anything is sent, the shapes its verifier refuses after the answer, while still accepting every shape it verifies: - dash-platform-queries: table-driven unit tests over all eleven views. - dash-sdk: mock-SDK tests through the Fetch and FetchMany trampolines; the request is registered as served, so a fetch that sends it reaches the real verifier. These tests fail until the views override the hook and the trampolines call it (next commit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every document view shares one DocumentQuery and one wire encoding, and several views checked the query only after a node had answered it. Every node serves such a query as what it asks for; the view's verifier then refuses the answer for the request alone, which surfaced as Error::Proof, was retried, and banned each node that answered (up to four per call with the default three retries). Before protocol 14 activates this hits 4.1.2 and 5.0 nodes alike. The views now override FromProof::check_request with the request-side checks their verifiers already run, and the Fetch and FetchMany trampolines call it after encoding and before sending, with the SDK's protocol version. A refusal is a non-retryable Error::Config; nothing is sent and no node is banned. The verifiers keep their own checks. Refused before sending now: - DocumentRankedEntries: a query outside the ranked grammar (e.g. a range on the grouped property, no limit), which nodes routing with the protocol-13 query table serve as a plain grouped aggregate. - DocumentHavingEntries: a query outside the having grammar, including one with no having clause (an ordinary grouped aggregate). - DocumentCount / DocumentSplitCounts, DocumentSum / DocumentSplitSums, DocumentAverage / DocumentSplitAverages: a select of anything but their own aggregate. - Document / Documents: an aggregate select (the verifier rebuilds a documents query whatever the select, so a served aggregate never verifies). - CompositeDocuments: a query without sub-queries (the encoder checks the composite shape only when sub-queries are present). - Every view but CompositeDocuments: sub-queries. Pending time-range selections are left unresolved: they resolve against the answer's signed block time and only ever add equality pins, which the grammars cannot refuse a query for lacking, so the check refuses nothing the verifier accepts. Tests would have caught this (previous commit): ✖ before the fix, 5 of 7 dash-platform-queries check_request_tests and 6 of 7 dash-sdk document_query_shape_tests fail; each SDK case was sent 4 times and ended in Error::Proof. ✔ after the fix, 7/7 and 7/7 pass. The two guard tests (views keep accepting the queries they verify; such queries are still sent) pass both before and after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nding Review of the pre-send checks found one more query that nodes serve and a view then refuses for the request alone: DocumentCount, DocumentSum and DocumentAverage add every verified entry up into one total, so their verifiers refuse a containsAny over several elements of a typed array even grouped by the array, which the server answers with one total per element. Their checks now key the where clauses as the verifiers do (one element at most), so the query is refused locally instead of banning each node. The Document / Documents check now compares only the select function. A projection field on the documents select is refused by the server on the V1 wire and dropped by the V0 encoder, whose served documents verify; the whole-projection comparison refused that V0 case. Also: - The trait contract says a check must not refuse what verifies at the given version or any later one, since answers verify at their signed version when that is newer. - drive-abci's real signed-proof round trips (windowed ranked and having, integer windows, typed-array elements, composite, and every view through `through_sdk`) assert that each verified query passes its view's check, so a check that refuses a verifiable query fails there. - Unit tests: a full select-mismatch matrix over the eight select-checked views, integer-range selections left pending, a composite sub-query error, comment accuracy fixes; the SDK helper is renamed check_before_sending. Tests would have caught this: ✖ against the previous commit's views, should_refuse_one_total_over_several_elements_of_a_typed_array and should_leave_a_documents_projection_field_to_the_encoder_and_the_server fail, and the SDK's should_refuse_one_count_over_several_elements_of_a_typed_array_without_sending_it fails with the query sent 4 times and an Error::Proof. ✔ after: 10/10 unit, 8/8 SDK. A ranked check that refused pending time ranges turns the two windowed drive-abci round trips and the unit guard red. 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
|
|
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 5f76f73) · triage: normal |
|
@coderabbitai review |
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The pre-send verification hook is correctly integrated into both Fetch paths and preserves valid document, ranked, having, and composite query shapes. Three in-scope gaps remain: split aggregate views do not validate typed-array ContainsAny shapes, aggregate views do not reject ranked/having-shaped requests that route to different proof formats, and preflight validation can use a different protocol-version snapshot from request encoding. CI has no reported code failure, although the Swift build and PR Hygiene checks remain in progress.
🟡 4 suggestion(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); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a substantial cross-cutting Rust change spanning SDK request validation, proof-verifier hooks, multiple document-query views, protocol-versioned query handling, and extensive tests, but it does not itself modify consensus rules, cryptography, funds movement, key handling, peer-facing deserialization, or storage migrations. - 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) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); 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 `packages/dash-platform-queries/src/documents/document_split_counts.rs`:
- [SUGGESTION] packages/dash-platform-queries/src/documents/document_split_counts.rs:53-59: Validate typed-array ContainsAny shapes for split aggregate views
This preflight checks only sub-queries and the select function. The verifier later calls `aggregate_where_clauses(..., folds_entries = false, ...)`, which still rejects typed-array `ContainsAny` shapes unless the query is grouped by exactly the constrained array field and has no conflicting range clause. Consequently, a split count request with `containsAny(["dash", "news"])` and no matching `group_by`, or with an additional range/grouping shape, passes `check_request` but is rejected only after a node answers. The same omission exists in `document_split_sums.rs` and `document_split_averages.rs`, leaving the SDK able to retry and ban honest nodes for these request-determined failures. Reuse `grouped_by_in_field` and `key_element_clauses` (or a shared aggregate-shape helper) in all three split-view checks.
In `packages/dash-platform-queries/src/documents/document_count.rs`:
- [SUGGESTION] packages/dash-platform-queries/src/documents/document_count.rs:37-51: Reject ranked and having-shaped requests in aggregate preflight checks
The aggregate checks validate the select, sub-query absence, and array-element keying, but do not inspect `order_by` or `having`. On protocol versions using the newer aggregate routing tables, a grouped aggregate with `order_by` naming the selected aggregate is routed as `Ranked`, while a grouped aggregate with one `having` clause is routed as `HavingRange`. The count, sum, and average verifiers instead derive their modes from `group_by` and `where_clauses` and do not verify those ranked/having proof formats. Such requests therefore reach a node, receive a ranked or having proof, fail as `Error::Proof`, and are retried against additional honest nodes. The check must account for the routing-table version: these shapes are not necessarily invalid on older versions where the routing table ignores `order_by` or rejects `having` differently. Apply the same version-aware guard to `DocumentSum`, `DocumentAverage`, and all three split aggregate views.
In `packages/rs-sdk/src/platform/fetch.rs`:
- [SUGGESTION] packages/rs-sdk/src/platform/fetch.rs:294-301: Validate against the protocol-version snapshot used for encoding
Both fetch trampolines capture `settings.protocol_version`, encode the rich query and wire request with that snapshot, and then call `check_before_sending`, which reads `sdk.version()` again. The SDK protocol version is an upward-ratcheting atomic value, so another verified response can update it between encoding and preflight. A version-sensitive shape can consequently be checked using a different version from the one used to encode the request, producing a false refusal or allowing a shape inconsistent with the encoded request. Pass the captured `settings.protocol_version` into `check_before_sending` and make the same change at the `FetchMany` call site.
In `packages/dash-platform-queries/src/documents/composite_document_query.rs`:
- [SUGGESTION] packages/dash-platform-queries/src/documents/composite_document_query.rs:410-421: Use one composite-shape error mapping for preflight and proof verification
The new preflight path strips the `SDK misconfigured: ` display prefix when `check_composite_shape()` returns `Error::Config`, while the post-response verifier maps the same failure with `e.to_string()` and retains that prefix. The same composite-shape failure therefore produces different text depending on whether it is caught before transmission or after a response. Since downstream integrations already classify configuration failures using error text in some paths, keep the mapping consistent by extracting a shared helper and using it from both `check_request` and `maybe_from_proof_with_metadata`.
|
Bots are done — your move: post |
…the encoding version Second round of review on the pre-send document query checks. - Count, sum and average views and their split forms now run the request-only part of their verifier before sending: typed-array keying (aggregate_where_clauses) and the group-by mode resolver (resolve_count_mode / resolve_sum_mode). From protocol 14 a grouped aggregate ordered by its aggregate, or with a having clause, is routed to the ranked or having-range executor. A node serves it only when no In or range constrains the group, which these verifiers refuse from the request alone, so each such fetch banned every node that answered. Protocol 13 nodes refuse the same shapes, so no version gate is needed. The split views now key typed-array clauses like their verifiers (needed so containsAny reads as the In the resolver looks for). - check_before_sending takes the protocol version the request was encoded with instead of re-reading sdk.version(), which a verified answer to another request can raise in between. - CompositeDocuments builds its composite-shape request error with one helper before sending and in the verifier, so the text is the same. The split-view guard fixtures now constrain their group with an In: a group nothing constrains is never verifiable. Tests would have caught this (red at 1723b2e, green here): - dash-platform-queries check_request_tests: 3 of 12 fail before (ranked/having through the aggregate views, split-view keying, composite text); 12/12 after. - dash-sdk document_query_shape_tests: 2 of 10 fail before. Split counts of a ranked count were sent 4 times and ended in Error::Proof; a probe view was checked at 14 for a request encoded at 13. 10/10 after. - Mutations: fetch_many back to sdk.version() fails the probe's fetch_many half; check_sum_request without the resolver fails the aggregate-view unit test for DocumentSum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
@coderabbitai review |
✅ Action performedReview finished.
|
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The complete diff adds request-shape preflight validation at the proof-verifier boundary, invokes it before retryable SDK transport using the encoding-time protocol version, and retains all post-response proof checks. The four prior findings are fixed, and no new correctness, security, layering, or consensus issues were found. Rust workspace tests and JS package builds were still in progress at the supplied CI snapshot.
🔴 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: tenderdash-consensus-security); reviewer 9: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 10: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 11: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 12: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 13: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 14: gpt-6.1-sol (agent: phase2-reviewer, role: tenderdash-consensus-security); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a substantial cross-cutting Rust change spanning request validation, proof verification, SDK fetching, protocol-version behavior, and extensive tests, but it does not itself alter consensus rules, cryptography, funds movement, or persistent storage. - 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) - 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 high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— tenderdash-consensus-security (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— rust-quality (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— tenderdash-consensus-security (completed, effort high); 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 |
Brings 5.0.1 (v5.0-dev 093268c) into v5.1-dev: the 5.0.0 release (dashpay#5594, with dashpay#5352, dashpay#5582, dashpay#5583), dashpay#5557, dashpay#5558, dashpay#5560, dashpay#5561, dashpay#5559 and the 5.0.1 release bump (dashpay#5606). Conflict resolutions: - CHANGELOG.md: [Unreleased] on top, then the 5.0.1 and 5.0.0 entries. - rs-sdk error.rs: both sides added methods to Error; kept v5.1's consensus_error and dashpay#5560's spares_responder and into_exhausted_error. - rs-drive-abci tests/signed_response/mod.rs, moved from drive-proof-verifier by dashpay#5559: dashpay#5559's location, doc and drive_proof_verifier ContextProvider import, with v5.1's dpp::bls port. Semantic conflicts resolved: - rs-drive-abci tests/older_node_answers.rs (dashpay#5561): ported to dpp::bls, since v5.1-dev no longer ships blsful (dashpay#5320). The key is the scalar blsful's SecretKey::from_hash derived from the same label, so the public key and Basic-scheme signature bytes are unchanged. - rs-sdk protocol_gate_tests.rs (dashpay#5561): should_ask_a_fresh_sdk_network_for_its_version_once_then_send expected the SDK at 14 after its calls. The mock answers every expectation at the latest version, which was 14 on v5.0-dev and is 15 here, so the mocked fee-pots answers raise an unpinned SDK on to 15 (left: 15, right: 14). The test now expects the higher of 14 and the latest version; that the probe raised the SDK to 14 is shown by the first call being sent at all. Fails on the merge without this change, passes with it. Workspace and package versions follow v5.0-dev to 5.0.1, as the previous forward merges did. rust-dashcore stays on dev aca02026. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue being fixed or feature implemented
Every document view (
Document,Documents, the count / sum / average views and their split forms,DocumentRankedEntries,DocumentHavingEntries,CompositeDocuments) is fetched with the sameDocumentQueryand the samegetDocumentsencoding. Several views checked the query's shape only insideFromProof, after a node had already answered. Nodes serve such a query as what it asks for. The view's verifier then refuses the answer because of the request alone, which the SDK reports asError::Proof. That error is retryable, so each node that answered gets banned: up to four per call with the default three retries.The two cases that started this:
GROUP BYproperty, or no limit). Every protocol-13 node, 4.1.2 and 5.0 alike, routes it with the v13 query table and serves it as a plain grouped aggregate. The ranked verifier then refuses it. Before protocol 14 activates, each such call bans up to four honest nodes of any version.sub_queriessent through a non-composite view.ensure_no_sub_queriesrefused it only after the answer.The same class also covered these cases, now fixed too:
DocumentCount/DocumentSplitCounts,DocumentSum/DocumentSplitSums,DocumentAverage/DocumentSplitAveragesfetched with a query that selects something other than their aggregate. For example,DocumentCount::fetchwithout.with_select(count_star())is sent as a plain documents query.DocumentCount,DocumentSumandDocumentAveragewith acontainsAnyover several elements of a typed array, grouped by the array. The server answers with one total per element, but these views add the entries up into one total, so their verifiers refuse the request.DocumentCount,DocumentSum,DocumentAverageand their split forms with a ranked- or having-shaped query: grouped, and ordered by the aggregate or carrying ahavingclause. From protocol 14 the routing table sends these to the ranked or having-range executor. A node serves one only when noInor range constrains the group, because its where clauses may only pin the index properties before the grouped one. The count / sum / average verifiers refuse exactly that group shape from the request alone.DocumentHavingEntrieswith nohavingclause, which is an ordinary grouped aggregate and is served.Document/Documentswith an aggregate select. The documents verifier rebuilds a documents query whatever the select says, so a served count can never verify.CompositeDocumentswithout sub-queries. The encoder checks the composite shape only when sub-queries are present, so the query went out as a plain page.What was done?
FromProof::check_request(&Self::Request, &PlatformVersion)(rs-drive-proof-verifier) is a new provided method that checks a request before it is sent. Its default accepts everything. The documented contract: an implementation must never refuse a request thatmaybe_from_proof_with_metadatacan verify, at the given version or any later one.DocumentQuery(dash-platform-queries). Every check except one reuses a request-side helper the verifier already runs:ensure_no_sub_queries,assert_select_is_{count,sum,avg},aggregate_where_clauseswith the mode resolversresolve_count_mode/resolve_sum_mode(throughcheck_{count,sum,average}_request),assert_ranked_shape,assert_having_shape,check_composite_shape. The one new condition is inDocument/Documents, which refuse a select function other thanDocuments.Inor range constrains needs no version gate. On protocol 13 and earlier, nodes refuse that shape and anyhaving. On protocol 14, a node serves it only as a ranked or having-range answer, which these views cannot verify. Gating on the SDK's stored version would add nothing, and an SDK pinned ahead of its network would refuse queries that the network still serves as grouped aggregates.folds_entries = false). This is needed so acontainsAnyreads as theInthe group-by mode resolver looks for. The keying refusals it adds (several elements without grouping by the array alone, or under a range) are refused by nodes too, with the same drive function, so on their own they never banned.CompositeDocumentsbuilds its request error with one helper,check_composite_request, both before sending and in the verifier. The text is the same either way.FetchandFetchManytrampolines (rs-sdk) call the hook after encoding and beforeretry(), at the protocol version the request was encoded with (settings.protocol_version). A verified answer to another request can raisesdk.version()in between. A refusal is a non-retryableError::Configwhose text is the verifier's message without thedecode request:prefix. Nothing is sent and no node is banned.FromProofcan still be called directly.detect_ranked_modeanddetect_having_modeare method version 0 in every platform version. Checking at the encoding version therefore matches the verifier, which may use a newer signed version.Document,DocumentsDocumentCount,DocumentSum,DocumentAverageInor range constrains, which covers ranked- and having-shaped queries;containsAnyover several elements of a typed arrayDocumentSplitCounts,DocumentSplitSums,DocumentSplitAveragesInor range constrains, as above;containsAnyover several elements unless grouped by the array alone and without a rangeDocumentRankedEntriesDocumentHavingEntrieshavingCompositeDocumentsSurface effect. These queries already failed. They now fail locally:
Configkind withisRetriable: false, where it wasProofand retriable.Error::Config.No in-repo caller (wasm-sdk, rs-sdk-ffi, platform-wallet, rs-sdk internals and tests, offline vectors) builds a refused shape. wasm-sdk already pre-checked its ranked, having and composite shapes.
Not done here (follow-ups):
resolve_{ranked,having}_query_for_mode(covering-index resolution) still runs only after the answer. It needs the resolved time ranges and the index map, and a node refuses a query no index covers, so it does not ban.Document::fetchturns "expected 1 element" into a retryableError::Proof. That refusal depends on the answer, so a pre-send check cannot help; it needs a non-retryable error instead.Error::Configby substring, not with a typed arm. This is pre-existing, and no FFI document function can build a refused shape.delegate_from_proof_variant!does not forwardcheck_request. It only wraps identity request enums, which keep the default.ChainedDocumentQueryalready checks its shape when it is encoded.This PR is independent of the protocol-version gate PR. When both are in, the gate runs first and this check runs after it.
How Has This Been Tested?
New tests:
dash-platform-queriesdocuments::check_request_tests(12 tests) covers:In, because a group nothing constrains is never verifiable;check_requestand from the verifier;dash-sdksdk::document_query_shape_tests(10 tests) goes through both trampolines on a mock SDK. The wire request is registered as served, so a fetch that sends it reaches the real verifier. Each case assertsError::Configand that the request was never sent. A guard checks that well-formed ranked and documents queries are still sent. A probe view that reports the version it was checked at, together with a query that raises the SDK's version while it is being built, pins the encoding-version check in both trampolines.query::document_query::v1::testsnow assert that every query they verify passes its view's check. These cover windowed ranked (newest and by-start) and having, integer windows (count and documents), typed-array elements (every view throughthrough_sdk, plus the documents element page) and the composite composition.Red → green:
Error::Proof, which is the ban. After commit 2, everything passes; the guards pass both before and after.Error::Proof. After commit 3: 10/10 unit and 8/8 SDK pass.1723b2e5f3, 3 of 12 unit tests fail (ranked/having through the aggregate views, split-view keying, composite text) and 2 of 10 SDK tests fail.DocumentSplitCountsof a ranked count was sent 4 times and ended inError::Proof. The version probe was checked at 14 for a request encoded at 13. After commit 4: 12/12 unit and 10/10 SDK pass.Mutation checks. Each one turned the named tests red:
fetch.rscall removedFetchSDK testsfetch_many.rscall removedFetchManySDK testsError::ProofDocumentsrefusing everythingDocumentSplitSumsselect check droppedfetch_many.rsback tosdk.version()fetch_manyhalf)check_sum_requestwithout the mode resolverDocumentSum)Runs:
cargo fmt --all -- --check: clean.cargo clippy --workspace --all-targets --all-features --locked -- --no-deps -D warnings(the CI flags): clean.cargo check -p drive-proof-verifier --lockedandcargo check -p dash-platform-queries --lockedare clean.cargo test -p drive-proof-verifier -p dash-platform-queries -p dash-sdk --all-features --locked --lib --tests: 1070 passed, 0 failed. 28 were ignored, all network tests that were ignored already.cargo test -p drive-abci --lib query::document_query::v1::tests: 113 passed, including the 16 real-proof round trips that now assert the check. These include signed count, sum, average, split-count and split-sum round trips throughthrough_sdk, so the new group check accepts every grouped shape they verify.Breaking Changes
None.
check_requestis a provided trait method with a default. Every query now refused locally already failed before: either a node refused it, or it was refused after the answer, with node bans. The drive-abci real-proof guards show that the verifiable shapes they cover still pass.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 ·
5f76f73/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