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

Optimize bls precompile by arkworks lib #993

Merged
merged 21 commits into from
Mar 10, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
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
136 changes: 128 additions & 8 deletions Cargo.lock

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

37 changes: 21 additions & 16 deletions precompile/bls12-381/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
[package]
authors.workspace = true
description = "BLS12-381 implementation for EVM pallet."
description = "Arkworks BLS12-381 based precompile for EVM pallet."
edition.workspace = true
name = "darwinia-precompile-bls12-381"
readme = "README.md"
version.workspace = true

[dependencies]
# crates.io
ark-bls12-381 = { version = "0.4.0", default-features = false, features = ["curve"] }
ark-ec = { version = "0.4.1", default-features = false }
ark-ff = { version = "0.4.1", default-features = false }
ark-serialize = { version = "0.4.1", default-features = false, features = ["derive"] }
ark-std = { version = "0.4.0", default-features = false }
sha2 = { version = "0.10.6", default-features = false }

# frontier
fp-evm = { workspace = true }
pallet-evm = { workspace = true }
Expand All @@ -18,27 +26,24 @@ precompile-utils = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
# crates.io
codec = { package = "parity-scale-codec", workspace = true }
scale-info = { workspace = true }

# moonbeam
precompile-utils = { workspace = true, features = ["testing"] }

# substrate
frame-system = { workspace = true }
pallet-balances = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true, features = ["std"] }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
rand = { version = "0.8.5" }

[features]
default = ["std"]
std = [
# crates.io
"sha2/std",

# arkworks
"ark-bls12-381/std",
"ark-serialize/std",
"ark-std/std",
"ark-ec/std",
"ark-ff/std",

# frontier
"fp-evm/std",
"pallet-evm/std",
"fp-evm/std",

# moonbeam
"precompile-utils/std",
Expand Down
Loading