EIP-1153 spec update: change opcode value
This commit is contained in:
parent
26a8759c34
commit
ab4a1a141b
|
@ -626,9 +626,10 @@ template gasCosts(fork: EVMFork, prefix, ResultGasCostsName: untyped) =
|
|||
Msize: fixed GasBase,
|
||||
Gas: fixed GasBase,
|
||||
JumpDest: fixed GasJumpDest,
|
||||
BeginSub: fixed GasBase,
|
||||
ReturnSub: fixed GasLow,
|
||||
JumpSub: fixed GasHigh,
|
||||
|
||||
# 5c & 5d: Transient storage operations
|
||||
Tload: fixed GasWarmStorageRead,
|
||||
Tstore: fixed GasWarmStorageRead,
|
||||
|
||||
# 5f, 60s & 70s: Push Operations
|
||||
Push0: fixed GasBase,
|
||||
|
@ -708,10 +709,6 @@ template gasCosts(fork: EVMFork, prefix, ResultGasCostsName: untyped) =
|
|||
Log3: memExpansion `prefix gasLog3`,
|
||||
Log4: memExpansion `prefix gasLog4`,
|
||||
|
||||
# b0s: Transient storage operations
|
||||
Tload: fixed GasWarmStorageRead,
|
||||
Tstore: fixed GasWarmStorageRead,
|
||||
|
||||
# f0s: System operations
|
||||
Create: complex `prefix gasCreate`,
|
||||
Call: complex `prefix gasCall`,
|
||||
|
|
|
@ -127,9 +127,10 @@ type
|
|||
JumpDest = 0x5b, ## Mark a valid destination for jumps. This
|
||||
## operation has no effect on machine state during
|
||||
## execution.
|
||||
BeginSub = 0x5c, ## Marks the entry point to a subroutine
|
||||
ReturnSub = 0x5d, ## Returns control to the caller of a subroutine.
|
||||
JumpSub = 0x5e, ## Transfers control to a subroutine.
|
||||
Tload = 0x5c, ## Load word from transient storage.
|
||||
Tstore = 0x5d, ## Save word to transient storage.
|
||||
|
||||
Nop0x5E = 0x5e, ## Transfers control to a subroutine.
|
||||
|
||||
# 5f, 60s & 70s: Push Operations.
|
||||
Push0 = 0x5f, ## Place 0 on stack. EIP-3855
|
||||
|
@ -174,12 +175,7 @@ type
|
|||
|
||||
Nop0xA5, Nop0xA6, Nop0xA7, Nop0xA8, Nop0xA9, Nop0xAA,
|
||||
Nop0xAB, Nop0xAC, Nop0xAD, Nop0xAE, Nop0xAF, Nop0xB0,
|
||||
Nop0xB1, Nop0xB2,
|
||||
|
||||
Tload = 0xb3, ## Load word from transient storage.
|
||||
Tstore = 0xb4, ## Save word to transient storage.
|
||||
|
||||
Nop0xB5, Nop0xB6,
|
||||
Nop0xB1, Nop0xB2, Nop0xB3, Nop0xB4, Nop0xB5, Nop0xB6,
|
||||
Nop0xB7, Nop0xB8, Nop0xB9, Nop0xBA, Nop0xBB, Nop0xBC,
|
||||
Nop0xBD, Nop0xBE, Nop0xBF, Nop0xC0, Nop0xC1, Nop0xC2,
|
||||
Nop0xC3, Nop0xC4, Nop0xC5, Nop0xC6, Nop0xC7, Nop0xC8,
|
||||
|
|
|
@ -306,14 +306,14 @@ const
|
|||
discard
|
||||
|
||||
tloadOp: Vm2OpFn = proc (k: var Vm2Ctx) =
|
||||
## 0xb3, Load word from transient storage.
|
||||
## 0x5c, Load word from transient storage.
|
||||
let
|
||||
slot = k.cpt.stack.peek()
|
||||
val = k.cpt.getTransientStorage(slot)
|
||||
k.cpt.stack.top(val)
|
||||
|
||||
tstoreOp: Vm2OpFn = proc (k: var Vm2Ctx) =
|
||||
## 0xb4, Save word to transient storage.
|
||||
## 0x5d, Save word to transient storage.
|
||||
checkInStaticContext(k.cpt)
|
||||
|
||||
let
|
||||
|
@ -511,7 +511,7 @@ const
|
|||
run: jumpDestOp,
|
||||
post: vm2OpIgnore)),
|
||||
|
||||
(opCode: Tload, ## 0xb3, Load word from transient storage.
|
||||
(opCode: Tload, ## 0x5c, Load word from transient storage.
|
||||
forks: Vm2OpCancunAndLater,
|
||||
name: "tLoad",
|
||||
info: "Load word from transient storage",
|
||||
|
@ -519,7 +519,7 @@ const
|
|||
run: tloadOp,
|
||||
post: vm2OpIgnore)),
|
||||
|
||||
(opCode: Tstore, ## 0xb4, Save word to transient storage.
|
||||
(opCode: Tstore, ## 0x5d, Save word to transient storage.
|
||||
forks: Vm2OpCancunAndLater,
|
||||
name: "tStore",
|
||||
info: "Save word to transient storage",
|
||||
|
|
Loading…
Reference in New Issue