-
Notifications
You must be signed in to change notification settings - Fork 624
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
Precompiles for BLS12-381 curve operations #9317
Changes from 202 commits
92882df
8f9ed8c
3fa5d02
976a372
75c340e
2eb13f6
797570d
f992c2f
e63c42f
8a5938e
a1f80fd
0943936
7651a52
f04dbfc
a4296c9
c2392f0
2231d63
c9a374f
01d6bfb
763c06a
ed6bfd0
3a06abf
96a3cfc
908a4f9
d086465
0907b97
70003bf
c034b5c
b890d37
54bc167
141e58c
a61ff74
1242d20
f838692
f89d0ad
74a2ef0
5294a0e
60e2e5c
82842bd
2029f6f
07c5d5c
bba0948
3cbb98e
defe771
d139f36
d99fc4a
68f0781
3dd9c96
f4aa1b8
d5db241
ad26851
08ddcf0
d2d5bb6
8c62afb
520a362
3474df6
daf1f39
2340788
47db7e1
042be6b
b97c888
5cdd5ce
4777e35
797feea
7a3785b
eebb787
39a7a4b
a995d99
211c17c
204007f
45ee2dc
d46ccf2
7c184a5
338e642
4f19ff7
1b4a3ee
be78779
3b58117
1b6ae2a
6d791fd
027cdc7
a6533cd
67f524a
a10ffc2
e488355
d02eb10
ce824b7
4fa5aa8
c7615a7
aed8158
393ff00
17b82a3
54ba27d
2d34977
a6625b3
8453460
d47ec6b
a39992d
cab7e0d
28f2f57
4e9b47c
6589758
1e939cd
706ac5c
8d9c044
952bd1c
40dfc1f
b20e6c2
9391ca7
9d4978c
b43fddf
c6fd27a
f35e725
766ef7f
01931a5
61074e2
1b0f356
227a18d
d65f08d
c136a4d
7ceebe0
811b34c
777e881
6d2f051
931b17e
b5823de
1208eab
fcba240
7371e2a
e689a6c
3a56f50
ead7369
423eaa8
171edb3
ca8e6a2
a106819
9a41790
1c80b10
36e0d92
b2e790f
eceeaeb
857d539
31270f6
1cbed97
cae39c2
7e4acfa
0e3469c
19c339f
2a472a5
05e6819
256fbb1
02386ad
c404a8f
49cc764
42b8592
9da26dc
dfbdeee
5bfce7f
f450c24
a20974d
6e5b8ba
eb9070e
d4edcd9
ddea941
65d753a
de35578
9234b0d
5b83406
573cd47
7f03809
2a04b56
9e26104
fe15cfa
9dff2e6
44687f5
817606c
595bf3d
4a4b411
ce5ba12
0ce5eb4
de13cc6
c3fef09
9387ad1
ac6d4c7
c863395
3bd33cd
98c7548
195e1a2
35eac95
c28afc3
3fe5ff7
6dce7b2
f3a13e2
8a9e252
86ec890
7c597c6
a08c162
1eeb31b
3bfbd40
57f3e46
98e9498
73e0d9b
3c848a4
ac8922b
56d69db
ccf5e23
6bae9c6
c818d3b
96b423f
2c81407
3dafa4b
79b4f3f
10de6c7
0ecc88d
220ed45
c8d2a6c
6c3a9c0
12749a2
30bb60a
58255e2
a051460
06e5ee0
2f9044e
3f17567
1fbee5a
c2e3c57
65a25df
b9b4b35
eb22f26
8b06fad
d4560db
825cc06
0649375
bf1d13b
0e30245
0931c1a
be12512
5b992b3
f1f977c
9e89052
8955690
81d16d1
8fb9b68
c5c3908
0c50335
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,8 +38,10 @@ nightly = [ | |
] | ||
nightly_protocol = [ | ||
"near-primitives-core/nightly_protocol", | ||
"protocol_feature_bls12381" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As per There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed: ccf5e23 |
||
] | ||
statelessnet_protocol = [ | ||
"near-primitives-core/statelessnet_protocol", | ||
] | ||
calimero_zero_storage = [] | ||
protocol_feature_bls12381 = [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
wasm_bls12381_p1_sum_base: { old: 300_000_000_000_000, new: 15_000_000_000 } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you give a copy of the raw estimator results as well as how you ran it, to better explain why these numbers are set here to these values? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've updated the PR description as well as the document where I explain how I run it. You can find the results in both the PR description and the document. I rounded up the calculated values. |
||
wasm_bls12381_p1_sum_element: { old: 300_000_000_000_000, new: 5_500_000_000 } | ||
wasm_bls12381_p2_sum_base: { old: 300_000_000_000_000, new: 20_000_000_000 } | ||
wasm_bls12381_p2_sum_element: { old: 300_000_000_000_000, new: 15_000_000_000 } | ||
wasm_bls12381_g1_multiexp_base: { old: 300_000_000_000_000, new: 15_000_000_000 } | ||
wasm_bls12381_g1_multiexp_element: { old: 300_000_000_000_000, new: 900_000_000_000 } | ||
wasm_bls12381_g2_multiexp_base: { old: 300_000_000_000_000, new: 20_000_000_000 } | ||
wasm_bls12381_g2_multiexp_element: { old: 300_000_000_000_000, new: 1_350_000_000_000 } | ||
wasm_bls12381_map_fp_to_g1_base: { old: 300_000_000_000_000, new: 1_500_000_000 } | ||
wasm_bls12381_map_fp_to_g1_element: { old: 300_000_000_000_000, new: 250_000_000_000 } | ||
wasm_bls12381_map_fp2_to_g2_base: { old: 300_000_000_000_000, new: 1_500_000_000 } | ||
wasm_bls12381_map_fp2_to_g2_element: { old: 300_000_000_000_000, new: 1_000_000_000_000 } | ||
wasm_bls12381_pairing_base: { old: 300_000_000_000_000, new: 2_100_000_000_000 } | ||
wasm_bls12381_pairing_element: { old: 300_000_000_000_000, new: 2_100_000_000_000 } | ||
wasm_bls12381_p1_decompress_base: { old: 300_000_000_000_000, new: 1_500_000_000 } | ||
wasm_bls12381_p1_decompress_element: { old: 300_000_000_000_000, new: 90_000_000_000 } | ||
wasm_bls12381_p2_decompress_base: { old: 300_000_000_000_000, new: 1_500_000_000 } | ||
wasm_bls12381_p2_decompress_element: { old: 300_000_000_000_000, new: 150_000_000_000 } |
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.
I’m not sure I understand, why do we need both
ark-bls12-381
andblst
? Can one of the two not handle the whole feature set? Their documentation’s description seems to be pretty similar.EDIT: AFAIU ark is used only as a second implementation to comparatively fuzz against blst. So this should be fine, feel free to ignore if my understanding at the end of the code review is the correct one :)
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.
Yes, that's correct, the second library is used only for tests as an alternative implementation.