@@ -60,15 +60,27 @@ var (
6060 spuriousDragonInstructionSet = newSpuriousDragonInstructionSet ()
6161 byzantiumInstructionSet = newByzantiumInstructionSet ()
6262 constantinopleInstructionSet = newConstantinopleInstructionSet ()
63+ istanbulInstructionSet = newIstanbulInstructionSet ()
6364)
6465
6566// JumpTable contains the EVM opcodes supported at a given fork.
6667type JumpTable [256 ]operation
6768
68- // NewConstantinopleInstructionSet returns the frontier, homestead
69+ // newIstanbulInstructionSet returns the frontier, homestead
70+ // byzantium, contantinople and petersburg instructions.
71+ func newIstanbulInstructionSet () JumpTable {
72+ instructionSet := newConstantinopleInstructionSet ()
73+
74+ enable1344 (& instructionSet ) // ChainID opcode - https://eips.ethereum.org/EIPS/eip-1344
75+ enable1884 (& instructionSet ) // Reprice reader opcodes - https://eips.ethereum.org/EIPS/eip-1884
76+ enable2200 (& instructionSet ) // Net metered SSTORE - https://eips.ethereum.org/EIPS/eip-2200
77+
78+ return instructionSet
79+ }
80+
81+ // newConstantinopleInstructionSet returns the frontier, homestead
6982// byzantium and contantinople instructions.
7083func newConstantinopleInstructionSet () JumpTable {
71- // instructions that can be executed during the byzantium phase.
7284 instructionSet := newByzantiumInstructionSet ()
7385 instructionSet [SHL ] = operation {
7486 execute : opSHL ,
@@ -112,10 +124,9 @@ func newConstantinopleInstructionSet() JumpTable {
112124 return instructionSet
113125}
114126
115- // NewByzantiumInstructionSet returns the frontier, homestead and
127+ // newByzantiumInstructionSet returns the frontier, homestead and
116128// byzantium instructions.
117129func newByzantiumInstructionSet () JumpTable {
118- // instructions that can be executed during the homestead phase.
119130 instructionSet := newSpuriousDragonInstructionSet ()
120131 instructionSet [STATICCALL ] = operation {
121132 execute : opStaticCall ,
@@ -177,7 +188,7 @@ func newTangerineWhistleInstructionSet() JumpTable {
177188 return instructionSet
178189}
179190
180- // NewHomesteadInstructionSet returns the frontier and homestead
191+ // newHomesteadInstructionSet returns the frontier and homestead
181192// instructions that can be executed during the homestead phase.
182193func newHomesteadInstructionSet () JumpTable {
183194 instructionSet := newFrontierInstructionSet ()
@@ -194,7 +205,7 @@ func newHomesteadInstructionSet() JumpTable {
194205 return instructionSet
195206}
196207
197- // NewFrontierInstructionSet returns the frontier instructions
208+ // newFrontierInstructionSet returns the frontier instructions
198209// that can be executed during the frontier phase.
199210func newFrontierInstructionSet () JumpTable {
200211 return JumpTable {
0 commit comments