Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Interop] Add circom circuits #725

Closed
wants to merge 1 commit into from
Closed

Conversation

biscuitdey
Copy link
Collaborator

Description

Add the circom circuits for the interop demo. The circuit includes the non-inclusion merkle proof verifier and ecdsa signature verifier.

Related Issue

#724

Motivation and Context

Interop demo circuits

How Has This Been Tested

Tests will be added in future PRs

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Request to be added as a Code Owner/Maintainer

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I commit to abide by the Responsibilities of Code Owners/Maintainers.

template Circuit(nodes){

//Non-inclusion Merkle Proof inputs
signal input merkelizedInvoiceRoot;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should that not be merkelizedBankStateObject?

signal input merkelizedInvoiceRoot;
signal input stateTreeRoot;
signal input stateTree[nodes];
signal input stateTreeLeafPosition[nodes];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. Reference to BankStateObject


template Circuit(nodes){

//Non-inclusion Merkle Proof inputs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we need proof of inclusion, not non-inclusion.

signal input stateTree[nodes];
signal input stateTreeLeafPosition[nodes];

//Signature inputs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the verification of signatures of ACME and ACME Customer

Copy link
Collaborator

@Therecanbeonlyone1969 Therecanbeonlyone1969 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@biscuitdey Looks good ... left a couple of comments. The primary comment is that we need to verify the signature of the ACME customer over the bank data object and the signature of ACME over the bank data object signed by the ACME customer.

@ognjenkurtic
Copy link
Collaborator

Core-devsw 30.10.2023.
@biscuitdey will look into the open questions and address them so that we can merge this one.

@Ybittan
Copy link
Member

Ybittan commented Nov 13, 2023

Core dev 11/13 - Pending @biscuitdey to review comments

@biscuitdey
Copy link
Collaborator Author

This PR uses Ecdsa circuits. As we are moving to Eddsa signatures in the circom circuits, I am closing this PR.
Will raise a new PR with Eddsa signatures (as and when they are finalised).

@biscuitdey biscuitdey closed this Nov 23, 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.

4 participants