mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core: split 4844 and 7516
This commit is contained in:
parent
9f1bd25939
commit
14cbbfc77a
2 changed files with 7 additions and 3 deletions
|
|
@ -289,15 +289,18 @@ func opBlobBaseFee(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext)
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// enable4844 applies EIP-4844 (DATAHASH opcode)
|
// enable4844 applies EIP-4844 (BLOBHASH opcode)
|
||||||
func enable4844(jt *JumpTable) {
|
func enable4844(jt *JumpTable) {
|
||||||
// New opcode
|
|
||||||
jt[BLOBHASH] = &operation{
|
jt[BLOBHASH] = &operation{
|
||||||
execute: opBlobHash,
|
execute: opBlobHash,
|
||||||
constantGas: GasFastestStep,
|
constantGas: GasFastestStep,
|
||||||
minStack: minStack(1, 1),
|
minStack: minStack(1, 1),
|
||||||
maxStack: maxStack(1, 1),
|
maxStack: maxStack(1, 1),
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// enable7516 applies EIP-7516 (BLOBBASEFEE opcode)
|
||||||
|
func enable7516(jt *JumpTable) {
|
||||||
jt[BLOBBASEFEE] = &operation{
|
jt[BLOBBASEFEE] = &operation{
|
||||||
execute: opBlobBaseFee,
|
execute: opBlobBaseFee,
|
||||||
constantGas: GasQuickStep,
|
constantGas: GasQuickStep,
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,8 @@ func validate(jt JumpTable) JumpTable {
|
||||||
|
|
||||||
func newCancunInstructionSet() JumpTable {
|
func newCancunInstructionSet() JumpTable {
|
||||||
instructionSet := newShanghaiInstructionSet()
|
instructionSet := newShanghaiInstructionSet()
|
||||||
enable4844(&instructionSet) // EIP-4844 (DATAHASH opcode)
|
enable4844(&instructionSet) // EIP-4844 (BLOBHASH opcode)
|
||||||
|
enable7516(&instructionSet) // EIP-7516 (BLOBBASEFEE opcode)
|
||||||
enable1153(&instructionSet) // EIP-1153 "Transient Storage"
|
enable1153(&instructionSet) // EIP-1153 "Transient Storage"
|
||||||
enable5656(&instructionSet) // EIP-5656 (MCOPY opcode)
|
enable5656(&instructionSet) // EIP-5656 (MCOPY opcode)
|
||||||
enable6780(&instructionSet) // EIP-6780 SELFDESTRUCT only in same transaction
|
enable6780(&instructionSet) // EIP-6780 SELFDESTRUCT only in same transaction
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue