-
Notifications
You must be signed in to change notification settings - Fork 27
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
Client proof types #289
Conversation
8b02295
to
11b6d8c
Compare
abd9b93
to
e00294f
Compare
11b6d8c
to
e75dac6
Compare
e00294f
to
ecabe3e
Compare
e75dac6
to
e243051
Compare
ecabe3e
to
b9d5569
Compare
ac86874
to
f6652cf
Compare
b9d5569
to
6c9b078
Compare
f6652cf
to
8de40b7
Compare
client/test_commands/scenario.py
Outdated
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]) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 =
.
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
client/tests/test_zksnark.py
Outdated
"alpha": [ | ||
"0x009d7309d79d5215384a7a9a1d9372af909582781f388a51cb833c87b8024519cf5b343cb35d49a5aa52940f14b7b8e7", # noqa | ||
"0x012816ef6069ef1e40eaab0a111f9b98b276dbf2a3209d788eb8ce635ce92a29c2bcdaa3bb9b375a8d3ee4325c07f4ea" # noqa | ||
"0x012816ef6069ef1e40eaab0a111f9b98b276dbf2a3209d788eb8ce635ce92a29c2bcdaa3bb9b375a8d3ee4325c07f4ea", # noqa |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this comma here contrasts with the rest of the block actually: https://github.com/clearmatics/zeth/blob/client-proof-types/client/tests/test_zksnark.py#L13-L39
which itself contrasts with: https://github.com/clearmatics/zeth/blob/client-proof-types/client/tests/test_zksnark.py#L172-L198 (where you add final commas everywhere)
There was a problem hiding this comment.
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)
8de40b7
to
6f00374
Compare
LGTM |
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)