Skip to content

Conversation

@mmagician
Copy link
Member

Description

Adding more descriptive tests helps to understand how R1CS works inside arkworks.
In particular, in this PR I've "translated" the R1CS part of Vitalik's write up to use this library and construct the same matrices.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

Comment on lines 1100 to 1102
let three = field_new!(Fr, "3");
let five = field_new!(Fr, "5");
let nine = field_new!(Fr, "9");
Copy link
Member

Choose a reason for hiding this comment

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

You can just do Fr::from(nu8)

Copy link
Member

@Pratyush Pratyush left a comment

Choose a reason for hiding this comment

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

LGTM modulo the stylistic nit

@Pratyush Pratyush merged commit 831c102 into arkworks-rs:master Jan 15, 2022
@mmagician mmagician deleted the more-r1c-examples branch January 15, 2022 20:38
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