@@ -60,15 +60,27 @@ var (
60
60
spuriousDragonInstructionSet = newSpuriousDragonInstructionSet ()
61
61
byzantiumInstructionSet = newByzantiumInstructionSet ()
62
62
constantinopleInstructionSet = newConstantinopleInstructionSet ()
63
+ istanbulInstructionSet = newIstanbulInstructionSet ()
63
64
)
64
65
65
66
// JumpTable contains the EVM opcodes supported at a given fork.
66
67
type JumpTable [256 ]operation
67
68
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
69
82
// byzantium and contantinople instructions.
70
83
func newConstantinopleInstructionSet () JumpTable {
71
- // instructions that can be executed during the byzantium phase.
72
84
instructionSet := newByzantiumInstructionSet ()
73
85
instructionSet [SHL ] = operation {
74
86
execute : opSHL ,
@@ -112,10 +124,9 @@ func newConstantinopleInstructionSet() JumpTable {
112
124
return instructionSet
113
125
}
114
126
115
- // NewByzantiumInstructionSet returns the frontier, homestead and
127
+ // newByzantiumInstructionSet returns the frontier, homestead and
116
128
// byzantium instructions.
117
129
func newByzantiumInstructionSet () JumpTable {
118
- // instructions that can be executed during the homestead phase.
119
130
instructionSet := newSpuriousDragonInstructionSet ()
120
131
instructionSet [STATICCALL ] = operation {
121
132
execute : opStaticCall ,
@@ -177,7 +188,7 @@ func newTangerineWhistleInstructionSet() JumpTable {
177
188
return instructionSet
178
189
}
179
190
180
- // NewHomesteadInstructionSet returns the frontier and homestead
191
+ // newHomesteadInstructionSet returns the frontier and homestead
181
192
// instructions that can be executed during the homestead phase.
182
193
func newHomesteadInstructionSet () JumpTable {
183
194
instructionSet := newFrontierInstructionSet ()
@@ -194,7 +205,7 @@ func newHomesteadInstructionSet() JumpTable {
194
205
return instructionSet
195
206
}
196
207
197
- // NewFrontierInstructionSet returns the frontier instructions
208
+ // newFrontierInstructionSet returns the frontier instructions
198
209
// that can be executed during the frontier phase.
199
210
func newFrontierInstructionSet () JumpTable {
200
211
return JumpTable {
0 commit comments