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

Precompiles for BLS12-381 curve operations #9317

Merged
merged 245 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 202 commits
Commits
Show all changes
245 commits
Select commit Hold shift + click to select a range
92882df
decompress function
olga24912 Jul 10, 2023
8f9ed8c
gas calculation for decompress
olga24912 Jul 11, 2023
3fa5d02
create templates for all functions
olga24912 Jul 12, 2023
976a372
g2 decompress function
olga24912 Jul 12, 2023
75c340e
gas for g2 decompress
olga24912 Jul 12, 2023
2eb13f6
g2 sum function
olga24912 Jul 12, 2023
797570d
g1 multiexp
olga24912 Jul 14, 2023
f992c2f
g2 impl
olga24912 Jul 14, 2023
e63c42f
fp to g1
olga24912 Jul 14, 2023
8a5938e
map fp2 tp g2
olga24912 Jul 14, 2023
a1f80fd
pairing function
olga24912 Jul 14, 2023
0943936
remove eip2537 blst lib
olga24912 Jul 14, 2023
7651a52
gas calculation for pairing
olga24912 Jul 14, 2023
f04dbfc
gas for map fp to curve
olga24912 Jul 14, 2023
a4296c9
estimate gas for multiexp functions
olga24912 Jul 17, 2023
c2392f0
fix warnings
olga24912 Jul 17, 2023
2231d63
add sign to sum function
olga24912 Oct 2, 2023
c9a374f
fix map to g2
olga24912 Nov 14, 2023
01d6bfb
return ERROR_CODE
olga24912 Nov 17, 2023
763c06a
change order signs points
olga24912 Nov 17, 2023
ed6bfd0
first test for bls12381
olga24912 Nov 23, 2023
3a06abf
tests for 0 + P = P + 0
olga24912 Nov 23, 2023
96a3cfc
tests for sum of two elements
olga24912 Nov 24, 2023
908a4f9
bls12381 sum test
olga24912 Nov 27, 2023
d086465
fix rand
olga24912 Nov 27, 2023
0907b97
P + (-P)
olga24912 Nov 27, 2023
70003bf
P + P
olga24912 Nov 27, 2023
c034b5c
P + -(P + P)
olga24912 Nov 27, 2023
b890d37
inverse test
olga24912 Nov 27, 2023
54bc167
double inv test
olga24912 Nov 27, 2023
141e58c
bls g1 sum in G1 test
olga24912 Nov 27, 2023
a61ff74
bls g1 sum tests inverse cmp with library
olga24912 Nov 27, 2023
1242d20
bls g1 sum tests inverse edge case
olga24912 Nov 27, 2023
f838692
empty input
olga24912 Nov 27, 2023
f89d0ad
multipoints tests
olga24912 Nov 30, 2023
74a2ef0
check input length
olga24912 Nov 30, 2023
5294a0e
optimise test
olga24912 Dec 5, 2023
60e2e5c
fix sum function
olga24912 Dec 5, 2023
82842bd
BLS12-381 tests: incorrect input for G1 sum
olga24912 Dec 8, 2023
2029f6f
BLS tests: g2_sum incorrect len
olga24912 Dec 11, 2023
07c5d5c
BLS tests: g2_sum edge cases
olga24912 Dec 11, 2023
bba0948
BLS tests: g1 multiexp mul
olga24912 Dec 11, 2023
3cbb98e
mult test
olga24912 Dec 12, 2023
defe771
fix bls12381_g1_multiexp
olga24912 Dec 27, 2023
d139f36
rename functions name
olga24912 Jan 2, 2024
d99fc4a
test for bls12381_p2_multiexp
olga24912 Jan 2, 2024
68f0781
map_fp_to_g1 test
olga24912 Jan 2, 2024
3dd9c96
map fp2 to g2 test
olga24912 Jan 2, 2024
f4aa1b8
test for p1 decompress
olga24912 Jan 2, 2024
d5db241
test for p2 decompress
olga24912 Jan 2, 2024
ad26851
first pairing check test
olga24912 Jan 2, 2024
08ddcf0
pairing for one point tests
olga24912 Jan 3, 2024
d2d5bb6
error case test for multiexp
olga24912 Jan 3, 2024
8c62afb
error case test for multiexp p2
olga24912 Jan 3, 2024
520a362
map fp to g1: imcorrect input length test
olga24912 Jan 3, 2024
3474df6
map fp2 to g2: imcorrect input length test
olga24912 Jan 3, 2024
daf1f39
incorrect input len tests
olga24912 Jan 3, 2024
2340788
incorrect input test for p2 decompress
olga24912 Jan 3, 2024
47db7e1
incorrect input for p1_decompress tests
olga24912 Jan 3, 2024
042be6b
pairing incorrect input test
olga24912 Jan 3, 2024
b97c888
validate fp
olga24912 Jan 4, 2024
5cdd5ce
multiexp p1 many points test
olga24912 Jan 4, 2024
4777e35
multiexp p2 many points tests
olga24912 Jan 4, 2024
797feea
tests: many points map
olga24912 Jan 4, 2024
7a3785b
add decompress multipoints tests
olga24912 Jan 4, 2024
eebb787
test pairing check many points
olga24912 Jan 4, 2024
39a7a4b
fix map g1
olga24912 Jan 4, 2024
a995d99
fix map g2
olga24912 Jan 4, 2024
211c17c
add comments for sum function
olga24912 Jan 5, 2024
204007f
comments for bls sum p2 function
olga24912 Jan 5, 2024
45ee2dc
add description for multiexp 1
olga24912 Jan 5, 2024
d46ccf2
add description for multiexp 2
olga24912 Jan 5, 2024
7c184a5
description for map 1
olga24912 Jan 5, 2024
338e642
description for map 2
olga24912 Jan 5, 2024
4f19ff7
pairing description
olga24912 Jan 5, 2024
1b4a3ee
description for decompress points
olga24912 Jan 5, 2024
be78779
description for decompress points 2
olga24912 Jan 5, 2024
3b58117
add variable for gas estimation
olga24912 Jan 5, 2024
1b6ae2a
calculate gas for elements
olga24912 Jan 5, 2024
6d791fd
reduce vec realocation
olga24912 Jan 8, 2024
027cdc7
remove unused clone
olga24912 Jan 8, 2024
a6533cd
BLS: add const
olga24912 Jan 9, 2024
67f524a
fmt
olga24912 Jan 9, 2024
a10ffc2
Merge branch 'near-master' into bls12-381
olga24912 Jan 9, 2024
e488355
empty input test
olga24912 Feb 21, 2024
d02eb10
invariants checks tests
olga24912 Feb 22, 2024
ce824b7
inverse tests for sum p2
olga24912 Feb 22, 2024
4fa5aa8
memory limit test
olga24912 Feb 22, 2024
c7615a7
pairing check error cases
olga24912 Feb 22, 2024
aed8158
max n test
olga24912 Feb 22, 2024
393ff00
decompress inf points
olga24912 Feb 22, 2024
17b82a3
decompress g1 g2 points
olga24912 Feb 22, 2024
54ba27d
decompress neg y
olga24912 Feb 22, 2024
2d34977
pairing check two points
olga24912 Feb 22, 2024
a6625b3
edge cases map fp
olga24912 Feb 22, 2024
8453460
bls pairing tests from eip2537
olga24912 Feb 23, 2024
d47ec6b
eip2537 tests for map fp to g1
olga24912 Feb 23, 2024
a39992d
eip2537 tests for map fp2 to g2
olga24912 Feb 23, 2024
cab7e0d
eip2537 tests for add g1
olga24912 Feb 23, 2024
28f2f57
eip2537 tests for add g2
olga24912 Feb 23, 2024
4e9b47c
eip2537 tests mul
olga24912 Feb 23, 2024
6589758
eip2537 tests multiexp
olga24912 Feb 23, 2024
1e939cd
extra g2_multiexp test
olga24912 Feb 26, 2024
706ac5c
add extra tests
olga24912 Feb 26, 2024
8d9c044
eip2537 error test
olga24912 Feb 26, 2024
952bd1c
p to const
olga24912 Feb 26, 2024
40dfc1f
separate logic builder
olga24912 Feb 26, 2024
b20e6c2
macros for sum edge case
olga24912 Feb 26, 2024
9391ca7
sum tests to macros
olga24912 Feb 26, 2024
9d4978c
sum inverse tests to macros
olga24912 Feb 26, 2024
b43fddf
sum many points to macros
olga24912 Feb 26, 2024
c6fd27a
sum cmp with multiexp to macros
olga24912 Feb 26, 2024
f35e725
move test sum incorrect input to macros
olga24912 Feb 27, 2024
766ef7f
fmt
olga24912 Feb 27, 2024
01931a5
memory limit test
olga24912 Feb 27, 2024
61074e2
incorrect input test
olga24912 Feb 27, 2024
1b0f356
namespaces
olga24912 Feb 27, 2024
227a18d
move some function to GOperations struct
olga24912 Feb 27, 2024
d65f08d
resort macros args
olga24912 Feb 27, 2024
c136a4d
move multiexp function
olga24912 Feb 27, 2024
7ceebe0
multiexp test
olga24912 Feb 27, 2024
811b34c
move multiexp incorrect input test
olga24912 Feb 27, 2024
777e881
separate invariant check
olga24912 Feb 27, 2024
6d2f051
separate to macros tests with known output
olga24912 Feb 28, 2024
931b17e
macros for running bls functions
olga24912 Feb 28, 2024
b5823de
macros for fix_eip2537
olga24912 Feb 28, 2024
1208eab
pairing incorrect input to macros
olga24912 Feb 28, 2024
fcba240
decompress to macros
olga24912 Feb 28, 2024
7371e2a
decompress many points to macros
olga24912 Feb 28, 2024
e689a6c
decompress incorrect input to macros
olga24912 Feb 28, 2024
3a56f50
make empty input test smaller
olga24912 Feb 28, 2024
ead7369
optimize get zero
olga24912 Feb 28, 2024
423eaa8
error encoding macros
olga24912 Feb 28, 2024
171edb3
map fp to g to macros
olga24912 Feb 28, 2024
ca8e6a2
safe POINT_LEN
olga24912 Feb 28, 2024
a106819
separate functions to GOperations
olga24912 Feb 28, 2024
9a41790
goperations to macros
olga24912 Feb 28, 2024
1c80b10
const for R - 1
olga24912 Feb 28, 2024
36e0d92
macros for run bls12381 function
olga24912 Feb 28, 2024
b2e790f
simplify get random not g curve point
olga24912 Feb 29, 2024
eceeaeb
simplify get random curve point
olga24912 Feb 29, 2024
857d539
get 381 bit big
olga24912 Feb 29, 2024
31270f6
macro for run bls12381 functions
olga24912 Feb 29, 2024
1cbed97
remove cp for map_fp_to_g
olga24912 Feb 29, 2024
cae39c2
simplify edge cases tests
olga24912 Feb 29, 2024
7e4acfa
check sum function
olga24912 Feb 29, 2024
0e3469c
check sum function
olga24912 Feb 29, 2024
19c339f
incorrect input fn
olga24912 Feb 29, 2024
2a472a5
MAX_N const
olga24912 Feb 29, 2024
05e6819
incorrect input test
olga24912 Feb 29, 2024
256fbb1
errneos codin tests
olga24912 Feb 29, 2024
02386ad
simplify imports
olga24912 Feb 29, 2024
c404a8f
TEST_ITERATIONS const
olga24912 Feb 29, 2024
49cc764
tests transfer map to fp to ark
olga24912 Mar 1, 2024
42b8592
tests transfer map to fp edge cases to ark
olga24912 Mar 1, 2024
9da26dc
tests transfer sum edge cases to ark
olga24912 Mar 1, 2024
dfbdeee
update sum functions
olga24912 Mar 5, 2024
5bfce7f
fix sum tests
olga24912 Mar 5, 2024
f450c24
remove unused var
olga24912 Mar 6, 2024
a20974d
fix multiexp test
olga24912 Mar 6, 2024
6e5b8ba
fix multiexp many points tests
olga24912 Mar 6, 2024
eb9070e
fix multiexp tests
olga24912 Mar 6, 2024
d4edcd9
fix decompress tests
olga24912 Mar 6, 2024
ddea941
fix decompress tests
olga24912 Mar 6, 2024
65d753a
fix decompress
olga24912 Mar 6, 2024
de35578
fix decompress
olga24912 Mar 6, 2024
9234b0d
fix pairing test
olga24912 Mar 7, 2024
5b83406
fix two points pairing test
olga24912 Mar 7, 2024
573cd47
fix many points pairing test
olga24912 Mar 7, 2024
7f03809
remove aml library
olga24912 Mar 7, 2024
2a04b56
fix data for sum function
olga24912 Mar 8, 2024
9e26104
fix data for gas estimation
olga24912 Mar 8, 2024
fe15cfa
fix command for gas estimation
olga24912 Mar 8, 2024
9dff2e6
update gas cost
olga24912 Mar 10, 2024
44687f5
Merge remote-tracking branch 'near/master' into bls12-381
olga24912 Mar 10, 2024
817606c
add protocol_feature_bls12381
olga24912 Mar 11, 2024
595bf3d
fmt
olga24912 Mar 11, 2024
4a4b411
remove unused import
olga24912 Mar 11, 2024
ce5ba12
remove unused dependence
olga24912 Mar 11, 2024
0ce5eb4
fix gas estimation
olga24912 Mar 12, 2024
de13cc6
fix last nightly protocol
olga24912 Mar 12, 2024
c3fef09
add new line in the end of files
olga24912 Mar 12, 2024
9387ad1
fix const
olga24912 Mar 13, 2024
ac6d4c7
separate bls12381 sum
olga24912 Apr 11, 2024
c863395
Separate bls12381 map
olga24912 Apr 11, 2024
3bd33cd
separate bls12381 pairing_check
olga24912 Apr 11, 2024
98c7548
separate bls12381 decompress
olga24912 Apr 11, 2024
195e1a2
bls12381 slice -> vec
olga24912 Apr 11, 2024
35eac95
Merge branch 'bls12-381' of https://github.com/aurora-is-near/nearcor…
olga24912 Apr 11, 2024
c28afc3
mod bls12381 under feature
olga24912 Apr 11, 2024
3fe5ff7
Merge remote-tracking branch 'upstream/master' into bls12-381
olga24912 May 7, 2024
6dce7b2
update blst version
olga24912 May 7, 2024
f3a13e2
separate const
olga24912 May 14, 2024
8a9e252
vec::with_capacity
olga24912 May 14, 2024
86ec890
move check to the begin of function
olga24912 May 14, 2024
7c597c6
split data by chunk exact
olga24912 May 14, 2024
a08c162
item size
olga24912 May 14, 2024
1eeb31b
check the G subgroup
olga24912 May 15, 2024
3bfbd40
cargo fmt
olga24912 May 15, 2024
57f3e46
rename p1/p2 -> g1/g2
olga24912 May 21, 2024
98e9498
SUM g -> p
olga24912 May 22, 2024
73e0d9b
Merge branch 'master' into bls12-381
olga24912 Jun 13, 2024
3c848a4
fix comments
olga24912 Jun 27, 2024
ac8922b
separate to macros common part of bls functions
olga24912 Jun 27, 2024
56d69db
fix typo
olga24912 Jun 27, 2024
ccf5e23
move protocol_feature_bls12381 from nightly_protocol to nightly
olga24912 Jun 27, 2024
6bae9c6
macros for bls12381
olga24912 Jun 27, 2024
c818d3b
map fp to g move into macros
olga24912 Jun 28, 2024
96b423f
fmt
olga24912 Jun 28, 2024
2c81407
separate len check
olga24912 Jun 28, 2024
3dafa4b
change sum order
olga24912 Jun 28, 2024
79b4f3f
separate parse_p
olga24912 Jun 28, 2024
10de6c7
separate serialize_p
olga24912 Jun 28, 2024
0ecc88d
fix types
olga24912 Jun 28, 2024
220ed45
zip -> enumerate
olga24912 Jun 28, 2024
c8d2a6c
const for compress size
olga24912 Jun 28, 2024
6c3a9c0
Option as return value
olga24912 Jun 28, 2024
12749a2
update gas cost
olga24912 Jun 30, 2024
30bb60a
blst add portable features
olga24912 Jul 1, 2024
58255e2
bolero for FP
olga24912 Jul 1, 2024
a051460
map to g many points tests to bolero
olga24912 Jul 2, 2024
06e5ee0
sum tests to bolero
olga24912 Jul 2, 2024
2f9044e
tests to bolero
olga24912 Jul 2, 2024
3f17567
tests to bolero
olga24912 Jul 2, 2024
1fbee5a
tests to bolero
olga24912 Jul 2, 2024
c2e3c57
tests to bolero
olga24912 Jul 2, 2024
65a25df
tests to bolero
olga24912 Jul 2, 2024
b9b4b35
tests to bolero
olga24912 Jul 3, 2024
eb22f26
tests to bolero
olga24912 Jul 3, 2024
8b06fad
tests to bolero
olga24912 Jul 3, 2024
d4560db
tests to bolero
olga24912 Jul 3, 2024
825cc06
tests to bolero
olga24912 Jul 3, 2024
0649375
tests to bolero
olga24912 Jul 3, 2024
bf1d13b
tests to bolero
olga24912 Jul 3, 2024
0e30245
tests to bolero
olga24912 Jul 3, 2024
0931c1a
reduce max test
olga24912 Jul 3, 2024
be12512
fix comlilation without bls flag
olga24912 Jul 3, 2024
5b992b3
cargo fmt
olga24912 Jul 3, 2024
f1f977c
Merge branch 'near-master' into bls12-381
olga24912 Jul 3, 2024
9e89052
update dependency
olga24912 Jul 3, 2024
8955690
fix compilation
olga24912 Jul 3, 2024
81d16d1
fix clippy
olga24912 Jul 3, 2024
8fb9b68
fix style
olga24912 Jul 3, 2024
c5c3908
add snap
olga24912 Jul 3, 2024
0c50335
fmt
olga24912 Jul 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 171 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ actix-web = "4.1"
anyhow = "1.0.62"
arbitrary = { version = "1.2.3", features = ["derive"] }
arc-swap = "1.5"
ark-bls12-381 = "0.4.0"
ark-ec = "0.4.0"
ark-ff = "0.4.0"
ark-serialize = "0.4.0"
ark-std = "0.4.0"
assert_matches = "1.5.0"
async-trait = "0.1.58"
aurora-engine-transactions = "1.1"
Expand All @@ -134,6 +139,7 @@ base64 = "0.21"
bencher = "0.1.5"
bitflags = "1.2"
blake2 = { version = "0.10.6", features = ["reset"] }
blst = "0.3.11"
Copy link
Collaborator

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 and blst? 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 :)

Copy link
Contributor Author

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.

bn = { package = "zeropool-bn", version = "0.5.11", default-features = false }
# TODO: remove this override when https://github.com/camshaft/bolero/issues/196 is fixed upstream
# Currently the changes here are: https://github.com/camshaft/bolero/compare/master...Ekleog-NEAR:bolero:reduce-list-tests-run
Expand Down
2 changes: 2 additions & 0 deletions core/parameters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ nightly = [
]
nightly_protocol = [
"near-primitives-core/nightly_protocol",
"protocol_feature_bls12381"
Copy link
Collaborator

Choose a reason for hiding this comment

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

As per docs/practices/protocol_upgrade.md, this should be in the nightly feature, and not nightly_protocol. And similarly for all other Cargo.toml files, I may forget to copy this message on one of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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 = []
18 changes: 18 additions & 0 deletions core/parameters/res/runtime_configs/141.yaml
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 }
Copy link
Collaborator

Choose a reason for hiding this comment

The 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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

https://airy-sloth-f15.notion.site/BLS12_381-Gas-Estimation-v0-1-0-4ca5ed0d7dd74b1699be60f8c5063d47?pvs=4

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 }
19 changes: 19 additions & 0 deletions core/parameters/res/runtime_configs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,25 @@ wasm_alt_bn128_pairing_check_base: 9_686_000_000_000
wasm_alt_bn128_pairing_check_element: 5_102_000_000_000
wasm_alt_bn128_g1_sum_base: 3_000_000_000
wasm_alt_bn128_g1_sum_element: 5_000_000_000
wasm_bls12381_p1_sum_base: 300_000_000_000_000
wasm_bls12381_p1_sum_element: 300_000_000_000_000
wasm_bls12381_p2_sum_base: 300_000_000_000_000
wasm_bls12381_p2_sum_element: 300_000_000_000_000
wasm_bls12381_g1_multiexp_base: 300_000_000_000_000
wasm_bls12381_g1_multiexp_element: 300_000_000_000_000
wasm_bls12381_g2_multiexp_base: 300_000_000_000_000
wasm_bls12381_g2_multiexp_element: 300_000_000_000_000
wasm_bls12381_map_fp_to_g1_base: 300_000_000_000_000
wasm_bls12381_map_fp_to_g1_element: 300_000_000_000_000
wasm_bls12381_map_fp2_to_g2_base: 300_000_000_000_000
wasm_bls12381_map_fp2_to_g2_element: 300_000_000_000_000
wasm_bls12381_pairing_base: 300_000_000_000_000
wasm_bls12381_pairing_element: 300_000_000_000_000
wasm_bls12381_p1_decompress_base: 300_000_000_000_000
wasm_bls12381_p1_decompress_element: 300_000_000_000_000
wasm_bls12381_p2_decompress_base: 300_000_000_000_000
wasm_bls12381_p2_decompress_element: 300_000_000_000_000

wasm_yield_create_base: 300_000_000_000_000
wasm_yield_create_byte: 300_000_000_000_000
wasm_yield_resume_base: 300_000_000_000_000
Expand Down
19 changes: 19 additions & 0 deletions core/parameters/res/runtime_configs/parameters_testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,25 @@ wasm_alt_bn128_pairing_check_base: 9_685_508_901_000
wasm_alt_bn128_pairing_check_element: 26_575_188_546
wasm_alt_bn128_g1_sum_base: 3_175_314_375
wasm_alt_bn128_g1_sum_element: 76_218_543
wasm_bls12381_p1_sum_base: 300_000_000_000_000
wasm_bls12381_p1_sum_element: 300_000_000_000_000
wasm_bls12381_p2_sum_base: 300_000_000_000_000
wasm_bls12381_p2_sum_element: 300_000_000_000_000
wasm_bls12381_g1_multiexp_base: 300_000_000_000_000
wasm_bls12381_g1_multiexp_element: 300_000_000_000_000
wasm_bls12381_g2_multiexp_base: 300_000_000_000_000
wasm_bls12381_g2_multiexp_element: 300_000_000_000_000
wasm_bls12381_map_fp_to_g1_base: 300_000_000_000_000
wasm_bls12381_map_fp_to_g1_element: 300_000_000_000_000
wasm_bls12381_map_fp2_to_g2_base: 300_000_000_000_000
wasm_bls12381_map_fp2_to_g2_element: 300_000_000_000_000
wasm_bls12381_pairing_base: 300_000_000_000_000
wasm_bls12381_pairing_element: 300_000_000_000_000
wasm_bls12381_p1_decompress_base: 300_000_000_000_000
wasm_bls12381_p1_decompress_element: 300_000_000_000_000
wasm_bls12381_p2_decompress_base: 300_000_000_000_000
wasm_bls12381_p2_decompress_element: 300_000_000_000_000

wasm_yield_create_base: 300_000_000_000_000
wasm_yield_create_byte: 300_000_000_000_000
wasm_yield_resume_base: 300_000_000_000_000
Expand Down
1 change: 1 addition & 0 deletions core/parameters/src/config_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ static CONFIG_DIFFS: &[(ProtocolVersion, &str)] = &[
(129, include_config!("129.yaml")),
// Introduce ETH-implicit accounts.
(138, include_config!("138.yaml")),
(141, include_config!("141.yaml")),
];

/// Testnet parameters for versions <= 29, which (incorrectly) differed from mainnet parameters
Expand Down
Loading
Loading