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
18 changes: 16 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check --no-default-features -p revm --features=${{ matrix.features }}
- run: cargo check --no-default-features -p revm --features=${{ matrix.features }}

feature-checks:
name: features
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: cargo hack
run: cargo hack check --feature-powerset --depth 1

clippy:
name: clippy
Expand Down Expand Up @@ -96,7 +110,7 @@ jobs:
with:
components: rustfmt
- run: cargo fmt --all --check

# Check crates correctly propagate features
feature-propagation:
runs-on: ubuntu-latest
Expand Down
10 changes: 6 additions & 4 deletions crates/inspector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,21 @@ std = [
"interpreter/std",
"primitives/std",
"state/std",
"either/std"
"either/std",
]
serde = [
"dep:serde",
"database/serde",
"context/serde",
"database-interface/serde",
"handler/serde",
"interpreter/serde",
"primitives/serde",
"state/serde",
"either/serde"
"either/serde",
]

tracer = ["std", "serde", "dep:serde_json"]

# deprecated please use [`tracer`] feature instead
serde-json = ["dep:serde", "dep:serde_json", "serde"]
tracer = ["serde-json"]
serde-json = ["tracer"]
2 changes: 1 addition & 1 deletion crates/inspector/src/count_inspector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl CountInspector {
/// Create a new CountInspector.
pub fn new() -> Self {
Self {
opcode_counts: HashMap::new(),
opcode_counts: HashMap::default(),
initialize_interp_count: 0,
step_count: 0,
step_end_count: 0,
Expand Down
2 changes: 1 addition & 1 deletion crates/inspector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![cfg_attr(not(feature = "std"), no_std)]

mod count_inspector;
#[cfg(all(feature = "std", feature = "serde-json"))]
#[cfg(feature = "tracer")]
mod eip3155;
mod either;
mod gas;
Expand Down
1 change: 0 additions & 1 deletion crates/interpreter/src/instructions/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ pub fn codecopy<WIRE: InterpreterTypes, H: ?Sized>(context: InstructionContext<'
/// Loads 32 bytes of input data from the specified offset.
pub fn calldataload<WIRE: InterpreterTypes, H: ?Sized>(context: InstructionContext<'_, H, WIRE>) {
gas!(context.interpreter, gas::VERYLOW);
//pop_top!(interpreter, offset_ptr);
popn_top!([], offset_ptr, context.interpreter);
let mut word = B256::ZERO;
let offset = as_usize_saturated!(offset_ptr);
Expand Down
1 change: 1 addition & 0 deletions crates/precompile/src/bn128/substrate.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use super::{FQ2_LEN, FQ_LEN, G1_LEN, SCALAR_LEN};
use crate::PrecompileError;
use bn::{AffineG1, AffineG2, Fq, Fq2, Group, Gt, G1, G2};
use std::vec::Vec;

/// Reads a single `Fq` field element from the input slice.
///
Expand Down
1 change: 0 additions & 1 deletion crates/precompile/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ cfg_if::cfg_if! {
}
}

#[cfg(not(target_feature = "avx2"))]
use arrayref as _;

#[cfg(all(feature = "c-kzg", feature = "kzg-rs"))]
Expand Down
8 changes: 2 additions & 6 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ num_enum = { version = "0.7.3", default-features = false }
# Optional
serde = { workspace = true, features = ["derive", "rc"], optional = true }


[features]
default = ["std"]
std = [
"alloy-primitives/std",
"serde?/std",
"num_enum/std"
]
std = ["alloy-primitives/std", "serde?/std", "num_enum/std"]
serde = ["dep:serde", "alloy-primitives/serde"]
map-foldhash = ["alloy-primitives/map-foldhash"]

hashbrown = ["alloy-primitives/map-hashbrown"]
arbitrary = ["std", "alloy-primitives/arbitrary"]
Expand Down
1 change: 1 addition & 0 deletions crates/revm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ std = [
"serde_json/std",
]
hashbrown = ["interpreter/hashbrown", "precompile/hashbrown"]
map-foldhash = ["primitives/map-foldhash"]
serde = [
"interpreter/serde",
"database-interface/serde",
Expand Down
Loading