Skip to content

build: bump grovedb for the faster Orchard prover - #5281

Draft
PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
build/grovedb-faster-orchard-prover
Draft

PastaPastaPasta wants to merge 1 commit into
v5.1-devfrom
build/grovedb-faster-orchard-prover

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Draft until the grovedb, orchard and halo2 PRs merge. Every pin here points at an unmerged integration branch. Once dashpay/halo2#1–#3, dashpay/orchard#12/#13 and dashpay/grovedb#1007 merge, the pins will be updated to merge commits and this PR moves out of draft.

Issue being fixed or feature implemented

Building the Orchard proof is the largest single cost of a shielded send, and a wallet also builds the Orchard ProvingKey before its first send in each process. Validators verify every shielded transition with the halo2 verifier. A series of upstream PRs makes all three faster:

PR Change Headline (Mac Studio M4 Max)
dashpay/halo2#1 Compiled polynomial evaluator Orchard proof time −21–41%
dashpay/halo2#2 Booth MSM, GLV IPA generator collapse, prefix instance commitments Verify −27–51%
dashpay/halo2#3 Prove the circuits of a multi-circuit proof concurrently Adds to the above for multi-action bundles
dashpay/orchard#13 halo2 deps → dashpay/halo2 rev 581e2459 (#1–#3 merged), pasta_curves 0.5.2 Proving −50–61% (2 actions: 1349 → 646 ms at 2 threads, 617 → 307 ms at 6)
dashpay/orchard#12 Embedded k=11 params and fixed-base Lagrange tables Cold ProvingKey build 1040–1503 → 152–295 ms (5–7x)
dashpay/grovedb#1007 grovedb-commitment-tree → orchard integration/prover-perf (1136e362, = dashified + #12 + #13) —

Proofs are byte-identical to crates.io halo2_proofs 0.3.2 for 1/2/6 actions, so keys, proofs and verification results don't change.

This PR wires that chain into Platform so CI tests the whole stack. Platform CI's drive-abci shielded tests build real Orchard proofs and verify them through BatchValidator, so they exercise the new halo2 prover and verifier.

