Skip to content

Circuit: Update value_commit_orchard to take into account asset#50

Merged
ConstanceBeguier merged 8 commits intozsa1from
circuit_cv_net_with_asset_v2
Apr 21, 2023
Merged

Circuit: Update value_commit_orchard to take into account asset#50
ConstanceBeguier merged 8 commits intozsa1from
circuit_cv_net_with_asset_v2

Conversation

@ConstanceBeguier
Copy link
Collaborator

In the circuit, we update value_commit_orchard to take into account asset.
Previously, value_commit_orchard returns cv_net = [v_net] ValueCommitV + [rcv] ValueCommitR..
Now, value_commit_orchard returns cv_net = [v_net] asset + [rcv] ValueCommitR.
ValueCommitV and ValueCommitR are constants
v_net is equal to sign * magnitude where sign is in {-1, 1} and magnitude is an unsigned integer on 64 bits.

To evaluate [v_net] asset where v_net = sign * magnitude, we perform the following steps

  1. verify that magnitude is on 64 bits
  2. evaluate commitment=[magnitude]asset with the variable-base long-scalar multiplication
  3. evaluate result=[sign]commitment with the new mul_sign gate

@what-the-diff
Copy link

what-the-diff bot commented Mar 21, 2023

PR Summary

  • Remove ScalarFixedShort from the circuit - This component was removed from the code
  • Add asset to value_commit_orchard gadget - Enhance the gadget with a new asset feature
  • Update proof size and tests - Modify test cases and proof size accordingly
  • Introduce new file value_commit_orchard.rs - Create a file for ValueCommit^Orchard implementation
  • Implement ValueCommit^Orchard circuit - Implement a circuit based on a specific section from the Zcash protocol
  • Add tests for correctness - Write test cases to verify accurate implementation

@ConstanceBeguier ConstanceBeguier force-pushed the circuit_cv_net_with_asset_v2 branch from 1c9b9fc to 68497b5 Compare April 19, 2023 13:13
@ConstanceBeguier ConstanceBeguier merged commit 563b4e5 into zsa1 Apr 21, 2023
@ConstanceBeguier ConstanceBeguier deleted the circuit_cv_net_with_asset_v2 branch April 21, 2023 12:35
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