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

Client proof types #289

Merged
merged 6 commits into from
Oct 8, 2020
Merged

Client proof types #289

merged 6 commits into from
Oct 8, 2020

Conversation

dtebbs
Copy link
Contributor

@dtebbs dtebbs commented Sep 28, 2020

Stricter types for generic Proof and VerificationKey types and snark API refactor.
(Allows more versatility in data structures that use proofs, verification keys and extended proofs)

@dtebbs dtebbs force-pushed the compact-groth16-arguments branch 2 times, most recently from abd9b93 to e00294f Compare September 28, 2020 12:27
@dtebbs dtebbs changed the title WIP: Client proof types (depends on #288) Client proof types (depends on #288) Oct 6, 2020
@AntoineRondelet AntoineRondelet changed the base branch from compact-groth16-arguments to develop October 7, 2020 14:15
@dtebbs dtebbs changed the title Client proof types (depends on #288) Client proof types Oct 7, 2020
proof_json["inputs"][3] = hex(attack_primary_input3)
proof_json["inputs"][4] = hex(attack_primary_input4)
print("proof => ", proof)
print("proof[inputs][3] => ", proof.inputs[3])
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not: print("proof.inputs[3] = ", proof.inputs[3])? (same for the line below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The original code predates me, so not sure why it was => instead of =. Changed to =.

Copy link
Contributor

@AntoineRondelet AntoineRondelet Oct 8, 2020

Choose a reason for hiding this comment

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

Oh yes, there were two things in my comment above:

  • => -> = (Fixed now)
  • proof[inputs][3] -> proof.inputs[3]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

"alpha": [
"0x009d7309d79d5215384a7a9a1d9372af909582781f388a51cb833c87b8024519cf5b343cb35d49a5aa52940f14b7b8e7", # noqa
"0x012816ef6069ef1e40eaab0a111f9b98b276dbf2a3209d788eb8ce635ce92a29c2bcdaa3bb9b375a8d3ee4325c07f4ea" # noqa
"0x012816ef6069ef1e40eaab0a111f9b98b276dbf2a3209d788eb8ce635ce92a29c2bcdaa3bb9b375a8d3ee4325c07f4ea", # noqa
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you need to add this comma here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not needed as such. Many of our lists and dictionaries have a trailing comma, so I added it to match those.

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
Contributor Author

Choose a reason for hiding this comment

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

updated. (yes, there are examples of each - some data was copy-pasted from json)

@AntoineRondelet
Copy link
Contributor

LGTM

@AntoineRondelet AntoineRondelet merged commit c14a676 into develop Oct 8, 2020
@AntoineRondelet AntoineRondelet deleted the client-proof-types branch October 9, 2020 10:28
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