Skip to content

Commit

Permalink
fix eip-3860 ref: rust-ethereum/evm#160
Browse files Browse the repository at this point in the history
  • Loading branch information
zjb0807 committed Jan 16, 2024
1 parent 26ae671 commit 25f55c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions modules/evm-utility/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ sha3 = { workspace = true }

sp-std = { workspace = true }

evm = { git = "https://github.com/rust-blockchain/evm", rev = "5fb8a4957c642134782e184c47f7d7b5a29f3629", default-features = false, features = ["with-codec"] }
evm-gasometer = { git = "https://github.com/rust-blockchain/evm", rev = "5fb8a4957c642134782e184c47f7d7b5a29f3629", default-features = false }
evm-runtime = { git = "https://github.com/rust-blockchain/evm", rev = "5fb8a4957c642134782e184c47f7d7b5a29f3629", default-features = false }
evm = { git = "https://github.com/rust-blockchain/evm", rev = "b436a7f4b34a1bc63857938f09a32ecd397537c9", default-features = false, features = ["with-codec"] }
evm-gasometer = { git = "https://github.com/rust-blockchain/evm", rev = "b436a7f4b34a1bc63857938f09a32ecd397537c9", default-features = false }
evm-runtime = { git = "https://github.com/rust-blockchain/evm", rev = "b436a7f4b34a1bc63857938f09a32ecd397537c9", default-features = false }
#evm = { version = "0.41.1", default-features = false, features = ["with-codec"] }
#evm-gasometer = { version = "0.41.0", default-features = false }
#evm-runtime = { version = "0.41.0", default-features = false }
Expand Down
9 changes: 4 additions & 5 deletions modules/evm/src/runner/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu
// EIP-3860
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return Err(ExitError::OutOfGas);
return Err(ExitError::CreateContractLimit);
}
return self
.state
Expand Down Expand Up @@ -542,7 +541,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return emit_exit!(ExitError::InitCodeLimit.into(), Vec::new());
return emit_exit!(ExitError::CreateContractLimit.into(), Vec::new());
}
}

Expand Down Expand Up @@ -583,7 +582,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return emit_exit!(ExitError::InitCodeLimit.into(), Vec::new());
return emit_exit!(ExitError::CreateContractLimit.into(), Vec::new());
}
}

Expand Down Expand Up @@ -642,7 +641,7 @@ impl<'config, 'precompiles, S: StackState<'config>, P: PrecompileSet> StackExecu
if init_code.len() > limit {
self.state.metadata_mut().gasometer.fail();
let _ = self.exit_substate(StackExitKind::Failed);
return emit_exit!(ExitError::InitCodeLimit.into(), Vec::new());
return emit_exit!(ExitError::CreateContractLimit.into(), Vec::new());
}
}

Expand Down

0 comments on commit 25f55c1

Please sign in to comment.