Demo: reduce Orchard primitive duplication#31
Closed
p0mvn wants to merge 4 commits into
Closed
Conversation
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.
29eaa84 to
3b2d66a
Compare
Resolve the delegation padding conflicts while keeping the demo's direct Orchard primitive calls and main's typed builder error handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 checkcargo test matches_orchardcargo test test_build_padding_slot_fresh_randomness_populates_strict_witnessesThese were run locally with the local Orchard path override containing the proposed APIs.