Skip to content

build: bump grovedb so a limit-cut V1 proof hides its range bound - #5305

Merged
QuantumExplorer merged 1 commit into
v5.0-devfrom
build/grovedb-limit-cut-bound-proof
Oct 6, 2026
Merged

QuantumExplorer merged 1 commit into
v5.0-devfrom
build/grovedb-limit-cut-bound-proof

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

Some honest proofs that Platform returns for a query with a limit could be rejected by the client. This bumps GroveDB to the version that fixes how those proofs are built, so they verify. It is a small addendum to 5.0.0-beta.2 and should land before that release is tagged.

Issue being fixed or feature implemented

v5.0-dev pins GroveDB at c4362dc0f6 (dashpay/grovedb#1011). The next commit on GroveDB develop, 9791d27720 (dashpay/grovedb#1012), fixes a prover bug in V1 proofs.

When a query's limit stops partway through a range, the prover hides everything it has not walked. If one of the ancestors it passes back through is an exclusive range bound, it was still sent as a KVDigest instead of a hash. The verifier then reads that key as the start of the range that was cut, needs the node before it, finds a hidden hash, and rejects the proof.

Before ([2, 10) ascending, limit 3, key 10 above the cut):

proof: 2, 3, 4, <hidden 5..=9>, KVDigest(10)
client: invalid proof error Cannot verify lower bound of queried range

After:

proof: 2, 3, 4, <hidden 5..=9>, <hidden 10>
client: verifies, returns 2, 3, 4

It depends on tree shape and is common in subtrees written in one batch, which is how Drive writes. GroveDB measured 8-10% of limit cuts that end on an exclusive bound failing.

What was done?

How Has This Been Tested?

  • cargo check --locked -p drive -p drive-proof-verifier -p drive-abci
  • cargo test --locked -p drive --lib -- proof: 192 passed

Breaking Changes

None for state. The change only affects V1 proof generation; root hashes are unchanged, and V0 proofs (grove versions 1 and 2) keep their current shape.

Checklist:

  • I have performed a self-review of my own code
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

🤖 Generated with Claude Code

PR Hygiene · 6ed23aa

  • Bots — coderabbitai ✓ · thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals — you own every area touched; none needed

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

Summary by CodeRabbit

  • Chores
    • Updated the Grovedb dependency revision. No end-user-facing changes are noted.

Moves every grovedb crate from c4362dc0f6 to 9791d27720 (dashpay/grovedb#1012).
Prover-only change for V1 proofs; root hashes and V0 proofs are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@QuantumExplorer QuantumExplorer added this to the v5.0.0 milestone Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: dashpay/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bb6ebd70-6e81-48d8-a1e7-47f9090723e6
📥 Commits

Reviewing files that changed from the base of the PR and between c59af8f and 6ed23aa.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • Cargo.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Grovedb workspace dependency declarations now pin revision 9791d277207998b7789c85b0745e99d37040a12e. Their Git source and feature settings are unchanged.

Changes

Grovedb revision update

Layer / File(s) Summary
Update Grovedb revision pins
Cargo.toml
The Grovedb dependency declarations use the new revision. Their Git source and feature settings remain unchanged.

Priority: ⬆️ High

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: shumkov

Merge Risk: ⚪ Minimal · up to 6ed23

The workspace and lockfile use the requested Grovedb revision, and the checked-in WASM build paths use that workspace lockfile. No concrete issue remains that should block merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the GroveDB dependency bump and its reported V1 proof range-bound fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai ✓ · thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Oct 6, 2026
@thepastaclaw

thepastaclaw commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 6ed23aa) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

The exact-head diff consistently updates all GroveDB pins and lockfile sources, and the upstream code preserves V0 proof generation and existing exact-limit verification behavior; no blocking correctness, security, or versioning defect was confirmed. One documentation suggestion remains: the pinned commit also includes an opt-in verifier feature that the PR description omits. This was a static review: the supplied CI snapshot shows Kotlin checks passed, Rust workspace tests skipped, and PR Hygiene pending; the targeted Rust checks remain author-reported evidence.

🟡 1 suggestion(s)

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: platform-versioning); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — The diff is a small, contained dependency revision bump with matching lockfile updates, not a large or intricate implementation change to a critical surface.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 99% left, weekly 97% left; passed over gemini-3.8-flash-high (antigravity below 15% reserve: weekly 15% left, 5h 100% left)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — platform-versioning (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort medium); agent phase2-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 `Cargo.toml`:
- [SUGGESTION] Cargo.toml:59: Describe the verifier additions bundled with the pinned GroveDB revision
  The pinned commit 9791d27720 is the direct child of c4362dc0f6, but its delta includes the #1013/#1008 upper-bound verification feature alongside the #1012 prover repair. The upstream source adds ProofLimitMode::UpperBound, execute_proof_with_limit_mode, ProofVerificationResult::exhausted, and the up-to-limit carrier aggregate APIs returning CarrierAggregatePage. Consequently, the PR description's statement that "The change only affects V1 proof generation" understates the dependency update. Platform's existing callers remain safe: the original verification entry points explicitly select Exact mode and retain their return signatures, and Platform does not use the new opt-in APIs. Update the PR description to disclose the bundled verifier additions and distinguish their upstream API impact from Platform's unchanged verification behavior, especially because this pin is intended for the release addendum.

Comment thread Cargo.toml
grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "c4362dc0f62050dc725e9b47c809e2947df49dac" }
grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev = "c4362dc0f62050dc725e9b47c809e2947df49dac" }
grovedb-commitment-tree = { git = "https://github.com/dashpay/grovedb", rev = "c4362dc0f62050dc725e9b47c809e2947df49dac" }
grovedb = { git = "https://github.com/dashpay/grovedb", rev = "9791d277207998b7789c85b0745e99d37040a12e", default-features = false }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Suggestion: Describe the verifier additions bundled with the pinned GroveDB revision

The pinned commit 9791d27720 is the direct child of c4362dc0f6, but its delta includes the #1013/#1008 upper-bound verification feature alongside the #1012 prover repair. The upstream source adds ProofLimitMode::UpperBound, execute_proof_with_limit_mode, ProofVerificationResult::exhausted, and the up-to-limit carrier aggregate APIs returning CarrierAggregatePage. Consequently, the PR description's statement that "The change only affects V1 proof generation" understates the dependency update. Platform's existing callers remain safe: the original verification entry points explicitly select Exact mode and retain their return signatures, and Platform does not use the new opt-in APIs. Update the PR description to disclose the bundled verifier additions and distinguish their upstream API impact from Platform's unchanged verification behavior, especially because this pin is intended for the release addendum.

source: glm-5.3-flash (phase1-reviewer: general)

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Oct 6, 2026
@QuantumExplorer
QuantumExplorer merged commit cf8cff9 into v5.0-dev Oct 6, 2026
25 of 26 checks passed
@QuantumExplorer
QuantumExplorer deleted the build/grovedb-limit-cut-bound-proof branch October 6, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants