-
Notifications
You must be signed in to change notification settings - Fork 66
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
u288 struct + calldata refactors #187
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…garaga into calldata-refactor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #182
Notable changes :
src/src
definitions.cairo
u288
struct that holds 3u96
limbs + impl Serde for it.E12D
struct generic on<T>
(in practiceT
=u384
oru288
) + impl Serde forT
=u288
&384
.G2Line
struct also dependent on T. (Serde not needed as those are hardcoded)MillerLoopResultScalingFactor
also dependent on T.corelib::num::traits::One
&Zero
foru384
&u288
corelib::num::traits::One
forE12D<u384>
andE12D<u288>
corelib::num::traits::Zero
forG1Point
to represent the point at infinity. Removes theG1PointInfinity
struct.E12DDefinitions
trait (replaced by the num traits)E12D.conjugate
method of theE12DDefinitions
trait to a function ingroth16.cairo
ec_ops.cairo
Zero
trait instead ofG1PointInfinity
Splitted
utils.cairo
intoutils/hashing.cairo
andutils/neg_3.cairo
hashing.cairo
u384
oru288
.pairing_check.cairo
MPCheckHint
structs to depend onu288
(bn) oru384
(bls)mpcheck_2P_2F
functions to work with the updates indefinitions.cairo
&hashing.cairo
groth16.cairo
mpcheck_3P_2F
functions to work with the updates indefinitions.cairo
&hashing.cairo
core/circuit.cairo
next_u288
method for circuit_inputs.hydra
get_pairing_check_input
inmulti_pairing_check.py
generates input that looks like bls signature instead of previously ((P, Q), (-P, Q)) . This changes the tests for 2P_2F cases inpairing_test.cairo
, as the previous hint content was sparse and not realistic.src/contracts
make rewrite
)BN254 groth16 now takes 9% less steps to verify thx to this, uses less calldata, and contracts uses a bit less bytecode.