Skip to content

Commit

Permalink
Support bls12381 (#1010)
Browse files Browse the repository at this point in the history
* Initial bl12381 implementation from frontier

* Fix clippy docs

* Fix clippy casting

* Fix taplo

* Update features snapshot

* Add tests

* Update features snapshot

* Fix prettier
  • Loading branch information
dmitrylavrenov authored Apr 19, 2024
1 parent b863d12 commit 0e1c519
Show file tree
Hide file tree
Showing 24 changed files with 7,668 additions and 1 deletion.
156 changes: 155 additions & 1 deletion Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ ignored = ["codec", "scale-info", "num_enum"]
# Crates.io deps.

anyhow = { version = "1", default-features = false }
ark-bls12-381 = { version = "0.4", default-features = false, features = ["curve"] }
ark-ec = { version = "0.4", default-features = false }
ark-ff = { version = "0.4", default-features = false }
ark-std = { version = "0.4", default-features = false }
assert_matches = { version = "1.5", default-features = false }
async-trait = { version = "0.1", default-features = false }
bip32 = { version = "0.5.1", default-features = false }
Expand Down Expand Up @@ -157,6 +161,7 @@ pallet-evm-precompile-modexp = { git = "https://github.com/humanode-network/fron
pallet-evm-precompile-sha3fips = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-precompile-simple = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-system = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }
pallet-evm-test-vector-support = { git = "https://github.com/humanode-network/frontier", branch = "locked/polkadot-v0.9.40", default-features = false }

[profile.release-lto]
inherits = "release"
Expand Down
25 changes: 25 additions & 0 deletions crates/precompile-bls12381/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "precompile-bls12381"
version = "0.1.0"
edition = "2021"
publish = false

[dependencies]
ark-bls12-381 = { workspace = true }
ark-ec = { workspace = true }
ark-ff = { workspace = true }
ark-std = { workspace = true }
fp-evm = { workspace = true }

[dev-dependencies]
pallet-evm-test-vector-support = { workspace = true }

[features]
default = ["std"]
std = [
"ark-bls12-381/std",
"ark-ec/std",
"ark-ff/std",
"ark-std/std",
"fp-evm/std",
]
Loading

0 comments on commit 0e1c519

Please sign in to comment.