Skip to content
This repository was archived by the owner on Nov 6, 2020. It is now read-only.

Commit ac64b90

Browse files
sorpaasandresilva
authored andcommitted
Add EIP-1014 transition config flag (#9268)
* Add EIP-1014 transition config flag * Remove EIP-86 configs * Change CREATE2 opcode index to 0xf5 * Move salt to the last item in the stack * Change sendersaltandaddress scheme to comply with current EIP-1014 * Fix json configs * Fix create2 test * Fix deprecated comments
1 parent a71b555 commit ac64b90

32 files changed

+32
-66
lines changed

ethcore/evm/src/instructions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ enum_with_from_u8! {
326326
#[doc = "like CALLCODE but keeps caller's value and sender"]
327327
DELEGATECALL = 0xf4,
328328
#[doc = "create a new account and set creation address to sha3(sender + sha3(init code)) % 2**160"]
329-
CREATE2 = 0xfb,
329+
CREATE2 = 0xf5,
330330
#[doc = "stop execution and revert state changes. Return output data."]
331331
REVERT = 0xfd,
332332
#[doc = "like CALL but it does not take value, nor modify the state"]

ethcore/evm/src/interpreter/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,13 @@ impl<Cost: CostType> Interpreter<Cost> {
316316
},
317317
instructions::CREATE | instructions::CREATE2 => {
318318
let endowment = stack.pop_back();
319+
let init_off = stack.pop_back();
320+
let init_size = stack.pop_back();
319321
let address_scheme = match instruction {
320322
instructions::CREATE => CreateContractAddress::FromSenderAndNonce,
321323
instructions::CREATE2 => CreateContractAddress::FromSenderSaltAndCodeHash(stack.pop_back().into()),
322324
_ => unreachable!("instruction can only be CREATE/CREATE2 checked above; qed"),
323325
};
324-
let init_off = stack.pop_back();
325-
let init_size = stack.pop_back();
326326

327327
let create_gas = provided.expect("`provided` comes through Self::exec from `Gasometer::get_gas_cost_mem`; `gas_gas_mem_cost` guarantees `Some` when instruction is `CALL`/`CALLCODE`/`DELEGATECALL`/`CREATE`; this is `CREATE`; qed");
328328

ethcore/light/src/client/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,6 @@ pub trait LightChainClient: Send + Sync {
127127
/// Get the `i`th CHT root.
128128
fn cht_root(&self, i: usize) -> Option<H256>;
129129

130-
/// Get the EIP-86 transition block number.
131-
fn eip86_transition(&self) -> BlockNumber;
132-
133130
/// Get a report of import activity since the last call.
134131
fn report(&self) -> ClientReport;
135132
}
@@ -585,10 +582,6 @@ impl<T: ChainDataFetcher> LightChainClient for Client<T> {
585582
Client::cht_root(self, i)
586583
}
587584

588-
fn eip86_transition(&self) -> BlockNumber {
589-
self.engine().params().eip86_transition
590-
}
591-
592585
fn report(&self) -> ClientReport {
593586
Client::report(self)
594587
}

ethcore/res/ethereum/classic.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"eip161abcTransition": "0x7fffffffffffffff",
3232
"eip161dTransition": "0x7fffffffffffffff",
3333
"eip155Transition": 3000000,
34-
"eip98Transition": "0x7fffffffffffff",
35-
"eip86Transition": "0x7fffffffffffff"
34+
"eip98Transition": "0x7fffffffffffff"
3635
},
3736
"genesis": {
3837
"seal": {

ethcore/res/ethereum/easthub.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"eip155Transition": "0x0",
2828
"eip161abcTransition": "0x7fffffffffffffff",
2929
"eip161dTransition": "0x7fffffffffffffff",
30-
"eip98Transition": "0x7fffffffffffff",
31-
"eip86Transition": "0x7fffffffffffff"
30+
"eip98Transition": "0x7fffffffffffff"
3231
},
3332
"genesis": {
3433
"seal": {

ethcore/res/ethereum/eip150_test.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"eip161abcTransition": "0x7fffffffffffffff",
2424
"eip161dTransition": "0x7fffffffffffffff",
2525
"eip98Transition": "0x7fffffffffffffff",
26-
"eip86Transition": "0x7fffffffffffffff",
2726
"eip155Transition": "0x7fffffffffffffff",
2827
"maxCodeSize": 24576,
2928
"maxCodeSizeTransition": "0x7fffffffffffffff"

ethcore/res/ethereum/eip161_test.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"eip161abcTransition": "0x0",
2424
"eip161dTransition": "0x0",
2525
"eip98Transition": "0x7fffffffffffffff",
26-
"eip86Transition": "0x7fffffffffffffff",
2726
"eip155Transition": "0x7fffffffffffffff",
2827
"maxCodeSize": 24576,
2928
"maxCodeSizeTransition": "0x0"

ethcore/res/ethereum/ellaism.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
"eip161dTransition": "0x7fffffffffffffff",
3030
"eip155Transition": "0x0",
3131
"eip98Transition": "0x7fffffffffffff",
32-
"eip86Transition": "0x7fffffffffffff",
3332
"wasmActivationTransition": 2000000,
3433
"eip140Transition": 2000000,
3534
"eip211Transition": 2000000,

ethcore/res/ethereum/expanse.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"eip161abcTransition": "0x927C0",
3939
"eip161dTransition": "0x927C0",
4040
"eip98Transition": "0x7fffffffffffff",
41-
"eip86Transition": "0x7fffffffffffff",
4241
"eip155Transition": "0x927C0",
4342
"eip140Transition": "0xC3500",
4443
"eip211Transition": "0xC3500",

ethcore/res/ethereum/foundation.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@
150150
"eip161dTransition": 2675000,
151151
"eip155Transition": 2675000,
152152
"eip98Transition": "0x7fffffffffffff",
153-
"eip86Transition": "0x7fffffffffffff",
154153
"maxCodeSize": 24576,
155154
"maxCodeSizeTransition": 2675000,
156155
"eip140Transition": 4370000,

0 commit comments

Comments
 (0)