Skip to content

Commit

Permalink
Merge branch 'feat/prague-hard-fork' into feat/eip-7702
Browse files Browse the repository at this point in the history
  • Loading branch information
mrLSD committed Oct 15, 2024
2 parents e85303d + 3c30259 commit 1e0cb99
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 113 deletions.
11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ keywords.workspace = true
edition.workspace = true

[workspace.dependencies]
evm = { version = "0.45.2", path = "." }
evm-core = { version = "0.45.2", path = "core", default-features = false }
evm-gasometer = { version = "0.45.2", path = "gasometer", default-features = false }
evm-runtime = { version = "0.45.2", path = "runtime", default-features = false }
evm = { version = "0.46.0", path = "." }
evm-core = { version = "0.46.0", path = "core", default-features = false }
evm-gasometer = { version = "0.46.0", path = "gasometer", default-features = false }
evm-runtime = { version = "0.46.0", path = "runtime", default-features = false }
primitive-types = { version = "0.12", default-features = false }
auto_impl = "1.0"
sha3 = { version = "0.10", default-features = false }
Expand All @@ -22,6 +22,7 @@ ethereum = { version = "0.15", default-features = false }
log = { version = "0.4", default-features = false }
primitive-types = { workspace = true, features = ["rlp"] }
rlp = { version = "0.5", default-features = false }
smallvec = "1.13"

# Optional dependencies
environmental = { version = "1.1.2", default-features = false, optional = true }
Expand Down Expand Up @@ -87,7 +88,7 @@ create-fixed = []
print-debug = ["evm-gasometer/print-debug"]

[workspace.package]
version = "0.45.2"
version = "0.46.0"
license = "Apache-2.0"
authors = ["Aurora Labs <[email protected]>", "Wei Tang <[email protected]>", "Parity Technologies <[email protected]>"]
description = "Portable Ethereum Virtual Machine implementation written in pure Rust."
Expand Down
13 changes: 11 additions & 2 deletions runtime/src/eval/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,17 @@ pub fn create<H: Handler>(runtime: &mut Runtime, is_create2: bool, handler: &mut
};

match handler.create(runtime.context.address, scheme, value, code, None) {
Capture::Exit((reason, address, return_data)) => {
match super::finish_create(runtime, reason, address, return_data) {
Capture::Exit((reason, return_data)) => {
// The `Capture::Exit` case used to always have `address: None` because it was only returned when
// the call to `create_inner` encountered an error and therefore no contract was created. The happy
// path is returning `Capture::Trap` and `finish_create` ends up being called later
// with the created address as part of the EVM call stack handling logic.
// And it means that the `Capture::Exit` case only happens if there was an error - `ExitError`.
debug_assert!(
reason.is_error(),
"ExitReason for finish_create should be only ExitError"
);
match super::finish_create(runtime, reason, None, return_data) {
Ok(()) => Control::Continue,
Err(e) => Control::Exit(e),
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub trait Handler {
value: U256,
init_code: Vec<u8>,
target_gas: Option<u64>,
) -> Capture<(ExitReason, Option<H160>, Vec<u8>), Self::CreateInterrupt>;
) -> Capture<(ExitReason, Vec<u8>), Self::CreateInterrupt>;
/// Feed in create feedback.
///
/// # Errors
Expand Down
Loading

0 comments on commit 1e0cb99

Please sign in to comment.