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

chore(deps): allow multiple versions of secp256k1 #1490

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
31 changes: 19 additions & 12 deletions crates/precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,40 @@ all = "warn"

[dependencies]
revm-primitives = { path = "../primitives", version = "4.0.0", default-features = false }
bn = { package = "substrate-bn", version = "0.6", default-features = false }
once_cell = { version = "1.19", default-features = false, features = ["alloc"] }
ripemd = { version = "0.1", default-features = false }
sha2 = { version = "0.10", default-features = false }
# modexp precompile
aurora-engine-modexp = { version = "1.1", default-features = false }

# Optional KZG point evaluation precompile
c-kzg = { version = "1.0.2", default-features = false, optional = true }

# ecRecover precompile
# ecRecover
k256 = { version = "0.13.3", default-features = false, features = ["ecdsa"] }
secp256k1 = { version = "0.29.0", default-features = false, features = [
secp256k1 = { version = ">=0.28, <=0.29", default-features = false, features = [
"alloc",
"recovery",
"rand",
"global-context",
], optional = true }

# SHA2-256 and RIPEMD-160
sha2 = { version = "0.10", default-features = false }
ripemd = { version = "0.1", default-features = false }

# modexp
aurora-engine-modexp = { version = "1.1", default-features = false }

# ecAdd, ecMul, ecPairing
bn = { package = "substrate-bn", version = "0.6", default-features = false }

# KZG point evaluation precompile
c-kzg = { version = "1.0.2", default-features = false, optional = true }

# BLS12-381 precompiles
blst = { version = "0.3.12", optional = true }

# p256verify precompile
p256 = { version = "0.13.2", optional = true, default-features = false, features = ["ecdsa"] }
p256 = { version = "0.13.2", optional = true, default-features = false, features = [
"ecdsa",
] }

[dev-dependencies]
criterion = { version = "0.5" }
criterion = "0.5"
rand = { version = "0.8", features = ["std"] }
eyre = "0.6.12"
rstest = "0.21.0"
Expand Down
4 changes: 2 additions & 2 deletions crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ impl Precompiles {
INSTANCE.get_or_init(|| {
let mut precompiles = Self::byzantium().clone();
precompiles.extend([
// EIP-152: Add BLAKE2 compression function `F` precompile.
blake2::FUN,
// EIP-1108: Reduce alt_bn128 precompile gas costs.
bn128::add::ISTANBUL,
bn128::mul::ISTANBUL,
bn128::pair::ISTANBUL,
// EIP-152: Add BLAKE2 compression function `F` precompile.
blake2::FUN,
]);
Box::new(precompiles)
})
Expand Down
Loading