Repository navigation
feat: range aggregates and count offsets on a ProvableCountProvableBigSumTree - #1051
Conversation
A tree that commits both its element count and a 128-bit sum into every node hash: the wide counterpart of ProvableCountProvableSumTree. A sum tree's total is an i64 and refuses a write that takes it past that range; this tree's children still contribute an i64 each and its total is an i128. - Element discriminant 29 with wrapper twins 157, 179 and 195; tree type 17; feature type and link aggregate tag 9 (count varint, then 16 big-endian sum bytes). - node_hash_with_count_and_big_sum and five proof nodes (tags 0x60..=0x6D) mirroring the narrow family. - Inserts, deletes, batches, regular query proofs on V1 envelopes, trunk and branch chunks, chunk restore, cost sizes and estimates, and verify_grovedb. - Creation is gated by the new operations.insert.provable_count_provable_big_sum_tree_creation slot: refused by GROVE_V1..GROVE_V4, allowed from GROVE_V5. - Range aggregates and count offsets are not offered on the tree and are refused. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…gSumTree AggregateCountOnRange, count-offset pages and local offsets work on the wide tree through the existing entry points, which carry no sum. AggregateSumOnRange and AggregateCountAndSumOnRange are the same queries on it; their sum is an i128, returned by new entry points (verify_aggregate_big_sum_query, verify_aggregate_count_and_big_sum_query, query_aggregate_big_sum, query_aggregate_count_and_big_sum, their per-key forms, and the matching Merk primitives). The caller names the width: the i64 entry points keep refusing the wide tree and its proofs, and the i128 ones refuse a tree with an i64 sum. The narrow and wide paths share one implementation. Sums are held as i128 throughout the Merk emitters, walks and verifiers, with wrapping subtraction for a node's own sum and checked addition for totals; the GroveDB verifiers are generic over the sum width. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
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. |
|
🔍 Review in progress (commit f5b6982) · live progress |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 2 only (no Phase 1 for this repository)
The PR contains three in-scope blocking correctness/versioning defects and one diagnostic inconsistency. Empty wide hosts can produce incomplete combined aggregate carrier proofs, wide verifiers can reject valid cancellation-heavy sums due to accumulation order, and the new wide paths are not gated to GROVE_V5; the CI snapshot shows no failed code checks.
🔴 3 blocking | 🟡 1 suggestion(s)
2 finding(s) not shown inline (the lines are not part of this PR's diff)
🔴 Blocking: Descend into empty wide hosts for combined aggregate carriers
grovedb/src/operations/proof/generate.rs:3491-3495
The empty-host descent arm for AggregateCountAndSumOnRange matches only ProvableCountProvableSumTree(None, ..), while the corresponding count and sum arms support ProvableCountProvableBigSumTree. When a carrier query targets an empty wide host, descends_into_empty_aggregate_tree is true but this arm is skipped, so no lower layer is emitted. The per-key combined verifier then cannot find the required lower proof for that outer key and rejects an otherwise valid zero-count/zero-sum proof. Add the wide element to this match arm, including the up-to-limit path that shares it.
Ok(Element::ProvableCountProvableSumTree(None, ..))
| Ok(Element::ProvableCountProvableBigSumTree(None, ..))
source: gpt-6.1-sol (phase2-reviewer: general)
🟡 Suggestion: Include the wide tree in the count-offset diagnostic
grovedb/src/operations/proof/verify.rs:694-696
The predicate immediately above accepts Element::ProvableCountProvableBigSumTree(..), but the returned InvalidQuery message still lists only the three older host types. This makes diagnostics for invalid count-offset hosts incomplete and contradictory to the behavior added by the PR. The analogous messages in the count-offset generation paths should be updated as well.
"count-offset paginated queries are only valid against \
ProvableCountTree / ProvableCountSumTree / \
ProvableCountProvableSumTree / ProvableCountProvableBigSumTree merks",
source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning, rust-quality)
Review provenance
Source: reviewer 1: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 8: gpt-6.1-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a broad, intricate change across GroveDB and Merk query, proof-generation, verification, aggregation, and offset paths, but it does not directly change consensus rules, funds movement, cryptographic primitives, signatures, peer-facing deserialization, or storage migrations. - Phase 1 reviewers: not run (disabled for this repository)
- Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- 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— 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
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `grovedb/src/operations/proof/generate.rs`:
- [BLOCKING] grovedb/src/operations/proof/generate.rs:3491-3495: Descend into empty wide hosts for combined aggregate carriers
The empty-host descent arm for `AggregateCountAndSumOnRange` matches only `ProvableCountProvableSumTree(None, ..)`, while the corresponding count and sum arms support `ProvableCountProvableBigSumTree`. When a carrier query targets an empty wide host, `descends_into_empty_aggregate_tree` is true but this arm is skipped, so no lower layer is emitted. The per-key combined verifier then cannot find the required lower proof for that outer key and rejects an otherwise valid zero-count/zero-sum proof. Add the wide element to this match arm, including the up-to-limit path that shares it.
In `merk/src/proofs/query/aggregate_sum/verify.rs`:
- [BLOCKING] merk/src/proofs/query/aggregate_sum/verify.rs:333-335: Accumulate wide range sums in prover order
The verifier adds `left_in` and `right_in` before adding the current node contribution, but the prover accumulates in `left + self + right` order. With i128 values, a valid range can have `left_in = i128::MAX`, `self_contribution = -i128::MAX`, and `right_in = i128::MAX`: the prover obtains `i128::MAX`, while this verifier attempts `i128::MAX + i128::MAX` first and rejects the proof as overflowed. The combined count-and-sum verifier has the same ordering at `merk/src/proofs/query/aggregate_count_and_sum/verify.rs:339-341`. Mirror the prover's order in both verifiers.
In `grovedb/src/operations/proof/aggregate_sum/mod.rs`:
- [BLOCKING] grovedb/src/operations/proof/aggregate_sum/mod.rs:252-258: Gate wide aggregate verification to GROVE_V5
`verify_aggregate_big_sum_query` checks only the existing `verify_query_with_options` capability, which is enabled in GROVE_V1 through GROVE_V5. Consequently, current code can accept a wide aggregate proof when the caller supplies GROVE_V1 through GROVE_V4. The same unversioned acceptance exists in the wide per-key and combined wide verifiers, wide no-proof reads, and widened count/count-offset host paths. The insertion gate prevents normal creation of the wide element before V5, but it does not make these public readers and verifiers fail closed for a V4 version: element deserialization and terminal validation still accept the wide variant in this code. Add a V5-only capability or equivalent checks and test that V4 rejects wide proofs/hosts while V5 accepts them.
In `grovedb/src/operations/proof/verify.rs`:
- [SUGGESTION] grovedb/src/operations/proof/verify.rs:694-696: Include the wide tree in the count-offset diagnostic
The predicate immediately above accepts `Element::ProvableCountProvableBigSumTree(..)`, but the returned `InvalidQuery` message still lists only the three older host types. This makes diagnostics for invalid count-offset hosts incomplete and contradictory to the behavior added by the PR. The analogous messages in the count-offset generation paths should be updated as well.
| let in_range = left_in | ||
| .checked_add(right_in) | ||
| .and_then(|sum| sum.checked_add(self_contribution)) |
There was a problem hiding this comment.
🔴 Blocking: Accumulate wide range sums in prover order
The verifier adds left_in and right_in before adding the current node contribution, but the prover accumulates in left + self + right order. With i128 values, a valid range can have left_in = i128::MAX, self_contribution = -i128::MAX, and right_in = i128::MAX: the prover obtains i128::MAX, while this verifier attempts i128::MAX + i128::MAX first and rejects the proof as overflowed. The combined count-and-sum verifier has the same ordering at merk/src/proofs/query/aggregate_count_and_sum/verify.rs:339-341. Mirror the prover's order in both verifiers.
| let in_range = left_in | |
| .checked_add(right_in) | |
| .and_then(|sum| sum.checked_add(self_contribution)) | |
| let in_range = left_in | |
| .checked_add(self_contribution) | |
| .and_then(|sum| sum.checked_add(right_in)) | |
| .ok_or_else(|| { | |
| Error::InvalidProofError( | |
| "aggregate-sum proof: in-range sum overflowed i128".to_string(), | |
| ) | |
| })?; |
source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning, rust-quality)
There was a problem hiding this comment.
Fixed in f5b6982: both verifiers now add left, own, right, as the provers do, and a test covers sums that cancel (MAX - MAX + MAX). The existing overflow test's proof was being refused for its shape before it reached the additions, so it is rebuilt to reach them. The count-offset and count on range messages also name the wide tree now.
| check_grovedb_v0!( | ||
| "verify_aggregate_big_sum_query", | ||
| grove_version | ||
| .grovedb_versions | ||
| .operations | ||
| .proof | ||
| .verify_query_with_options |
There was a problem hiding this comment.
🔴 Blocking: Gate wide aggregate verification to GROVE_V5
verify_aggregate_big_sum_query checks only the existing verify_query_with_options capability, which is enabled in GROVE_V1 through GROVE_V5. Consequently, current code can accept a wide aggregate proof when the caller supplies GROVE_V1 through GROVE_V4. The same unversioned acceptance exists in the wide per-key and combined wide verifiers, wide no-proof reads, and widened count/count-offset host paths. The insertion gate prevents normal creation of the wide element before V5, but it does not make these public readers and verifiers fail closed for a V4 version: element deserialization and terminal validation still accept the wide variant in this code. Add a V5-only capability or equivalent checks and test that V4 rejects wide proofs/hosts while V5 accepts them.
source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, platform-versioning, rust-quality)
There was a problem hiding this comment.
Not adding a gate here. A chain on GROVE_V1..GROVE_V4 cannot hold a ProvableCountProvableBigSumTree, because those versions refuse to create it, so a proof carrying wide nodes cannot hash to such a chain's root and the no-proof reads have no such tree to reach. The verifiers return the root they reconstruct and the caller compares it with the root it trusts, which is what binds a proof to a chain. A second slot checked in every entry point would guard a state that cannot exist. The PR description states this under "Versioning".
…t estimators Review follow-ups for the ProvableCountProvableBigSumTree: - The worst-case insert and both replace element estimators price the tree as the layered tree it is written as, at its own cost size. The average-case insert estimator already did. - `EstimatedSumTrees::SomeSumTrees` gains `provable_count_provable_big_sum_trees_weight`, weighed at 24 bytes by the mixed-layer size estimate. A weight of 0 leaves the estimate as it was. - Trunk and branch query results read the count of a count and sum node, for the narrow tree (skipped before) and the wide one. - The combined count and sum descent into an empty tree lists the wide tree next to the narrow one, like the count and the sum descents. - Three test lists (merk tree types, state sync node families, proof count helper) include the wide tree. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…g-sum-tree-range-aggregates Brings in the review follow-ups of the tree PR. With the combined count and sum descent listing the wide tree, a per-key count and sum query over an empty wide tree proves and verifies as (0, 0); a test covers it next to the count and the sum. Co-Authored-By: Claude Fable 5.2 <[email protected]>
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 2 only (no Phase 1 for this repository)
The wide aggregate proof implementation is otherwise coherent, and the empty wide-host descent fix is present. The current head still has two blocking issues in wide verification plus one inaccurate count-offset diagnostic; no failed code checks are present in the CI snapshot, although the review check remains in progress.
🔴 2 blocking | 🟡 1 suggestion(s)
1 finding(s) not shown inline (the lines are not part of this PR's diff)
🟡 Suggestion: Include the wide tree in the count-offset diagnostic
grovedb/src/operations/proof/verify.rs:694-696
The host allowlist correctly accepts Element::ProvableCountProvableBigSumTree, but the InvalidQuery message still lists only the three older host types. When a count-offset query fails this validation, the diagnostic contradicts the accepted set and makes wide-tree failures misleading to callers.
return Err(Error::InvalidQuery(
"count-offset paginated queries are only valid against ProvableCountTree / ProvableCountSumTree / ProvableCountProvableSumTree / ProvableCountProvableBigSumTree merks",
));
source: gpt-6.2-sol (phase2-reviewer: general, platform-versioning)
Still open from earlier rounds (2)
- 🔴 Blocking: Gate wide aggregate verification to GROVE_V5 —
grovedb/src/operations/proof/aggregate_sum/mod.rs:252-258(thread) - 🔴 Blocking: Accumulate wide range sums in prover order —
merk/src/proofs/query/aggregate_sum/verify.rs:333-340(thread)
Review provenance
Source: reviewer 1: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: rust-quality); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — This is a large, cross-cutting change to range aggregation, proof generation and verification, and wide-tree query APIs, but it does not itself modify the explicitly critical surfaces required for the critical tier. - Phase 1 reviewers: not run (disabled for this repository)
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— platform-versioning (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— rust-quality (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `grovedb/src/operations/proof/verify.rs`:
- [SUGGESTION] grovedb/src/operations/proof/verify.rs:694-696: Include the wide tree in the count-offset diagnostic
The host allowlist correctly accepts `Element::ProvableCountProvableBigSumTree`, but the `InvalidQuery` message still lists only the three older host types. When a count-offset query fails this validation, the diagnostic contradicts the accepted set and makes wide-tree failures misleading to callers.
In `grovedb/src/operations/proof/aggregate_sum/mod.rs`:
- [BLOCKING] grovedb/src/operations/proof/aggregate_sum/mod.rs:252-258: Gate wide aggregate verification to GROVE_V5
(carried; thread: https://github.com/dashpay/grovedb/pull/1051#discussion_r4604584414)
In `merk/src/proofs/query/aggregate_sum/verify.rs`:
- [BLOCKING] merk/src/proofs/query/aggregate_sum/verify.rs:333-340: Accumulate wide range sums in prover order
(carried; thread: https://github.com/dashpay/grovedb/pull/1051#discussion_r4604584388)
…de's hash cost `KVRefValueHashCountBigSum` hashes the referenced value and combines it with the node's value hash before hashing the node. The cost of those two hashes was computed and then left out of the returned cost. It is part of it now. The hash itself is unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]>
…g-sum-tree-range-aggregates
develop now holds the tree PR (#1050) as one commit whose content is the branch tip this branch already merged, so the merge changes no file. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Waiting for bot review — coderabbitai not yet · thepastaclaw 2 threads unresolved — resolve them. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw 2 threads unresolved — resolve them. Wait for the missing reviews, or a writer can post |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw 2 threads unresolved — resolve them. Wait for the missing reviews, or a writer can post |
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (83.83%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #1051 +/- ##
===========================================
- Coverage 93.28% 93.22% -0.07%
===========================================
Files 366 366
Lines 114084 114846 +762
===========================================
+ Hits 106421 107061 +640
- Misses 7663 7785 +122
🚀 New features to boost your workflow:
|
The sum and the count and sum verifiers added a node's in-range sums as left, right, own, while the provers add left, own, right. With sums that cancel near the ends of the i128 range the verifier could report an overflow on an intermediate sum the prover never formed. Both verifiers now add in the prover's order. Sums of a tree with an i64 total cannot reach that range, so its results are unchanged. The overflow test's proof was refused for its shape before it reached the additions; it now reaches them, and a second test covers the order. Also name the ProvableCountProvableBigSumTree in the count-offset and count on range messages that list the accepted trees. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Waiting for bot review — coderabbitai not yet · thepastaclaw 2 threads unresolved — resolve them. Wait for the missing reviews, or a writer can post |
Basic explanation
What this does: Makes the range aggregates and count offsets work on a
ProvableCountProvableBigSumTree(added in #1050). The count on a range, the sum on a range, both together, count-offset pages and local offsets can now be proved, verified and read on the wide tree. Sums come back as ani128.Value: #1050 added the tree but left these queries refused on it, so a caller that needs a provable count and a sum past the
i64range could store the data but not ask "what is the count and total between these two keys", which is what an average over a range needs. This closes that gap.Risks: Medium. The existing 64-bit entry points and their proofs are unchanged in what they accept and return, but the code underneath them is now shared with the wide path, so the narrow path was touched (see "Changes to shared code"). The new entry points are additions.
Issue being fixed or feature implemented
On a
ProvableCountProvableBigSumTree, before:After:
What was done?
Queries that carry no sum work on the wide tree through the existing entry points:
AggregateCountOnRange(verify_aggregate_count_query*,query_aggregate_count*), count-offset pages, and local offsets. Their proofs carry the wide nodes, which the tree's hash needs.Queries that return a sum are the same
AggregateSumOnRangeandAggregateCountAndSumOnRangequery items. Proof generation picks the wide prover when the tree is wide. The result is read by new entry points that returni128:i64(existing, unchanged)i128(new)verify_aggregate_sum_queryverify_aggregate_big_sum_queryverify_aggregate_sum_query_per_key,..._up_to_limitverify_aggregate_big_sum_query_per_key,..._up_to_limitquery_aggregate_sum,query_aggregate_sum_per_keyquery_aggregate_big_sum,query_aggregate_big_sum_per_keyverify_aggregate_count_and_sum_queryverify_aggregate_count_and_big_sum_queryverify_aggregate_count_and_sum_query_per_key,..._up_to_limitverify_aggregate_count_and_big_sum_query_per_key,..._up_to_limitquery_aggregate_count_and_sum,..._per_keyquery_aggregate_count_and_big_sum,..._per_keyMerk gains the matching primitives:
prove_aggregate_big_sum_on_range,prove_aggregate_count_and_big_sum_on_range,big_sum_aggregate_on_range,count_and_big_sum_aggregate_on_range,verify_aggregate_big_sum_on_range_proof,verify_aggregate_count_and_big_sum_on_range_proof.The caller names the width. The
i64entry points refuse a wide tree and its proofs, and thei128ones refuse a tree with ani64sum. No call narrows or widens a sum silently, so a result that fits today cannot start failing once the total grows.Not in this PR:
run_path_querykeeps returningi64sums inPathQueryRunand refuses the wide tree for the two sum queries. An indexed variant of the tree is also not included.Changes to shared code
The narrow and wide paths share one implementation, so these existing functions changed. For a tree with an
i64sum each change gives the same result as before.aggregate_sum,aggregate_count_and_sum): sums are held asi128from the start instead of being widened fromi64at each use. The node's own sum is computed with wrapping subtraction, which is exact whenever the own sum fits ani128. Totals are added with checked addition, which returns an overflow error where the code usedsaturating_addor+=. Sums ofi64values cannot reach that in a tree that fits in storage.i128range is refused instead of panicking in debug builds or wrapping in release ones. A node's sums are added in the prover's order (left, own, right; the verifiers added left, right, own before), so a verifier cannot overflow on an intermediate sum the prover never formed. Each entry point's node allowlist decides which family a proof may contain: thei64verifiers accept the narrow nodes only, as before.aggregate_sum,aggregate_count_and_sum): the internal functions are generic over a smallSumWidth/CountAndSumWidthtrait that supplies the leaf verifier, the sum type and the terminal tree check. The publici64functions instantiate it with the narrow width.Versioning. No version slot is added. The wide tree can only be created from
GROVE_V5(#1050), so underGROVE_V1..GROVE_V4no terminal element of that type exists for these queries to reach, and a proof carrying wide nodes cannot hash to a root of such a chain.How Has This Been Tested?
New tests:
merk/src/proofs/query/wide_tree_aggregate_tests.rs(9): count, sum, and count and sum over eight range shapes, proved and verified against the root and read without a proof; a count-offset page in both directions; the narrow and wide entry points refusing each other's trees and proofs; an empty tree; every node of a proof altered in turn; a proof whose sums overflowi128refused; sums that cancel near the ends of thei128range accepted.grovedb/src/tests/provable_count_provable_big_sum_tree_tests.rs(9 new, 30 in the file): the three aggregates proved against the database root over six ranges; no-proof reads; thei128entry points refusing a narrow tree; per-key aggregates over three wide trees, proved and read; per-key aggregates where one of the wide trees is empty (count 0, sum 0); every byte of a proof flipped in turn; count-offset pages in both directions; a count-offset page returning a reference row; local offsets over three wide trees.cargo test -p grovedb -p grovedb-merk -p grovedb-query -p grovedb-element -p grovedb-version -p grovedb-costs --all-features cargo clippy --workspace --exclude grovedb-bincode --exclude grovedb-bincode-derive --all-features --no-deps --all-targets -- -D warnings cargo build --no-default-features --features verify -p grovedbAll pass locally:
grovedb3802 library tests (8 ignored, as before),grovedb-merk843,grovedb-query266,grovedb-element229 + 37,grovedb-version62. Clippy with-D warningson all targets andcargo fmt --all -- --checkare clean.Breaking Changes
None beyond #1050. Every public addition is a new function. Existing functions keep their signatures.
Two existing behaviours widen, both on the tree #1050 adds:
verify_aggregate_count_query*andquery_aggregate_count*accept aProvableCountProvableBigSumTreeterminal, and count-offset pages and local offsets accept it as a host. #1050 refused both.Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
f5b6982/skip-botsproceeds without the ones not yet reported/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.