Skip to content
Closed
Show file tree
Hide file tree
Changes from 6 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
427 changes: 202 additions & 225 deletions Cargo.lock

Large diffs are not rendered by default.

50 changes: 31 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
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 = "f873f0e", default-features = false }
tempo-primitives = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e", 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 = "f873f0e", default-features = false }
tempo-evm = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e", default-features = false }
tempo-revm = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e", default-features = false, features = [
"serde",
] }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e" }
tempo-precompiles = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e" }

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

Expand Down Expand Up @@ -585,11 +587,11 @@ 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" }
Expand All @@ -599,18 +601,28 @@ 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" }
## revm — TIP-1016: InitialAndFloorGas handler change
revm = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-bytecode = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-context = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-database = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-handler = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-inspector = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-precompile = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
revm-state = { git = "https://github.com/bluealloy/revm", rev = "ea8d1f5" }
op-revm = { git = "https://github.com/foundry-rs/op-revm", rev = "780b812" }

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

## 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 = "f873f0e" }
tempo-alloy = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e" }
tempo-contracts = { git = "https://github.com/tempoxyz/tempo", rev = "f873f0e" }

# 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
4 changes: 2 additions & 2 deletions crates/evm/core/src/bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl<'a> Iterator for InstIter<'a> {
#[inline]
fn next(&mut self) -> Option<Self::Item> {
self.iter.next().map(|&opcode| {
let opcode = unsafe { OpCode::new_unchecked(opcode) };
let opcode = OpCode::new_or_unknown(opcode);
let len = imm_len(opcode.get()) as usize;
let (immediate, rest) = self.iter.as_slice().split_at_checked(len).unwrap_or_default();
self.iter = rest.iter();
Expand Down Expand Up @@ -163,7 +163,7 @@ mod tests {
use revm::bytecode::opcode as op;

fn o(op: u8) -> OpCode {
unsafe { OpCode::new_unchecked(op) }
OpCode::new_or_unknown(op)
}

#[test]
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