Skip to content

build!: bump grovedb to 6.1.0 - #5414

Merged
QuantumExplorer merged 1 commit into
v5.0-devfrom
build/grovedb-6.1.0
Oct 13, 2026
Merged

QuantumExplorer merged 1 commit into
v5.0-devfrom
build/grovedb-6.1.0

Conversation

@QuantumExplorer

@QuantumExplorer QuantumExplorer commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Basic explanation

This moves Platform from a GroveDB development commit to the GroveDB 6.1.0 release. The only change it brings over the commit Platform already uses is a fix to how GroveDB stores the index entries of summable documents.

Today, when a document of a type with documentsSummable is updated in a later epoch and its stored size changes, its index entries record a hash of bytes the document never stores. Proofs of reads that go through those index entries then fail to verify on the client. With 6.1.0 the index entries record the bytes that are actually stored, so those proofs verify.

Issue being fixed or feature implemented

v5.0-dev pins GroveDB at 5cb0962a (dashpay/grovedb#1020). GroveDB 6.1.0 (fc7028d8, release notes) adds two commits on top of it:

A document of a documentsSummable type is stored as an ItemWithSumItem. Its index entries are references to it (a ReferenceWithSumItem for a summable index), which document update v1 refreshes (or rewrites) in the same GroveDB batch that rewrites the document. When the batch both updates a target and writes a reference to it, GroveDB predicts the target's final bytes so the reference can commit to their hash. The old prediction assumed a sum item keeps its stored storage flags. Drive's flags merge changes them when an update in a later epoch changes the size (SingleEpochOwned becomes MultiEpochOwned), so the reference committed to bytes that are never stored. The fix applies from protocol version 14; protocol version 13 keeps the old behaviour for replay.

Before (summable document created in epoch 0, updated in epoch 2 with a longer string; its index value unchanged):

primary item stores:   ItemWithSumItem(.., MultiEpochOwned(0, {2: n}, owner))
index reference hash:  over ItemWithSumItem(.., SingleEpochOwned(0, owner))   <- never stored
proof through index:   does not verify; verify_grovedb reports the reference

After:

index reference hash:  over the bytes the primary item stores
proof through index:   verifies

The same release also stops a replacement whose flags callback answers "unchanged" from failing with storage_cost cost mismatch when the new value's flags have another length. Drive has hit that one: replacing the flagged TokenHistory version item with an unflagged one failed this way, which the protocol version 14 upgrade avoids and should_attribute_unflagged_replacement_cost_mismatch_to_token_history_version_item pins. It also makes the batch refuse a target whose write stores other bytes than the ones predicted for a reference to it.

Before / after for that replacement (version item Item(1, SingleEpochOwned(3, ..)) replaced by Item(2, None)):

protocol version 13 (GROVE_V3): storage_cost cost mismatch added: 0 replaced: 146 actual:110
protocol version 14, before:     the same error
protocol version 14, after:      applies; the item is Item(2, None)

What was done?

  • Moved every grovedb* crate in Cargo.toml from 5cb0962a to fc7028d8 (tag v6.1.0).
  • Cargo.lock: the 16 GroveDB packages move to 6.1.0 at the new commit. Nothing else re-resolves.
  • No Platform code changes. Platform calls none of the Merk functions whose signatures changed, and builds no GroveDB version struct by hand.
  • should_attribute_unflagged_replacement_cost_mismatch_to_token_history_version_item asserted the mismatch at the latest protocol version. It now asserts it at protocol version 13 and checks that protocol version 14 applies the replacement.

How Has This Been Tested?

  • cargo check -p drive -p drive-abci --all-targets
  • cargo test -p drive --lib filtered to drive_document_sum_query, composite_query_e2e, chained_query_e2e, shared_prefix_aggregation and expiration_tests: 117 passed.
  • cargo test -p drive-abci --lib filtered to the batch document replacement, property_constraints, transfer, gas_sponsorship and deletion tests and token_history_storage_flags: 164 passed after the test change (the attribution test was the one failure before it).
  • cargo test -p drive-abci --lib -- execution::platform_events::protocol_upgrade: 73 passed.
  • The GroveDB side is covered in fix(batch)!: commit same-batch sum-item references and replacements to the bytes stored (GROVE_V4) grovedb#1021, including a proof read through the corrected reference.

Breaking Changes

Consensus at protocol version 14 only, which is not on mainnet. A node on this build computes a different root hash than a node on the previous pin for a block that updates a summable document in a later epoch with a size change (the corrected index reference). It also accepts the flags-length replacement described above where the previous pin failed the batch. Protocol versions 13 and earlier run GROVE_V1 to GROVE_V3 and are unchanged. A devnet or testnet already running protocol version 14 on a 5.0 beta should upgrade all of its nodes together.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · 7fd6f3c

  • Bots — coderabbitai ✓ · thepastaclaw not yet — /skip-bots proceeds without the ones not yet reported
  • Self-review — post /self-reviewed
  • Build failed
  • 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 underlying storage components to a newer revision.
  • Tests
    • Expanded coverage of token-history storage replacements across supported storage versions, including checks for replacement-cost mismatches and successful updates.

Move every grovedb crate from 5cb0962a (dashpay/grovedb#1020) to the
6.1.0 release, fc7028d8, which adds dashpay/grovedb#1021 on GROVE_V4
(protocol version 14): a reference written or refreshed in the same
batch as an update of its target item commits to the bytes the target
stores, so the index entries of a summable document updated in a later
epoch with a size change no longer commit to bytes it never stores; and
a replacement whose flags callback leaves the flags unchanged is charged
for the bytes it stores instead of failing with a storage cost mismatch.

The TokenHistory version-item attribution test pinned that mismatch at
the latest protocol version; it now pins it at protocol version 13
(GROVE_V3) and checks that protocol version 14 applies the replacement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 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.

@coderabbitai

coderabbitai Bot commented Oct 13, 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: 23c8e036-0eb0-4254-b3ac-b9d41da8feca
📥 Commits

Reviewing files that changed from the base of the PR and between 3375427 and 7fd6f3c.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • Cargo.toml
  • packages/rs-drive-abci/src/execution/platform_events/protocol_upgrade/perform_events_on_first_block_of_protocol_change/token_history_storage_flags_tests.rs

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

The workspace pins nine Grovedb dependencies to a new Git revision. The TokenHistory storage-flags test checks replacement behavior under GROVE_V3 and the latest Drive version.

Changes: Grovedb update and validation

Layer / File(s) Summary
Revision update and storage-flags validation
Cargo.toml, packages/rs-drive-abci/src/execution/.../token_history_storage_flags_tests.rs
Nine Grovedb dependencies now use revision fc7028d83114d86f88222e7ff09fc47ae75360f0. The test checks that GROVE_V3 reports the expected replacement-cost mismatch and that the latest Drive version stores the unflagged version-2 item.

Priority: ⬆️ High

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: shumkov

Merge Risk: 🔵 Low · up to 7fd6f

This protocol-14 change can make mixed-version nodes disagree on the described edge case; affected networks should upgrade all nodes together. The deployment condition is bounded, and no lockfile build blocker was found.

Pre-merge checks · Passed 4 · Failed 1

Failed Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks (4 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely identifies the primary change: updating GroveDB dependencies to version 6.1.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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · 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 added the waiting-bots Waiting for the review bots to report on this head label Oct 13, 2026
@github-actions github-actions Bot added this to the v5.0.0 milestone Oct 13, 2026
@thepastaclaw

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because the new head is waiting for the 30-minute push debounce.

  • Request normal review — click when the PR is ready for review.
  • Request priority review — click to move this review to the front of the queue.

Commit 7fd6f3c. Normal review starts when eligible; priority review starts as soon as a slot is available.

@QuantumExplorer
QuantumExplorer merged commit 9ddd432 into v5.0-dev Oct 13, 2026
24 of 26 checks passed
@QuantumExplorer
QuantumExplorer deleted the build/grovedb-6.1.0 branch October 13, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-bots Waiting for the review bots to report on this head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants