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

Commit d8fbf80

Browse files
committed
core/vm: add wrapper functions for all opcodes, all versions
- for each opcode and each version, assign corresponding wrapper based on the version and opcodeName - vm/jump_table/ExportInstructionSet: export instruction set attributes based on input version for generating codes, including unsupported instructions of different versions for dummy wrappers - vm/interpreter: if not debug mode, call wrapper instead of execute opcodes directly
1 parent 336d0a5 commit d8fbf80

12 files changed

+19621
-620
lines changed

core/vm/eips.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ func enable1884(jt *JumpTable) {
7171

7272
// New opcode
7373
jt[SELFBALANCE] = &operation{
74+
opcodeName: "opSelfBalance",
7475
execute: opSelfBalance,
7576
constantGas: GasFastStep,
7677
minStack: minStack(0, 1),
@@ -89,6 +90,7 @@ func opSelfBalance(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
8990
func enable1344(jt *JumpTable) {
9091
// New opcode
9192
jt[CHAINID] = &operation{
93+
opcodeName: "opChainID",
9294
execute: opChainID,
9395
constantGas: GasQuickStep,
9496
minStack: minStack(0, 1),
@@ -161,6 +163,7 @@ func enable3529(jt *JumpTable) {
161163
func enable3198(jt *JumpTable) {
162164
// New opcode
163165
jt[BASEFEE] = &operation{
166+
opcodeName: "opBaseFee",
164167
execute: opBaseFee,
165168
constantGas: GasQuickStep,
166169
minStack: minStack(0, 1),

0 commit comments

Comments
 (0)