Skip to content
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
229 changes: 120 additions & 109 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 1 addition & 19 deletions crates/interpreter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,14 @@ readme = "../../README.md"
[dependencies]
revm-primitives = { path = "../primitives", version = "1.1.2", default-features = false }

#utility
derive_more = "0.99"
enumn = "0.1"

# optional
serde = { version = "1.0", features = ["derive", "rc"], optional = true }
arbitrary = { version = "1.3", features = ["derive"], optional = true }
proptest = { version = "1.1", optional = true }
proptest-derive = { version = "0.4", optional = true }

[dev-dependencies]
arbitrary = { version = "1.3", features = ["derive"] }
proptest = "1.1"
proptest-derive = "0.4"

[features]
default = ["std"]
std = ["revm-primitives/std"]
serde = ["dep:serde", "revm-primitives/serde"]
arbitrary = [
"std",
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",
"revm-primitives/arbitrary",
]
arbitrary = ["std", "revm-primitives/arbitrary"]

dev = [
"memory_limit",
Expand Down
1 change: 1 addition & 0 deletions crates/interpreter/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(unused_crate_dependencies)]

extern crate alloc;

Expand Down
19 changes: 11 additions & 8 deletions crates/precompile/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,20 @@ exclude = ["build.rs", "src/blob/kzg_settings/*.txt"]
[dependencies]
revm-primitives = { path = "../primitives", version = "1.1.2", default-features = false }
bn = { package = "substrate-bn", version = "0.6", default-features = false }
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
num = { version = "0.4.0", default-features = false, features = ["alloc"] }
once_cell = { version = "1.17", default-features = false, features = ["alloc"] }
ripemd = { version = "0.1", default-features = false }
sha2 = { version = "0.10", default-features = false }

# Optional KZG point evaluation precompile
c-kzg = { git = "https://github.com/ethereum/c-kzg-4844", default-features = false, optional = true }

# ecRecover precompile
k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
secp256k1 = { version = "0.27.0", default-features = false, features = [
"alloc",
"recovery",
], optional = true }
sha2 = { version = "0.10.5", default-features = false }
sha3 = { version = "0.10.7", default-features = false }
c-kzg = { git = "https://github.com/ethereum/c-kzg-4844", default-features = false, optional = true }

[features]
default = ["std", "c-kzg", "secp256k1"]
Expand All @@ -35,16 +38,16 @@ std = [
"once_cell/std",
"ripemd/std",
"sha2/std",
"sha3/std",
"c-kzg?/std",
"secp256k1?/std",
]

# The following features may not work on all platforms as they depend on C libraries.
# Enables the KZG point evaluation precompile.
# * Enables the KZG point evaluation precompile.
c-kzg = ["dep:c-kzg", "revm-primitives/c-kzg"]

# Use `secp256k1` as a faster alternative to `k256`.
# * `secp256k1` as a faster alternative to `k256`.
# The problem that `secp256k1` has is it fails to build for `wasm` target on Windows and Mac as it is c lib.
# In Linux it passes. If you don't require to build wasm on win/mac, it is safe to use it and it is enabled by default.
secp256k1 = ["dep:secp256k1"]

# * = This library may not work on all platforms as it depends on C libraries.
1 change: 1 addition & 0 deletions crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![no_std]
#![warn(unused_crate_dependencies)]

#[macro_use]
extern crate alloc;
Expand Down
3 changes: 3 additions & 0 deletions crates/precompile/src/secp256k1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ mod secp256k1 {
Message, Secp256k1,
};

// Silence the unused crate dependency warning.
use k256 as _;

pub fn ecrecover(sig: &[u8; 65], msg: &B256) -> Result<B256, secp256k1::Error> {
let sig =
RecoverableSignature::from_compact(&sig[0..64], RecoveryId::from_i32(sig[64] as i32)?)?;
Expand Down
37 changes: 5 additions & 32 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ readme = "../../README.md"

[dependencies]
alloy-primitives = { version = "0.3", default-features = false, features = [
"rlp"
"rlp",
] }
alloy-rlp = { version = "0.3", default-features = false, features = ["derive"] }
bytes = { version = "1.5", default-features = false }
hashbrown = "0.14"
primitive-types = { version = "0.12", default-features = false }
auto_impl = "1.1"
bitvec = { version = "1", default-features = false, features = ["alloc"] }
bitflags = { version = "2.4.0", default-features = false }
Expand All @@ -25,53 +23,28 @@ bitflags = { version = "2.4.0", default-features = false }
c-kzg = { git = "https://github.com/ethereum/c-kzg-4844", default-features = false, optional = true }

# utility
derive_more = "0.99"
enumn = "0.1"
once_cell = { version = "1.18", default-features = false }
once_cell = { version = "1.18", default-features = false, optional = true }

# optional
serde = { version = "1.0", features = ["derive", "rc"], optional = true }
arbitrary = { version = "1.3", features = ["derive"], optional = true }
proptest = { version = "1.1", optional = true }
proptest-derive = { version = "0.4", optional = true }

[dev-dependencies]
arbitrary = { version = "1.3", features = ["derive"] }
proptest = "1.1"
proptest-derive = "0.4"
ruint = { version = "1.10.1", features = [
"primitive-types",
"rlp",
"proptest",
"arbitrary",
] }

[build-dependencies]
hex = "0.4"

[features]
default = ["std", "c-kzg"]
std = ["bytes/std", "alloy-rlp/std", "hex/std", "bitvec/std", "bitflags/std"]
std = ["alloy-rlp/std", "hex/std", "bitvec/std", "bitflags/std"]
serde = [
"dep:serde",
"alloy-primitives/serde",
"hex/serde",
"hashbrown/serde",
"ruint/serde",
"bytes/serde",
"bitvec/serde",
"bitflags/serde",
"c-kzg?/serde",
]
arbitrary = [
"std",
"ruint/arbitrary",
"ruint/proptest",
"dep:arbitrary",
"dep:proptest",
"dep:proptest-derive",
"bitflags/arbitrary",
]
arbitrary = ["std", "alloy-primitives/arbitrary", "bitflags/arbitrary"]

dev = [
"memory_limit",
Expand All @@ -90,4 +63,4 @@ optional_gas_refund = []
optional_no_base_fee = []

# See comments in `revm-precompile`
c-kzg = ["dep:c-kzg"]
c-kzg = ["dep:c-kzg", "dep:once_cell"]
1 change: 1 addition & 0 deletions crates/primitives/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(unused_crate_dependencies)]

extern crate alloc;

Expand Down
1 change: 1 addition & 0 deletions crates/revm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(unreachable_pub)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]

#[macro_use]
extern crate alloc;
Expand Down