Skip to content
This repository was archived by the owner on Apr 27, 2023. It is now read-only.

Conversation

@avradip
Copy link

@avradip avradip commented Jan 5, 2022

No description provided.

@brentzundel
Copy link
Contributor

Looks like you need to sign off on your commit: https://github.com/hyperledger/ursa-rfcs/pull/28/checks?check_run_id=4711411658

Signed-off-by: Avradip Mandal <[email protected]>
@avradip
Copy link
Author

avradip commented Jan 5, 2022 via email


We have chosen r1cs-select as frontend, which might not be preferred frontend for all users.

# Rationale and alternatives
Copy link
Contributor

Choose a reason for hiding this comment

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

I would like to see some content in this section

Copy link
Author

Choose a reason for hiding this comment

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

Addressed in the new commit


zk-interface is the defacto prior art. It has extensive features. However, it is not being actively maintained and set up is relatively complex.

# Unresolved questions
Copy link
Contributor

Choose a reason for hiding this comment

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

This section as well should be filled out

Copy link
Author

Choose a reason for hiding this comment

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

Addressed in the new commit

[reference-level-explanation]: #reference-level-explanation

main.rs: this file contains sample code on how to use the framework, get_circuit function defines the circuit for which zero knowledge proofs will be generated
r1csbellman.rs, r1csbulletproof.rs: modules that convert r1cs spec to underlying backends
Copy link
Contributor

Choose a reason for hiding this comment

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

can you include a normative r1cs definition and/or spec?

Copy link
Author

Choose a reason for hiding this comment

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

Addressed in the new commit

# Drawbacks
[drawbacks]: #drawbacks

We have chosen r1cs-select as frontend, which might not be preferred frontend for all users.
Copy link
Contributor

Choose a reason for hiding this comment

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

please provide an r1cs-select reference

Copy link
Author

Choose a reason for hiding this comment

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

Addressed in the new commit

# Prior art
[prior-art]: #prior-art

zk-interface is the defacto prior art. It has extensive features. However, it is not being actively maintained and set up is relatively complex.
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yes, included the reference in the new commit

@dcmiddle
Copy link
Contributor

dcmiddle commented Jan 5, 2022

General items:

  • Please provide references / links for external algorithms, components etc.
  • This reads like you may have an implementation already, if so please link.
  • Also please line wrap at 100 characters. This makes subsequent diffs easier.

Signed-off-by: Aveadip Mandal <[email protected]>
@dcmiddle
Copy link
Contributor

dcmiddle commented Jan 7, 2022

Thanks for the additional clarifications.
I think the gist is that this RFC is the explanation for hyperledger-archives/ursa#192.
Ursa has been a crypto library with the primary intent of aiding hyperledger projects and a secondary priority of being an asset to the broader open source community.
How does adding a command line utility fit into the existing structure?
Is there a way to provide this functionality as a library API?
In either case how will this be of use to the hyperledger or general communities? For example, imagine you a writing a smart contract for Besu. How would you make use of the proposed features?
Can you provide normative references for the major pieces, especially R1CS?
Thanks!

@brentzundel
Copy link
Contributor

I'm glad to see the additions that have been made.
I would also like to see the answers to Dan's questions (e.g., I don't see a normative reference for R1CS yet)

@hartm
Copy link

hartm commented Feb 2, 2022

Things that need to be done:

  1. Provide R1CS definition.
  2. More references for the main bits. Brent has agreed to help suggest things for which we need references.

Copy link
Contributor

@brentzundel brentzundel left a comment

Choose a reason for hiding this comment

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

@hartm I have more thoroughly reviewed


# Summary
[summary]: #summary
Generic zero knowledge libraries such as bellman, bulletproof, etc come with two components
Copy link
Contributor

Choose a reason for hiding this comment

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

would like to see references to bellman and bulletproof libraries

frontends and backends. Application programmers write their business logic using the frontend. The
backend handles the underlying cryptography. Traditional zero knowledge libraries do not allow mix
and match between different backends and frontends. In this zero knowledge framework one can use
rust r1cs library as front end and either bellman or bulletproof as backend. In future versions we
Copy link
Contributor

Choose a reason for hiding this comment

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

'a' rust R1CS library or 'the' R1CS library? In other words, does this sentence talk about how this zero knowledge framework is a rust library for R1CS, or how this zero knowledge framework uses an R1CS library?
If it is the former, that should be clarified, if it is the latter, there should be a reference to the R1CS library.

on deployment options which might not be obvious to the application developer. Moreover, application
developers can have different preferences for different frontends. To make life easy for application
developers, ideally we should have seemless compatibility between different frontend and backends. In
the first version of this framework we support rust r1cs as front end, bellman and bullet proof as
Copy link
Contributor

Choose a reason for hiding this comment

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

another place for links

# Guide-level explanation
[guide-level-explanation]: #guide-level-explanation

This project demonstrates R1CS logic with backends to Bellman and Bulletproofs.
Copy link
Contributor

Choose a reason for hiding this comment

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

another place for links


main.rs: this file contains sample code on how to use the framework, get_circuit function defines
the circuit for which zero knowledge proofs will be generated
r1csbellman.rs, r1csbulletproof.rs: modules that convert r1cs spec to underlying backends
Copy link
Contributor

Choose a reason for hiding this comment

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

Above it talked about an R1CS library. This talks about an R1CS spec. In my mind those are two very different things. I don't see references here to either.

# Drawbacks
[drawbacks]: #drawbacks

We have chosen r1cs rust library (https://github.com/mir-protocol/r1cs) as frontend, which might
Copy link
Contributor

Choose a reason for hiding this comment

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

here we have a link to the R1CS library!
I suppose this probably answers a question I had earlier about 'a' library vs 'the' library.

I recommend creating a # References section and putting all of the references in there, then linking to that section everywhere you need to in the text.

Comment on lines +80 to +87
- Why is this design the best in the space of possible designs?
- What other designs have been considered and what is the rationale for not
choosing them?
- What is the impact of not doing this?
- For incorporating new protocol implementations what other implementations
exist and why were they not selected?
- For new protocols, what related protocols exist and why do the not satisfy
requirements?
Copy link
Contributor

Choose a reason for hiding this comment

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

these are questions that should be answered in the alternatives section. The snippet below is okay, but doesn't go into the detail that answering these questions would.

While I would prefer to have actual answers to these questions, if the text below is intended to be sufficient, then the questions themselves should be removed.

Comment on lines +103 to +109
- What parts of the design do you expect to resolve through the RFC process
before this gets merged?
- What parts of the design do you expect to resolve through the implementation
of this feature before stabilization?
- What related issues do you consider out of scope for this RFC that could be
addressed in the future independently of the solution that comes out of this
RFC?
Copy link
Contributor

Choose a reason for hiding this comment

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

same comments here as in the alternatives section. The text is okay, but doesn't directly answer the questions.
It is also a good place to talk about all the things this RFC doesn't do (and why).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants