Skip to content

Commit 6afd9a4

Browse files
hujw77sorpaas
andauthored
Support EIP-2539 and EIP-3026 (#1049)
* Release branch polkadot-v0.9.38 (#1015) * EIP-2539 (#15) * Update shell.nix * Read point from input * Finish `BLS12377G1Add` * Fix `BLS12377G1Add` output encode * Finish `BLS12377G1Mul` * Finish `BLS12377G1MultiExp` * Finish `BLS12377G2Add` * Finish `BLS12377G2Mul` * Draft `eip-2539` implement * Finish `BLS12377Pairing` * Draft `eip-2539` * Multiplication by the unnormalized scalar * Rename serialize to write * Test Cases * Test Cases * Rewrite read_fq * Rename * Doc and cleanup * Tidy * Tidy * Tidy * Only check point in subgroup for pairing * Fmt * Tests * Typo * Typo * Fix conv * Change err info * Fmt * EIP-2539 tests * EIP-2539 tests * Lint and test * EIP-3026 (#16) * Update shell.nix * G1Add and G1Mul * G1MultiExp * G2Add * G2Mul and G2MultiExp * Bw6Pairing * EIP-3026 tests * EIP-3026 failure tests * Fix lint * Lint * Lint and test * Comment * Deps order * Fmt * Lint --------- Co-authored-by: Wei Tang <[email protected]>
1 parent 7108d56 commit 6afd9a4

39 files changed

+1517
-3
lines changed

Cargo.lock

+164
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ members = [
1212
"frame/evm/precompile/ed25519",
1313
"frame/evm/precompile/bn128",
1414
"frame/evm/precompile/blake2",
15+
"frame/evm/precompile/bw6761",
16+
"frame/evm/precompile/bls12377",
1517
"frame/evm/precompile/dispatch",
1618
"frame/evm/precompile/curve25519",
1719
"client/consensus",
@@ -151,3 +153,9 @@ pallet-evm-test-vector-support = { version = "1.0.0-dev", path = "frame/evm/test
151153
pallet-hotfix-sufficients = { version = "1.0.0", path = "frame/hotfix-sufficients", default-features = false }
152154
# Frontier Template
153155
frontier-template-runtime = { path = "template/runtime", default-features = false }
156+
# Arkworks
157+
ark-bls12-377 = { version = "0.4.0", default-features = false, features = ["curve"] }
158+
ark-bw6-761 = { version = "0.4.0", default-features = false }
159+
ark-ec = { version = "0.4.0", default-features = false }
160+
ark-ff = { version = "0.4.0", default-features = false }
161+
ark-std = { version = "0.4.0", default-features = false }
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "pallet-evm-precompile-bls12377"
3+
version = "1.0.0-dev"
4+
authors = { workspace = true }
5+
edition = { workspace = true }
6+
repository = { workspace = true }
7+
8+
[dependencies]
9+
# Arkworks
10+
ark-bls12-377 = { workspace = true }
11+
ark-ec = { workspace = true }
12+
ark-ff = { workspace = true }
13+
ark-std = { workspace = true }
14+
15+
# Frontier
16+
fp-evm = { workspace = true }
17+
18+
[dev-dependencies]
19+
# Frontier
20+
pallet-evm-test-vector-support = { workspace = true }
21+
22+
[features]
23+
default = ["std"]
24+
std = [
25+
# Arkworks
26+
"ark-bls12-377/std",
27+
"ark-ec/std",
28+
"ark-ff/std",
29+
"ark-std/std",
30+
31+
# Frontier
32+
"fp-evm/std",
33+
]

0 commit comments

Comments
 (0)