-
Notifications
You must be signed in to change notification settings - Fork 776
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
EIP 6690: EVMMAX implementation #3816
base: master
Are you sure you want to change the base?
Changes from 3 commits
4f24ab4
7c85448
f830abc
3595599
6b5f895
58c2dae
553272e
40561c3
d827327
f76f420
d546bfb
70f3562
bb4fd1b
d432767
0074f51
006b104
164a358
00896bf
d0445a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -171,4 +171,7 @@ export const hardforksDict: HardforksDict = { | |
verkle: { | ||
eips: [4762, 6800], | ||
}, | ||
evmmax: { | ||
eips: [6690], | ||
}, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,6 +210,14 @@ | |
0xa3: dynamicGasOp('LOG'), | ||
0xa4: dynamicGasOp('LOG'), | ||
|
||
// '0xf0' range - extended range/width modular arithmetic | ||
0xc0: asyncAndDynamicGasOp('SETMODX'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will add these opcodes as available from all EVMs at all hardforks (so these opcodes are now available at Frontier / Chainstart) |
||
0xc1: asyncAndDynamicGasOp('LOADX'), | ||
0xc2: asyncAndDynamicGasOp('STOREX'), | ||
0xc3: asyncAndDynamicGasOp('ADDMODX'), | ||
0xc4: asyncAndDynamicGasOp('SUBMODX'), | ||
0xc5: asyncAndDynamicGasOp('MULMODX'), | ||
|
||
// '0xf0' range - closures | ||
0xf0: asyncAndDynamicGasOp('CREATE'), | ||
0xf1: asyncAndDynamicGasOp('CALL'), | ||
|
@@ -372,6 +380,19 @@ | |
0xee: asyncAndDynamicGasOp('RETURNCONTRACT'), | ||
}, | ||
}, | ||
{ | ||
eip: 6690, | ||
opcodes: { | ||
// control & i/o | ||
0xc0: asyncAndDynamicGasOp('SETMODX'), | ||
0xc1: asyncAndDynamicGasOp('LOADX'), | ||
0xc2: asyncAndDynamicGasOp('STOREX'), | ||
// arithmetic | ||
0xc3: asyncAndDynamicGasOp('ADDMODX'), | ||
0xc4: asyncAndDynamicGasOp('SUBMODX'), | ||
0xc5: asyncAndDynamicGasOp('MULMODX'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: for dynamic gas ops, a gas method should be provided in |
||
}, | ||
}, | ||
] | ||
|
||
/** | ||
|
@@ -436,7 +457,7 @@ | |
} | ||
|
||
for (const key in opcodeBuilder) { | ||
const baseFee = Number(common.param(`${opcodeBuilder[key].name.toLowerCase()}Gas`)) | ||
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/asyncEvents.spec.ts > async events > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/blobVersionedHashes.spec.ts > BLOBHASH / access blobVersionedHashes in calldata > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/blobVersionedHashes.spec.ts > BLOBHASH: access blobVersionedHashes within contract calls > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/blobVersionedHashes.spec.ts > BLOBHASH: access blobVersionedHashes in a CREATE/CREATE2 frame > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customCrypto.spec.ts > custom crypto > should use custom sha256 function
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customCrypto.spec.ts > custom crypto > should use custom ecrecover function
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customOpcodes.spec.ts > VM: custom opcodes > should add custom opcodes to the EVM
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customOpcodes.spec.ts > VM: custom opcodes > should delete opcodes from the EVM
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customOpcodes.spec.ts > VM: custom opcodes > should not override default opcodes
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / evm / test-evmtest/customOpcodes.spec.ts > VM: custom opcodes > should override opcodes in the EVM
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/asyncEvents.spec.ts > async events > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/blobVersionedHashes.spec.ts > BLOBHASH / access blobVersionedHashes in calldata > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/blobVersionedHashes.spec.ts > BLOBHASH: access blobVersionedHashes within contract calls > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/blobVersionedHashes.spec.ts > BLOBHASH: access blobVersionedHashes in a CREATE/CREATE2 frame > should work
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customCrypto.spec.ts > custom crypto > should use custom sha256 function
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customCrypto.spec.ts > custom crypto > should use custom ecrecover function
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customOpcodes.spec.ts > VM: custom opcodes > should add custom opcodes to the EVM
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customOpcodes.spec.ts > VM: custom opcodes > should delete opcodes from the EVM
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customOpcodes.spec.ts > VM: custom opcodes > should not override default opcodes
Check failure on line 460 in packages/evm/src/opcodes/codes.ts GitHub Actions / browser / test-all-browsertest/customOpcodes.spec.ts > VM: custom opcodes > should override opcodes in the EVM
|
||
// explicitly verify that we have defined a base fee | ||
if (baseFee === undefined) { | ||
throw new Error(`base fee not defined for: ${opcodeBuilder[key].name}`) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should do an
evmmax
hardfork for this: if EVMMAX should be activated then the 6690 EIP should be activated (so instantiate a common and activate 6990 to use EVMMAX). I might have missed something from the EIP though. It seems to me that the EIP introduces new opcodes?