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