Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 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
310 changes: 166 additions & 144 deletions Cargo.lock

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,12 @@ op-alloy-rpc-types = "0.24.0"
op-alloy-flz = "0.13.1"

## alloy-evm
alloy-evm = "0.32.0"
alloy-evm = "0.33.1"
alloy-op-evm = "0.30.0"

# revm
revm = { version = "37.0.0", default-features = false }
revm-inspectors = { version = "0.38.1", features = ["serde"] }
revm = { version = "38.0.0", default-features = false }
revm-inspectors = { version = "0.39.0", features = ["serde"] }
op-revm = { version = "18.0.0", default-features = false }

## cli
Expand Down Expand Up @@ -513,15 +513,17 @@ mpp = { git = "https://github.com/tempoxyz/mpp-rs", rev = "310c9a1f3fe485fa9c7a8
"client",
"reqwest-rustls-tls",
] }
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc", default-features = false }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc", default-features = false, features = [
tempo-chainspec = { git = "https://github.com/tempoxyz/tempo", rev = "c095527", default-features = false }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "c095527", default-features = false, features = [
"serde",
] }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc", default-features = false }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc", default-features = false, features = ["serde"] }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc" }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "c095527", default-features = false }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "c095527", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "c095527", default-features = false, features = [
"serde",
] }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "c095527" }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "c095527" }

## Pinned dependencies. Enabled for the workspace in crates/test-utils.

Expand Down Expand Up @@ -585,32 +587,30 @@ rexpect = { git = "https://github.com/rust-cli/rexpect", rev = "2ed0b1898d7edaf6
## alloy-evm
# alloy-evm = { git = "https://github.com/paradigmxyz/evm.git", rev = "04d8e4a" }

## reth-core
# reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }
# reth-codecs = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }
# reth-codecs-derive = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }
# reth-rpc-traits = { git = "https://github.com/paradigmxyz/reth-core", rev = "af2174c" }
## reth-core — Bytecode::new_analyzed is unsafe in patched revm
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth-core", rev = "6b12498" }
reth-codecs = { git = "https://github.com/paradigmxyz/reth-core", rev = "6b12498" }
reth-codecs-derive = { git = "https://github.com/paradigmxyz/reth-core", rev = "6b12498" }
reth-zstd-compressors = { git = "https://github.com/paradigmxyz/reth-core", rev = "6b12498" }

## op-alloy / alloy-op-evm
op-alloy-consensus = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy-network = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy-rpc-types = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
op-alloy = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
alloy-op-evm = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }
alloy-op-hardforks = { git = "https://github.com/foundry-rs/optimism", branch = "develop" }

## revm
# revm = { git = "https://github.com/bluealloy/revm.git", rev = "7e59936" }
# op-revm = { git = "https://github.com/bluealloy/revm.git", rev = "7e59936" }
# revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors.git", rev = "22dcee2" }
op-alloy-consensus = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }
op-alloy-network = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }
op-alloy-rpc-types = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }
op-alloy = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }
alloy-op-evm = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }
alloy-op-hardforks = { git = "https://github.com/foundry-rs/optimism", branch = "rusowsky/revm-38" }

## revm 38 (crates.io) + op-revm (git, bumped to revm 38)
op-revm = { git = "https://github.com/foundry-rs/op-revm", branch = "rusowsky/revm-38" }

## foundry-fork-db
# foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", rev = "b139c57c2b54bc06a9e4c9783941f5bbd4bd3a1f" }
foundry-fork-db = { git = "https://github.com/foundry-rs/foundry-fork-db", branch = "rusowsky/revm-38" }

## tempo — unify crates.io versions (pulled by mpp) with git rev
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc" }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "6f4f5cc" }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "c095527" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "c095527" }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "c095527" }

# solar
solar = { package = "solar-compiler", git = "https://github.com/paradigmxyz/solar", rev = "530f129" }
Expand Down
8 changes: 8 additions & 0 deletions crates/anvil/src/eth/backend/tempo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ impl PrecompileStorageProvider for AnvilStorageProvider<'_> {
self.gas_used
}

fn state_gas_used(&self) -> u64 {
0
}

fn gas_limit(&self) -> u64 {
u64::MAX
}

fn gas_refunded(&self) -> i64 {
self.gas_refunded
}
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ mod tests {
status: PrecompileStatus::Success,
bytes: Bytes::copy_from_slice(input.data),
gas_used: 0,
gas_refunded: 0,
state_gas_used: 0,
reservoir: input.reservoir,
})
Expand Down
1 change: 1 addition & 0 deletions crates/anvil/tests/it/fork.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,7 @@ async fn test_config_with_osaka_hardfork_with_precompile_factory() {
Ok(revm::precompile::PrecompileOutput {
bytes: Bytes::copy_from_slice(input.data),
gas_used: 0,
gas_refunded: 0,
status: PrecompileStatus::Success,
state_gas_used: 0,
reservoir: input.reservoir,
Expand Down
1 change: 1 addition & 0 deletions crates/cheatcodes/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ fn deploy_code<FEN: FoundryEvmNetwork>(
value.unwrap_or(U256::ZERO),
bytecode.into(),
ccx.gas_limit,
0,
),
ccx,
)?;
Expand Down
1 change: 1 addition & 0 deletions crates/evm/core/src/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl<'a> Iterator for InstIter<'a> {
#[inline]
fn next(&mut self) -> Option<Self::Item> {
self.iter.next().map(|&opcode| {
// SAFETY: OpCode wraps a u8, unknown opcodes are valid to construct.
let opcode = unsafe { OpCode::new_unchecked(opcode) };
let len = imm_len(opcode.get()) as usize;
let (immediate, rest) = self.iter.as_slice().split_at_checked(len).unwrap_or_default();
Expand Down
4 changes: 4 additions & 0 deletions crates/evm/core/src/evm/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ impl<'db, I: FoundryInspectorExt<OpContext<&'db mut dyn DatabaseExt<OpEvmFactory
&self.inner.ctx_ref().block
}

fn cfg_env(&self) -> &revm::context::CfgEnv<Self::Spec> {
&self.inner.ctx_ref().cfg
}

fn chain_id(&self) -> u64 {
self.inner.ctx_ref().cfg.chain_id
}
Expand Down
3 changes: 3 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,7 @@ allow-git = [
"https://github.com/tempoxyz/mpp-rs",
# Transitive dependency of Tempo
"https://github.com/paradigmxyz/reth",
"https://github.com/paradigmxyz/reth-core",
# TIP-1016: patched op-revm
"https://github.com/foundry-rs/op-revm",
]
Loading