Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused EIP-2537 and EIP-2315 #2296

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove unused EIP-2537 and EIP-2315
  • Loading branch information
jangko committed Jun 5, 2024
commit b34dcbbc39f53193da805a83e3072ab9e90f905e
3 changes: 2 additions & 1 deletion nimbus/core/eip4844.nim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import
results,
stint,
../constants,
../common/common
../common/common,
blscurve/bls_backend # trigger blscurve library compilation

{.push raises: [].}

Expand Down
210 changes: 0 additions & 210 deletions nimbus/evm/blscurve.nim

This file was deleted.

72 changes: 0 additions & 72 deletions nimbus/evm/interpreter/op_handlers/oph_memory.nim
Original file line number Diff line number Diff line change
Expand Up @@ -318,50 +318,6 @@ const

k.cpt.memory.copy(dstPos, srcPos, len)

#[
EIP-2315: temporary disabled
Reason : not included in berlin hard fork
beginSubOp: Vm2OpFn = proc (k: var Vm2Ctx) =
## 0x5c, Marks the entry point to a subroutine
raise newException(
OutOfGas,
"Abort: Attempt to execute BeginSub opcode")


returnSubOp: Vm2OpFn = proc (k: var Vm2Ctx) =
## 0x5d, Returns control to the caller of a subroutine.
if k.cpt.returnStack.len == 0:
raise newException(
OutOfGas,
"Abort: invalid returnStack during ReturnSub")
k.cpt.code.pc = k.cpt.returnStack.pop()


jumpSubOp: Vm2OpFn = proc (k: var Vm2Ctx) =
## 0x5e, Transfers control to a subroutine.
let (jumpTarget) = k.cpt.stack.popInt(1)

if jumpTarget >= k.cpt.code.len.u256:
raise newException(
InvalidJumpDestination, "JumpSub destination exceeds code len")

let returnPC = k.cpt.code.pc
let jt = jumpTarget.truncate(int)
k.cpt.code.pc = jt

let nextOpcode = k.cpt.code.peek
if nextOpcode != BeginSub:
raise newException(
InvalidJumpDestination, "Invalid JumpSub destination")

if k.cpt.returnStack.len == 1023:
raise newException(
FullStack, "Out of returnStack")

k.cpt.returnStack.add returnPC
inc k.cpt.code.pc
]#

# ------------------------------------------------------------------------------
# Public, op exec table entries
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -532,34 +488,6 @@ const
run: mCopyOp,
post: vm2OpIgnore))]

#[
EIP-2315: temporary disabled
Reason : not included in berlin hard fork
(opCode: BeginSub, ## 0x5c, Begin subroutine
forks: Vm2OpBerlinAndLater,
name: "beginSub",
info: " Marks the entry point to a subroutine",
exec: (prep: vm2OpIgnore,
run: beginSubOp,
post: vm2OpIgnore)),

(opCode: ReturnSub, ## 0x5d, Return
forks: Vm2OpBerlinAndLater,
name: "returnSub",
info: "Returns control to the caller of a subroutine",
exec: (prep: vm2OpIgnore,
run: returnSubOp,
post: vm2OpIgnore)),

(opCode: JumpSub, ## 0x5e, Call subroutine
forks: Vm2OpBerlinAndLater,
name: "jumpSub",
info: "Transfers control to a subroutine",
exec: (prep: vm2OpIgnore,
run: jumpSubOp,
post: vm2OpIgnore))]
]#

# ------------------------------------------------------------------------------
# End
# ------------------------------------------------------------------------------
Loading
Loading