What was done?

  • Root Cargo.toml: every grovedb crate (grovedb, -costs, -merk, -path, -query, -storage, -version, -epoch-based-storage-flags, -commitment-tree) moves from dce8252f to 68eb9a63c27ce99e2587d9c1ed4ef6f6846afaf7, the head of build/orchard-faster-prover (build(deps)!: use dashpay/orchard with the faster prover grovedb#1007).

  • Cargo.lock: the minimal update. Apart from the grovedb rev strings, only these change:

    • orchard: dashified-0.14.1 tag (38ac9c19) → rev 1136e362;
    • halo2_proofs 0.3.2, halo2_gadgets 0.5.0, halo2_poseidon 0.1.0: crates.io → git+https://github.com/dashpay/halo2?rev=581e2459 (same versions);
    • pasta_curves: 0.5.1 → 0.5.2.

    It was produced with cargo update -p pasta_curves --precise 0.5.2 followed by an implicit re-resolve. A plain cargo update -p grovedb also re-resolved unrelated itertools / heck / socket2 / windows-sys edges, so it wasn't used. cargo metadata --locked passes.

  • drive-abci shielded_common: drops the ProofSizeEnforcement::Strict argument to Bundle::try_from_parts. This change doesn't come from the perf work. orchard's dashified branch already includes harden: always enforce canonical proof size in Bundle::try_from_parts orchard#11, which removed the enum and always enforces the canonical proof size, so any orchard revision after dashified-0.14.1 needs this edit. Behaviour is unchanged: Platform already used Strict. The pinning test is renamed test_noncanonical_proof_size_rejected and still checks the rejection.

The grovedb bump also pulls in the commits on grovedb develop since dce8252 (git log --oneline dce8252..68eb9a63):

68eb9a63 build(deps)!: use dashpay/orchard with the faster prover
96b50c1c fix: refuse an overlong path segment instead of panicking (#1006)
b05b51b3 docs(audit): record #779 as a batch-caller gap Platform never reaches (#1005)
72174dd1 chore(ci): run PR Hygiene's engine from master (#1004)
d7e6f944 feat(indexed-tree)!: accept a bare SumItem under a ProvableCountProvableSumIndexedTree (GROVE_V4) (#1003)
a720f7c1 Merge pull request #1000 from dashpay/pr-hygiene/repin-3b98772-develop
a6ea2014 ci: re-pin PR Hygiene engine to 3b98772
0b3f9fc7 fix(storage-flags): accept only canonical multi-epoch flag bytes (#977)
a219a7ef docs(storage-flags): document the real StorageFlags API (#999)
50d53bcf ci: re-pin PR Hygiene (#998)
cc61ef2b ci: re-pin PR Hygiene and wake it on a hand-over (#997)
52150fc6 ci: re-pin PR Hygiene (#996)

Platform needed no source changes for these. #1003 only changes behaviour from GROVE_V4, and Platform compiles against its new version slot unchanged. #977 and #1006 tighten input validation; the full CI run on this PR is the check that nothing Platform writes trips them.

How Has This Been Tested?

Local, macOS arm64, Rust 1.98.1:

  • cargo check -p drive-abci --tests: compiles.

  • cargo check -p platform-wallet --features shielded --tests: compiles.

  • cargo test -p drive-abci --lib filtered to every shielded state-transition module:

    • shield*, shielded_common, shielded_transfer, unshield, shielded_withdrawal: 165 passed, 1 ignored;
    • *_shielded_pool, token_shielded_transfer_with_shielded_fee, token_unshield_with_shielded_fee: 67 passed.

    These build real Orchard proofs with the new prover and verify them with the new verifier.

  • Upstream: grovedb-commitment-tree (--all-features) 141 passed; orchard integration/prover-perf cargo test --release 84 + 2 + 2 + 1 passed.

The full workspace suite, wasm and FFI builds are left to CI.

Breaking Changes

None for Platform users. Proofs, keys, verification results and consensus behaviour are unchanged. Only the internal try_from_parts call site changed.

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 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
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Pin every grovedb crate to dashpay/grovedb build/orchard-faster-prover
(68eb9a63): current develop plus a commit that moves
grovedb-commitment-tree onto dashpay/orchard integration/prover-perf
(1136e362). That orchard commit merges dashpay/orchard#12 (embedded
k=11 params and Lagrange tables) and #13 (halo2 from dashpay/halo2,
integrating dashpay/halo2#1-#3). Proofs are byte-identical; proving,
verification and the cold key build get faster.

The lockfile moves orchard, halo2_proofs/gadgets/poseidon (crates.io ->
dashpay/halo2 rev 581e2459) and pasta_curves 0.5.1 -> 0.5.2, plus the
grovedb revs. Nothing else changes.

Orchard now always enforces the canonical proof size in
Bundle::try_from_parts (dashpay/orchard#11, already on dashified), so
the ProofSizeEnforcement argument is gone. drive-abci drops it; the
behaviour is the Strict path it already used.

Draft: re-pin once the grovedb, orchard and halo2 PRs merge.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the v5.0.0 milestone Oct 5, 2026
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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.

@PastaPastaPasta PastaPastaPasta changed the title build(deps): bump grovedb for the faster Orchard prover build: bump grovedb for the faster Orchard prover Oct 5, 2026
@thepastaclaw

Copy link
Copy Markdown
Collaborator

🕓 Review not started yet because this PR is a draft.

  • 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 92c99d6. Normal review starts when eligible; priority review starts as soon as a slot is available.

@PastaPastaPasta

Copy link
Copy Markdown
Member Author

The Tests workflow skips draft PRs, so I ran it on this branch by hand (workflow_dispatch, which runs every job): https://github.com/dashpay/platform/actions/runs/37266610842. It ran on head 92c99d60b3 and all 64 jobs passed.

  • Rust workspace tests: 18,362 nextest tests passed. The shielded phase, which runs drive-abci and the SDK with real Orchard proving and verification, passed in full (362 + 179 + 369 tests, plus the rest). The log shows the new pins compiled: halo2_proofs dashpay/halo2@581e2459, orchard@1136e362, grovedb-commitment-tree@68eb9a63, pasta_curves 0.5.2.
  • Swift SDK build + tests (warnings as errors): passed.
  • Kotlin SDK build + tests (x86_64 emulator): passed.
  • JS packages, Packages functional tests, Test Suite (node + browsers), Dashmate E2E (local network, testnet evonode, testnet fullnode): passed.

🤖 Posted autonomously by Claude on behalf of pasta.

@PastaPastaPasta
PastaPastaPasta changed the base branch from v5.0-dev to v5.1-dev October 6, 2026 17:55
@github-actions github-actions Bot modified the milestones: v5.0.0, v5.1.0 Oct 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants