Repository navigation
fix(version)!: gate the store range reads, proofs and creation estimates on GROVE_V5, not V4 - #1029
Conversation
…tes on GROVE_V5, not V4 GroveDB 6.1.1 shipped GROVE_V4, and Dash Platform 5.0 runs it. #1027 (a store's position-range read and V1 range proofs) and #1026 (the insert estimators pricing a store's creation as the apply does) landed after 6.1.1 and changed V4 in place. They move to GROVE_V5: - private_document_store.get_range and range_proof are 0 in GROVE_V4, as 6.1.1 had no such read or proof, and 1 in GROVE_V5. At V4 the range read fails closed and a V1 proof neither carries nor accepts a lower layer under a store, as 6.1.1 refused them. - The average- and worst-case merk_insert_element v1 estimators are back to their 6.1.1 bytes. The store pricing is v2, selected by the new values average_case_merk_insert_element: 1 and worst_case_merk_insert_element: 1 in GROVE_V5. Average v2 runs v1 and adds the existence check and the empty root's two hashes; worst v2 prices a store as a layered tree with those charges and hands every other element to v1. Verifier hardening from #1027 that refuses a mistyped lower layer at every version stays as it is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 34 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. |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
🕓 Review not started yet because the new head is waiting for the 30-minute push debounce.
Commit 909f4e6. Normal review starts when eligible; priority review starts as soon as a slot is available. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #1029 +/- ##
===========================================
- Coverage 93.24% 93.23% -0.01%
===========================================
Files 356 358 +2
Lines 109298 109370 +72
===========================================
+ Hits 101912 101974 +62
- Misses 7386 7396 +10
🚀 New features to boost your workflow:
|
Brings in #1029, which moved the store range reads, range proofs and store creation estimates from GROVE_V4 to GROVE_V5. v5.rs now flips both sets of slots; v5_matches_v4_apart_from_its_gates resets all seven, so local_offsets_only_change_the_v5_query_slots keeps only its own slot values. CHANGELOG keeps both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… at protocol version 15 GroveDB 12adbd35 brings GROVE_V5 (dashpay/grovedb#1028), moves the store range reads, proofs and creation estimates from GROVE_V4 to it (dashpay/grovedb#1029), and lets a batch carry the same keyless append more than once under it (dashpay/grovedb#1032). DRIVE_VERSION_V10, which only protocol version 15 selects, now runs GROVE_V5 (note 26 of v15.rs). Protocol version 14 keeps GROVE_V4, which the bump leaves as GroveDB 6.1.1 shipped it. QualifiedGroveDbOp::verify_consistency_of_operations now takes the GroveDB version and returns a Result. Drive's two batch appliers and GroveDbOpBatch::verify_consistency_of_operations pass the drive version's; GROVE_V1 to GROVE_V4 count every operation for repeats, so the check refuses what it did through protocol version 14. A Drive test appends two identical entries in one batch. The duplicate entry error's doc no longer gives GroveDB's refusal as its reason: basic structure keeps refusing identical entries, as copies a recipient drops. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Basic explanation
What this does: Two recent changes, #1026 and #1027, switched on inside
GROVE_V4after GroveDB 6.1.1 shipped it. This moves both to the newGROVE_V5, so V4 behaves again as 6.1.1 shipped it. #1027 lets a private document store's entries be read and proved by position. #1026 makes cost estimates charge correctly for creating a store.Value: Dash Platform 5.0 runs
GROVE_V4(protocol version 14). Any node must get the same answer as every other node at a given version, so V4 cannot change after release. With this, a node built fromdevelopand one built from 6.1.1 agree on everything V4 does. The new features stay available from V5.Risks: Medium for Platform, low for GroveDB. Platform's protocol version 15 currently selects
GROVE_V4, and its private document reads use #1027's store proofs. Platform has to selectGROVE_V5for protocol version 15 when it bumps GroveDB past this, or those reads stop working (they fail closed: a clear error, never a wrong answer). Inside GroveDB nothing changes at V5, and V1..V3 are untouched.Issue being fixed or feature implemented
Follows #1028, which added
GROVE_V5identical toGROVE_V4.Dash Platform v5.0.0 pins GroveDB
2128ea18(6.1.1), and protocol version 14 selectsGROVE_V4. Since then:private_document_store.get_rangeandrange_proof, set to 1 inGROVE_V4: a store's position-range read, and V1 proofs that descend into a store.merk_insert_elementestimators in place, whichGROVE_V4selects, to price a store's creation as the apply does.Both changed what
GROVE_V4does after it shipped.What was done?
Store range reads and proofs (#1027):
get_rangeandrange_proofare 0 inGROVE_V4and 1 inGROVE_V5. At slot 0, the code #1027 added already refuses everything 6.1.1 refused, with the same error variants:The verifier side matches: at V4 a store's lower layer is refused with
NotSupported, as 6.1.1 refused it. #1027's hardening that refuses a mistyped lower layer under a store or a commitment tree at every version is kept.Store creation estimates (#1026): the v1 estimators are restored byte for byte to 6.1.1 (
git diff 2128ea18on both files is empty). The store pricing is a new v2, selected byaverage_case_merk_insert_element: 1andworst_case_merk_insert_element: 1inGROVE_V5(both 0 everywhere else, and the dispatchers refused anything but 0 until now).Docs: the two in-place entries in
v4.rsmove tov5.rs, which now lists its four flipped slots. The CHANGELOG's two entries now say V5.How Has This Been Tested?
New tests:
test_private_document_store_subquery_proofs_refused_at_grove_v4: atGROVE_V4, proving or verifying into a store,prove_bulk_position_rangeon a store and the range read all fail as above. This was feat(private-document-store)!: read and prove a store's entries by position range (GROVE_V4) #1027's "without the slot" test on a hand-made version; it now usesGROVE_V4itself.test_private_document_store_creation_estimate_is_gated_to_grove_v5: a store's creation at V5 is estimated one seek and two hashes above V4 (average) and at least that in the worst case; a plain tree is estimated the same at both.grovedb-version:private_document_store_range_slots_are_gated_to_v5,store_creation_estimates_are_gated_to_v5, andv5_matches_v4_apart_from_its_gates, which now lists the four V5 slots.Runs:
cargo test -p grovedb-version: 59 passed.cargo test -p grovedb --all-features --libfiltered toprivate_document_store,append_family_cost_bound,estimated_costs,proof, and the modules that loop over every version: 1249 passed.cargo clippy -p grovedb -p grovedb-version --all-features --all-targets -- -D warnings: clean.cargo build --no-default-features --features verify -p grovedb: builds.The full workspace suite is left to CI.
Breaking Changes
Consensus-relevant for anyone on
developsince #1026/#1027:GROVE_V4no longer reads or proves a store's range and keeps the 6.1.1 store creation estimates. UseGROVE_V5for both. No public type changes.Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
909f4e6/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.