Skip to content

Circuit: Update value_commit_orchard to take into account asset (deprecated)#47

Closed
ConstanceBeguier wants to merge 1 commit intozsa1from
circuit_cv_net_with_asset_id
Closed

Circuit: Update value_commit_orchard to take into account asset (deprecated)#47
ConstanceBeguier wants to merge 1 commit intozsa1from
circuit_cv_net_with_asset_id

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

We also keep only asset_old in the circuit.
@what-the-diff
Copy link

what-the-diff bot commented Mar 14, 2023

  • Remove asset_old
  • Add asset to the circuit struct and assign it with spend note's asset in constructor function
  • Constrain cv_net = ValueCommit^Orchard(rcv, v_net) instead of cv_new = ValueCommit^Orchard(rcv, v_new). This is because we want to verify that the value commitment for a given output note (cv) equals its corresponding public input (cv') which is not necessarily equal to the new value commitment generated by this transaction but rather an old one from previous transactions.
  • Change proof size accordingly: 4992 -> 5024; 7264 -> 7296
  • Change the value commitment to be a point on curve instead of an affine
  • Add tests for new circuit

@ConstanceBeguier ConstanceBeguier changed the title Circuit: Update value_commit_orchard to take into account asset Circuit: Update value_commit_orchard to take into account asset (old) Mar 21, 2023
@ConstanceBeguier
Copy link
Collaborator Author

Deprecated in favor of #50

@ConstanceBeguier ConstanceBeguier changed the title Circuit: Update value_commit_orchard to take into account asset (old) Circuit: Update value_commit_orchard to take into account asset (deprecated) Apr 4, 2023
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