disable EIP-2315: Simple Subroutines for the EVM

reason: not included in berlin hard fork
This commit is contained in:
jangko 2021-05-16 19:31:13 +07:00
parent 6fc3df637c
commit 3ccc4642f2
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 15 additions and 5 deletions

View File

@ -231,9 +231,12 @@ let IstanbulOpDispatch {.compileTime.}: array[Op, NimNode] = genIstanbulJumpTabl
proc genBerlinJumpTable(ops: array[Op, NimNode]): array[Op, NimNode] {.compileTime.} = proc genBerlinJumpTable(ops: array[Op, NimNode]): array[Op, NimNode] {.compileTime.} =
result = ops result = ops
result[BeginSub] = newIdentNode "beginSub" # EIP-2315: temporary disabled
result[ReturnSub] = newIdentNode "returnSub" # Reason : not included in berlin hard fork
result[JumpSub] = newIdentNode "jumpSub"
#result[BeginSub] = newIdentNode "beginSub"
#result[ReturnSub] = newIdentNode "returnSub"
#result[JumpSub] = newIdentNode "jumpSub"
result[Balance] = newIdentNode "balanceEIP2929" result[Balance] = newIdentNode "balanceEIP2929"
result[ExtCodeHash] = newIdentNode "extCodeHashEIP2929" result[ExtCodeHash] = newIdentNode "extCodeHashEIP2929"

View File

@ -433,8 +433,11 @@ const
info: "Mark a valid destination for jumps", info: "Mark a valid destination for jumps",
exec: (prep: vm2OpIgnore, exec: (prep: vm2OpIgnore,
run: jumpDestOp, run: jumpDestOp,
post: vm2OpIgnore)), post: vm2OpIgnore))]
#[
EIP-2315: temporary disabled
Reason : not included in berlin hard fork
(opCode: BeginSub, ## 0x5c, Begin subroutine (opCode: BeginSub, ## 0x5c, Begin subroutine
forks: Vm2OpBerlinAndLater, forks: Vm2OpBerlinAndLater,
name: "beginSub", name: "beginSub",
@ -458,6 +461,7 @@ const
exec: (prep: vm2OpIgnore, exec: (prep: vm2OpIgnore,
run: jumpSubOp, run: jumpSubOp,
post: vm2OpIgnore))] post: vm2OpIgnore))]
]#
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# End # End

View File

@ -175,7 +175,9 @@ proc opMiscMain*() =
memory: memory:
"0xA0B0C0D0E0F0A1B1C1D1E1F1A2B2C2D2E2F2A3B3C3D3E3F3A4B4C4D4E4F4A1B1" "0xA0B0C0D0E0F0A1B1C1D1E1F1A2B2C2D2E2F2A3B3C3D3E3F3A4B4C4D4E4F4A1B1"
"0x00" "0x00"
#[
EIP-2315: Simple Subroutines for the EVM
disabled reason: not included in Berlin hard fork
assembler: assembler:
title: "Simple routine" title: "Simple routine"
code: code:
@ -271,6 +273,7 @@ proc opMiscMain*() =
fork: berlin fork: berlin
stack: stack:
"0x06" "0x06"
]#
when isMainModule: when isMainModule:
opMiscMain() opMiscMain()