From 8aab71aa18f5ce7fd248b3a6262fc25dd541a09f Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 3 Sep 2018 09:22:57 +0200 Subject: [PATCH 1/8] update eip-1014 according to coredev decision --- EIPS/eip-1014.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index c2279255..da3db930 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -12,6 +12,8 @@ created: 2018-04-20 Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256(msg.sender ++ salt ++ init_code)[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +The coredev-call at 2018-08-10 decided to use option 3. + ### Motivation Allows interactions to (actually or counterfactually in channels) be made with addresses that do not exist yet on-chain but can be relied on to only possibly eventually contain code that has been created by a particular piece of init code. Important for state-channel use cases that involve counterfactual interactions with contracts. @@ -21,3 +23,17 @@ Allows interactions to (actually or counterfactually in channels) be made with a Use `keccak256(0xff ++ msg.sender ++ salt ++ init_code)[12:]` Rationale: ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as 0xff can only be a starting byte for RLP for data many petabytes long. + +#### Option 3 + +Use `sha3( 0xff ++ msg.sender ++ salt ++ sha3(init_code)))` + +Rationale: + +* Ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as `0xff` can only be a starting byte for RLP for data many petabytes long. +* Ensures that the hash preimage has a fixed size, + + +This also has the side-effect of being able to possibly reuse the `sha3(init_code)` from earlier calculation, either within a client or via `EXTCODEHASH` if the init-code is deployed on-chain. + + From 6985e8cc2827b8c7d9bafd1ff4eb7ddcfedae6d8 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Mon, 24 Sep 2018 17:41:30 +0200 Subject: [PATCH 2/8] Updates and examples --- EIPS/eip-1014.md | 67 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 14 deletions(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index da3db930..e1fb63b6 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -10,30 +10,69 @@ created: 2018-04-20 ### Specification -Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256(msg.sender ++ salt ++ init_code)[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. -The coredev-call at 2018-08-10 decided to use option 3. +The coredev-call at 2018-08-10 decided to use the formula above. ### Motivation Allows interactions to (actually or counterfactually in channels) be made with addresses that do not exist yet on-chain but can be relied on to only possibly eventually contain code that has been created by a particular piece of init code. Important for state-channel use cases that involve counterfactual interactions with contracts. -#### Option 2 - -Use `keccak256(0xff ++ msg.sender ++ salt ++ init_code)[12:]` - -Rationale: ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as 0xff can only be a starting byte for RLP for data many petabytes long. - -#### Option 3 - -Use `sha3( 0xff ++ msg.sender ++ salt ++ sha3(init_code)))` - -Rationale: +### Rationale about address formula * Ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as `0xff` can only be a starting byte for RLP for data many petabytes long. * Ensures that the hash preimage has a fixed size, +This also has the side-effect of being able to possibly reuse the `keccak256(init_code)` from earlier calculation, either within a client or via `EXTCODEHASH` if the init-code is deployed on-chain. -This also has the side-effect of being able to possibly reuse the `sha3(init_code)` from earlier calculation, either within a client or via `EXTCODEHASH` if the init-code is deployed on-chain. +### Clarifications + +The `initcode` is the code that, when executed, produces the runtime bytecode that will be placed into the state, and which typically is used by high level languages to implement a 'constructor'. + +This EIP makes collisions possible. The behaviour at collisions is specified by [EIP 684](https://github.com/ethereum/EIPs/issues/684): + +> If a contract creation is attempted, due to either a creation transaction or the CREATE (or future CREATE2) opcode, and the destination address already has either nonzero nonce, or nonempty code, then the creation throws immediately, with exactly the same behavior as would arise if the first byte in the init code were an invalid opcode. This applies retroactively starting from genesis. + +Specifically, if `nonce` or `code` is nonzero, then the create-operation fails. + +With [EIP 161](https://eips.ethereum.org/EIPS/eip-161) + +> Account creation transactions and the CREATE operation SHALL, prior to the execution of the initialisation code, increment the nonce over and above its normal starting value by one + +This means that if a contract is created in a transaction, the `nonce` is immediately non-zero, with the side-effect that a collision within the same transaction will always fail -- even if it's carried out from the `init_code` itself/ + +It should also be noted that `SELFDESTRUCT` has no immediate effect on `nonce` or `code`, thus a contract cannot be destroyed and recreated within one transaction. + +### Examples + + * address `0x0000000000000000000000000000000000000000` + * salt `0x0000000000000000000000000000000000000000000000000000000000000000` + * code `0x00` + * result: `0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38` + + * address `0xdeadbeef00000000000000000000000000000000` + * salt `0x0000000000000000000000000000000000000000000000000000000000000000` + * code `0x00` + * result: `0xB928f69Bb1D91Cd65274e3c79d8986362984fDA3` + + * address `0xdeadbeef00000000000000000000000000000000` + * salt `0x000000000000000000000000feed000000000000000000000000000000000000` + * code `0x00` + * result: `0xD04116cDd17beBE565EB2422F2497E06cC1C9833` + + * address `0x0000000000000000000000000000000000000000` + * salt `0x0000000000000000000000000000000000000000000000000000000000000000` + * code `0xdeadbeef` + * result: `0x70f2b2914A2a4b783FaEFb75f459A580616Fcb5e` + + * address `0x00000000000000000000000000000000deadbeef` + * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` + * code `0xdeadbeef` + * result: `0x60f3f640a8508fC6a86d45DF051962668E1e8AC7` + + * address `0x00000000000000000000000000000000deadbeef` + * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` + * code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` + * result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` From f6775aa3b01d06523bcc594834374b0ed918ef70 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 28 Sep 2018 11:08:11 +0200 Subject: [PATCH 3/8] comment about salt --- EIPS/eip-1014.md | 57 +++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 25 deletions(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index e1fb63b6..fe78c759 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -10,10 +10,11 @@ created: 2018-04-20 ### Specification -Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. +Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. The `salt` is a 32-byte stack item. The coredev-call at 2018-08-10 decided to use the formula above. + ### Motivation Allows interactions to (actually or counterfactually in channels) be made with addresses that do not exist yet on-chain but can be relied on to only possibly eventually contain code that has been created by a particular piece of init code. Important for state-channel use cases that involve counterfactual interactions with contracts. @@ -45,34 +46,40 @@ It should also be noted that `SELFDESTRUCT` has no immediate effect on `nonce` o ### Examples - * address `0x0000000000000000000000000000000000000000` - * salt `0x0000000000000000000000000000000000000000000000000000000000000000` - * code `0x00` - * result: `0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38` +Example 0 +* address `0x0000000000000000000000000000000000000000` +* salt `0x0000000000000000000000000000000000000000000000000000000000000000` +* code `0x00` +* result: `0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38` - * address `0xdeadbeef00000000000000000000000000000000` - * salt `0x0000000000000000000000000000000000000000000000000000000000000000` - * code `0x00` - * result: `0xB928f69Bb1D91Cd65274e3c79d8986362984fDA3` +Example 1 +* address `0xdeadbeef00000000000000000000000000000000` +* salt `0x0000000000000000000000000000000000000000000000000000000000000000` +* code `0x00` +* result: `0xB928f69Bb1D91Cd65274e3c79d8986362984fDA3` - * address `0xdeadbeef00000000000000000000000000000000` - * salt `0x000000000000000000000000feed000000000000000000000000000000000000` - * code `0x00` - * result: `0xD04116cDd17beBE565EB2422F2497E06cC1C9833` +Example 2 +* address `0xdeadbeef00000000000000000000000000000000` +* salt `0x000000000000000000000000feed000000000000000000000000000000000000` +* code `0x00` +* result: `0xD04116cDd17beBE565EB2422F2497E06cC1C9833` - * address `0x0000000000000000000000000000000000000000` - * salt `0x0000000000000000000000000000000000000000000000000000000000000000` - * code `0xdeadbeef` - * result: `0x70f2b2914A2a4b783FaEFb75f459A580616Fcb5e` +Example 3 +* address `0x0000000000000000000000000000000000000000` +* salt `0x0000000000000000000000000000000000000000000000000000000000000000` +* code `0xdeadbeef` +* result: `0x70f2b2914A2a4b783FaEFb75f459A580616Fcb5e` - * address `0x00000000000000000000000000000000deadbeef` - * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` - * code `0xdeadbeef` - * result: `0x60f3f640a8508fC6a86d45DF051962668E1e8AC7` +Example 4 +* address `0x00000000000000000000000000000000deadbeef` +* salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` +* code `0xdeadbeef` +* result: `0x60f3f640a8508fC6a86d45DF051962668E1e8AC7` - * address `0x00000000000000000000000000000000deadbeef` - * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` - * code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` - * result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` +Example 5 +* address `0x00000000000000000000000000000000deadbeef` +* salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` +* code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` +* result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` From 344dd2b1cc4efa0df87eeaced42fc72cfc2e211e Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 28 Sep 2018 11:11:24 +0200 Subject: [PATCH 4/8] minor fix --- EIPS/eip-1014.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index fe78c759..bf0b2197 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -10,7 +10,7 @@ created: 2018-04-20 ### Specification -Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. The `salt` is a 32-byte stack item. +Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. The `salt` is a 32-byte stack item. The coredev-call at 2018-08-10 decided to use the formula above. From 0e1a240f04d056ed6088ca4c710308c4a74f9992 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 28 Sep 2018 12:17:11 +0200 Subject: [PATCH 5/8] add example of empty code --- EIPS/eip-1014.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index bf0b2197..b0467629 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -82,4 +82,8 @@ Example 5 * code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` * result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` - +Example 6 +* address `0x0000000000000000000000000000000000000000` +* salt `0x0000000000000000000000000000000000000000000000000000000000000000` +* code `0x` +* result: `0xE33C0C7F7df4809055C3ebA6c09CFe4BaF1BD9e0` From 53c72c6f136a4441d6fffcbf62b30468d2487cec Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Sun, 30 Sep 2018 13:57:01 +0200 Subject: [PATCH 6/8] fix reviewer comments --- EIPS/eip-1014.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index b0467629..52523ca3 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -10,7 +10,9 @@ created: 2018-04-20 ### Specification -Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. The `salt` is a 32-byte stack item. +Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. + +`0xff` is included as a single byte, `address` is always `20` bytes, `salt` is always `32` bytes (a stack item). The preimage for the final hashing round is thus always exactly `85` bytes long. The coredev-call at 2018-08-10 decided to use the formula above. @@ -24,7 +26,6 @@ Allows interactions to (actually or counterfactually in channels) be made with a * Ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as `0xff` can only be a starting byte for RLP for data many petabytes long. * Ensures that the hash preimage has a fixed size, -This also has the side-effect of being able to possibly reuse the `keccak256(init_code)` from earlier calculation, either within a client or via `EXTCODEHASH` if the init-code is deployed on-chain. ### Clarifications @@ -49,13 +50,13 @@ It should also be noted that `SELFDESTRUCT` has no immediate effect on `nonce` o Example 0 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` -* code `0x00` +* init_code `0x00` * result: `0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38` Example 1 * address `0xdeadbeef00000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` -* code `0x00` +* init_code `0x00` * result: `0xB928f69Bb1D91Cd65274e3c79d8986362984fDA3` Example 2 @@ -67,23 +68,23 @@ Example 2 Example 3 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` -* code `0xdeadbeef` +* init_code `0xdeadbeef` * result: `0x70f2b2914A2a4b783FaEFb75f459A580616Fcb5e` Example 4 * address `0x00000000000000000000000000000000deadbeef` * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` -* code `0xdeadbeef` +* init_code `0xdeadbeef` * result: `0x60f3f640a8508fC6a86d45DF051962668E1e8AC7` Example 5 * address `0x00000000000000000000000000000000deadbeef` * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` -* code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` +* init_code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` * result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` Example 6 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` -* code `0x` +* init_code `0x` * result: `0xE33C0C7F7df4809055C3ebA6c09CFe4BaF1BD9e0` From edf0f1cafcee0eeb09ce66a131a2f3c279c43411 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 2 Oct 2018 13:54:42 +0200 Subject: [PATCH 7/8] eip1014: add cost-per-byte to CREATE2 --- EIPS/eip-1014.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index 52523ca3..2c98c39e 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -12,7 +12,13 @@ created: 2018-04-20 Adds a new opcode at 0xf5, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to CREATE, except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code)))[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at. -`0xff` is included as a single byte, `address` is always `20` bytes, `salt` is always `32` bytes (a stack item). The preimage for the final hashing round is thus always exactly `85` bytes long. +The `CREATE2` has the same `gas` schema as `CREATE`, but also an extra `hashcost` of `GSHA3WORD * ceil(len(init_code) / 32)`, to account for the hashing that must be performed. The `hashcost` is deducted at the same time as memory-expansion gas and `CreateGas` is deducted: _before_ evaluation of the resulting address and the execution of `init_code`. + +- `0xff` is a single byte, +- `address` is always `20` bytes, +- `salt` is always `32` bytes (a stack item). + +The preimage for the final hashing round is thus always exactly `85` bytes long. The coredev-call at 2018-08-10 decided to use the formula above. @@ -21,15 +27,20 @@ The coredev-call at 2018-08-10 decided to use the formula above. Allows interactions to (actually or counterfactually in channels) be made with addresses that do not exist yet on-chain but can be relied on to only possibly eventually contain code that has been created by a particular piece of init code. Important for state-channel use cases that involve counterfactual interactions with contracts. -### Rationale about address formula +### Rationale + +#### Address formula * Ensures that addresses created with this scheme cannot collide with addresses created using the traditional `keccak256(rlp([sender, nonce]))` formula, as `0xff` can only be a starting byte for RLP for data many petabytes long. * Ensures that the hash preimage has a fixed size, +#### Gas cost + +Since address calculation depends on hashing the `init_code`, it would leave clients open to DoS attacks if executions could repeatedly cause hashing of large pieces of `init_code`, since expansion of memory is paid for only once. This EIP uses the same cost-per-word as the `SHA3` opcode. ### Clarifications -The `initcode` is the code that, when executed, produces the runtime bytecode that will be placed into the state, and which typically is used by high level languages to implement a 'constructor'. +The `init_code` is the code that, when executed, produces the runtime bytecode that will be placed into the state, and which typically is used by high level languages to implement a 'constructor'. This EIP makes collisions possible. The behaviour at collisions is specified by [EIP 684](https://github.com/ethereum/EIPs/issues/684): From b3fb4ea6eb90e1cb9fe5566ca624b48ce27422c3 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Tue, 2 Oct 2018 14:18:07 +0200 Subject: [PATCH 8/8] eip1014: added gas to examples --- EIPS/eip-1014.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EIPS/eip-1014.md b/EIPS/eip-1014.md index 2c98c39e..dc3aac23 100644 --- a/EIPS/eip-1014.md +++ b/EIPS/eip-1014.md @@ -62,40 +62,48 @@ Example 0 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` * init_code `0x00` +* gas (assuming no mem expansion): `32006` * result: `0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38` Example 1 * address `0xdeadbeef00000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` * init_code `0x00` +* gas (assuming no mem expansion): `32006` * result: `0xB928f69Bb1D91Cd65274e3c79d8986362984fDA3` Example 2 * address `0xdeadbeef00000000000000000000000000000000` * salt `0x000000000000000000000000feed000000000000000000000000000000000000` -* code `0x00` +* init_code `0x00` +* gas (assuming no mem expansion): `32006` * result: `0xD04116cDd17beBE565EB2422F2497E06cC1C9833` Example 3 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` * init_code `0xdeadbeef` +* gas (assuming no mem expansion): `32006` * result: `0x70f2b2914A2a4b783FaEFb75f459A580616Fcb5e` Example 4 * address `0x00000000000000000000000000000000deadbeef` * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` * init_code `0xdeadbeef` +* gas (assuming no mem expansion): `32006` * result: `0x60f3f640a8508fC6a86d45DF051962668E1e8AC7` Example 5 * address `0x00000000000000000000000000000000deadbeef` * salt `0x00000000000000000000000000000000000000000000000000000000cafebabe` * init_code `0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef` +* gas (assuming no mem expansion): `32012` * result: `0x1d8bfDC5D46DC4f61D6b6115972536eBE6A8854C` Example 6 * address `0x0000000000000000000000000000000000000000` * salt `0x0000000000000000000000000000000000000000000000000000000000000000` * init_code `0x` +* gas (assuming no mem expansion): `32000` * result: `0xE33C0C7F7df4809055C3ebA6c09CFe4BaF1BD9e0` +