-
Notifications
You must be signed in to change notification settings - Fork 655
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relates to #1104
- Loading branch information
Showing
7 changed files
with
140 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,35 @@ | ||
import copy | ||
from cytoolz import ( | ||
merge | ||
) | ||
|
||
from eth import ( | ||
constants | ||
) | ||
from eth.vm import ( | ||
mnemonics, | ||
opcode_values, | ||
) | ||
from eth.vm.forks.byzantium.opcodes import ( | ||
BYZANTIUM_OPCODES | ||
) | ||
from eth.vm.logic import ( | ||
arithmetic | ||
) | ||
from eth.vm.opcode import ( | ||
as_opcode | ||
) | ||
|
||
|
||
UPDATED_OPCODES = { | ||
opcode_values.SHL: as_opcode( | ||
logic_fn=arithmetic.shl, | ||
mnemonic=mnemonics.SHL, | ||
gas_cost=constants.GAS_VERYLOW, | ||
), | ||
} | ||
|
||
CONSTANTINOPLE_OPCODES = copy.deepcopy(BYZANTIUM_OPCODES) | ||
CONSTANTINOPLE_OPCODES = merge( | ||
copy.deepcopy(BYZANTIUM_OPCODES), | ||
UPDATED_OPCODES, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ | |
MULMOD = 'MULMOD' | ||
EXP = 'EXP' | ||
SIGNEXTEND = 'SIGNEXTEND' | ||
SHL = 'SHL' | ||
# | ||
# Comparisons | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ | |
XOR = 0x18 | ||
NOT = 0x19 | ||
BYTE = 0x1a | ||
SHL = 0x1b | ||
|
||
|
||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters