Skip to content

Demo: reduce Orchard primitive duplication#31

Closed
p0mvn wants to merge 4 commits into
mainfrom
roman/orchard-api-code-reduction-demo
Closed

Demo: reduce Orchard primitive duplication#31
p0mvn wants to merge 4 commits into
mainfrom
roman/orchard-api-code-reduction-demo

Conversation

@p0mvn

@p0mvn p0mvn commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Important note

This is intentionally a demo PR. As-is, it requires the proposed Orchard APIs from valargroup/orchard#21 (or an equivalent upstream Orchard release) before it can be accepted as production code.

Test plan

  • cargo check
  • cargo test matches_orchard
  • cargo test test_build_padding_slot_fresh_randomness_populates_strict_witnesses

These were run locally with the local Orchard path override containing the proposed APIs.

p0mvn added 3 commits May 17, 2026 16:50
Replace `fvk.address_at(...)` with synthetic `(g_d_pad, pk_d_pad)` where
g_d_pad is domain-separated from Orchard's DiversifyHash and pk_d_pad =
[ivk_external] * g_d_pad. Padding no longer overlaps with the universe of
Zcash mainnet diversified addresses while still satisfying condition 11
(pk_d = [selected_ivk] * g_d) against the in-circuit ivk.

Mirror Orchard's `NoteCommit`, `Nullifier::derive`, and `CommitIvk`
off-circuit (upstream is pub(crate)) and add drift tests against real
Orchard fixtures to catch silent desync, plus lock-in tests for the
1-real-note and 5-real-notes extremes.
Replace local mirrored Orchard primitive logic with direct calls to proposed Orchard APIs to show the intended cleanup once those APIs are exposed.
@p0mvn p0mvn force-pushed the roman/delegation-padding-synthetic-points branch 4 times, most recently from 29eaa84 to 3b2d66a Compare May 18, 2026 19:18
@p0mvn p0mvn changed the base branch from roman/delegation-padding-synthetic-points to main May 19, 2026 14:49
Resolve the delegation padding conflicts while keeping the demo's direct Orchard primitive calls and main's typed builder error handling.
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.

1 participant