forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// (c) 2023, Ava Labs, Inc. All rights reserved. | ||
// See the file LICENSE for licensing terms. | ||
|
||
package vm | ||
|
||
var ( | ||
SubnetEVMInstructionSet = newSubnetEVMInstructionSet() | ||
SubnetEVMDurangoInstructionSet = newSubnetEVMDurangoInstructionSet() | ||
SubnetEVMCancunInstructionSet = newSubnetEVMCancunInstructionSet() | ||
) | ||
|
||
func newSubnetEVMCancunInstructionSet() JumpTable { | ||
instructionSet := newSubnetEVMDurangoInstructionSet() | ||
enable4844(&instructionSet) // EIP-4844 (BLOBHASH opcode) | ||
enable7516(&instructionSet) // EIP-7516 (BLOBBASEFEE opcode) | ||
enable1153(&instructionSet) // EIP-1153 "Transient Storage" | ||
enable5656(&instructionSet) // EIP-5656 (MCOPY opcode) | ||
enable6780(&instructionSet) // EIP-6780 SELFDESTRUCT only in same transaction | ||
return validate(instructionSet) | ||
} | ||
|
||
// newDurangoInstructionSet returns the frontier, homestead, byzantium, | ||
// constantinople, istanbul, petersburg, subnet-evm, durango instructions. | ||
func newSubnetEVMDurangoInstructionSet() JumpTable { | ||
instructionSet := newSubnetEVMInstructionSet() | ||
enable3855(&instructionSet) // PUSH0 instruction | ||
enable3860(&instructionSet) // Limit and meter initcode | ||
|
||
return validate(instructionSet) | ||
} | ||
|
||
// newSubnetEVMInstructionSet returns the frontier, homestead, byzantium, | ||
// constantinople, istanbul, petersburg, subnet-evm instructions. | ||
func newSubnetEVMInstructionSet() JumpTable { | ||
instructionSet := newIstanbulInstructionSet() | ||
enable2929(&instructionSet) | ||
enable3198(&instructionSet) // Base fee opcode https://eips.ethereum.org/EIPS/eip-3198 | ||
return validate(instructionSet) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters