From d5b734b1f5de391ca5b53e39fcbcf3341d0159e5 Mon Sep 17 00:00:00 2001 From: Carson Date: Thu, 28 May 2026 05:19:30 -0400 Subject: [PATCH 1/2] refactor(src,tests): fix spelling error. KECCACK => KECCAK (#2931) --- .../forks/forks/eips/constantinople/eip_1014.py | 2 +- packages/testing/src/execution_testing/forks/forks/forks.py | 4 ++-- packages/testing/src/execution_testing/forks/gas_costs.py | 2 +- .../execution_testing/forks/tests/test_opcode_gas_costs.py | 4 ++-- src/ethereum/forks/amsterdam/vm/gas.py | 2 +- src/ethereum/forks/amsterdam/vm/instructions/keccak.py | 2 +- src/ethereum/forks/amsterdam/vm/instructions/system.py | 2 +- src/ethereum/forks/arrow_glacier/vm/gas.py | 2 +- src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py | 2 +- src/ethereum/forks/arrow_glacier/vm/instructions/system.py | 2 +- src/ethereum/forks/berlin/vm/gas.py | 2 +- src/ethereum/forks/berlin/vm/instructions/keccak.py | 2 +- src/ethereum/forks/berlin/vm/instructions/system.py | 2 +- src/ethereum/forks/bpo1/vm/gas.py | 2 +- src/ethereum/forks/bpo1/vm/instructions/keccak.py | 2 +- src/ethereum/forks/bpo1/vm/instructions/system.py | 2 +- src/ethereum/forks/bpo2/vm/gas.py | 2 +- src/ethereum/forks/bpo2/vm/instructions/keccak.py | 2 +- src/ethereum/forks/bpo2/vm/instructions/system.py | 2 +- src/ethereum/forks/bpo3/vm/gas.py | 2 +- src/ethereum/forks/bpo3/vm/instructions/keccak.py | 2 +- src/ethereum/forks/bpo3/vm/instructions/system.py | 2 +- src/ethereum/forks/bpo4/vm/gas.py | 2 +- src/ethereum/forks/bpo4/vm/instructions/keccak.py | 2 +- src/ethereum/forks/bpo4/vm/instructions/system.py | 2 +- src/ethereum/forks/bpo5/vm/gas.py | 2 +- src/ethereum/forks/bpo5/vm/instructions/keccak.py | 2 +- src/ethereum/forks/bpo5/vm/instructions/system.py | 2 +- src/ethereum/forks/byzantium/vm/gas.py | 2 +- src/ethereum/forks/byzantium/vm/instructions/keccak.py | 2 +- src/ethereum/forks/cancun/vm/gas.py | 2 +- src/ethereum/forks/cancun/vm/instructions/keccak.py | 2 +- src/ethereum/forks/cancun/vm/instructions/system.py | 2 +- src/ethereum/forks/constantinople/vm/gas.py | 2 +- src/ethereum/forks/constantinople/vm/instructions/keccak.py | 2 +- src/ethereum/forks/constantinople/vm/instructions/system.py | 2 +- src/ethereum/forks/dao_fork/vm/gas.py | 2 +- src/ethereum/forks/dao_fork/vm/instructions/keccak.py | 2 +- src/ethereum/forks/frontier/vm/gas.py | 2 +- src/ethereum/forks/frontier/vm/instructions/keccak.py | 2 +- src/ethereum/forks/gray_glacier/vm/gas.py | 2 +- src/ethereum/forks/gray_glacier/vm/instructions/keccak.py | 2 +- src/ethereum/forks/gray_glacier/vm/instructions/system.py | 2 +- src/ethereum/forks/homestead/vm/gas.py | 2 +- src/ethereum/forks/homestead/vm/instructions/keccak.py | 2 +- src/ethereum/forks/istanbul/vm/gas.py | 2 +- src/ethereum/forks/istanbul/vm/instructions/keccak.py | 2 +- src/ethereum/forks/istanbul/vm/instructions/system.py | 2 +- src/ethereum/forks/london/vm/gas.py | 2 +- src/ethereum/forks/london/vm/instructions/keccak.py | 2 +- src/ethereum/forks/london/vm/instructions/system.py | 2 +- src/ethereum/forks/muir_glacier/vm/gas.py | 2 +- src/ethereum/forks/muir_glacier/vm/instructions/keccak.py | 2 +- src/ethereum/forks/muir_glacier/vm/instructions/system.py | 2 +- src/ethereum/forks/osaka/vm/gas.py | 2 +- src/ethereum/forks/osaka/vm/instructions/keccak.py | 2 +- src/ethereum/forks/osaka/vm/instructions/system.py | 2 +- src/ethereum/forks/paris/vm/gas.py | 2 +- src/ethereum/forks/paris/vm/instructions/keccak.py | 2 +- src/ethereum/forks/paris/vm/instructions/system.py | 2 +- src/ethereum/forks/prague/vm/gas.py | 2 +- src/ethereum/forks/prague/vm/instructions/keccak.py | 2 +- src/ethereum/forks/prague/vm/instructions/system.py | 2 +- src/ethereum/forks/shanghai/vm/gas.py | 2 +- src/ethereum/forks/shanghai/vm/instructions/keccak.py | 2 +- src/ethereum/forks/shanghai/vm/instructions/system.py | 2 +- src/ethereum/forks/spurious_dragon/vm/gas.py | 2 +- src/ethereum/forks/spurious_dragon/vm/instructions/keccak.py | 2 +- src/ethereum/forks/tangerine_whistle/vm/gas.py | 2 +- .../forks/tangerine_whistle/vm/instructions/keccak.py | 2 +- 70 files changed, 72 insertions(+), 72 deletions(-) diff --git a/packages/testing/src/execution_testing/forks/forks/eips/constantinople/eip_1014.py b/packages/testing/src/execution_testing/forks/forks/eips/constantinople/eip_1014.py index 01201e0559a..fdf6d5e5be4 100644 --- a/packages/testing/src/execution_testing/forks/forks/eips/constantinople/eip_1014.py +++ b/packages/testing/src/execution_testing/forks/forks/eips/constantinople/eip_1014.py @@ -26,7 +26,7 @@ def _calculate_create2_gas( init_code_size = metadata["init_code_size"] init_code_words = (init_code_size + 31) // 32 - hash_gas = gas_costs.OPCODE_KECCACK256_PER_WORD * init_code_words + hash_gas = gas_costs.OPCODE_KECCAK256_PER_WORD * init_code_words return gas_costs.OPCODE_CREATE_BASE + hash_gas diff --git a/packages/testing/src/execution_testing/forks/forks/forks.py b/packages/testing/src/execution_testing/forks/forks/forks.py index 748047b4827..9e56f4e2ae1 100644 --- a/packages/testing/src/execution_testing/forks/forks/forks.py +++ b/packages/testing/src/execution_testing/forks/forks/forks.py @@ -189,7 +189,7 @@ def gas_costs(cls) -> GasCosts: OPCODE_LOG_DATA_PER_BYTE=8, OPCODE_LOG_TOPIC=375, OPCODE_KECCAK256_BASE=30, - OPCODE_KECCACK256_PER_WORD=6, + OPCODE_KECCAK256_PER_WORD=6, # Zero-initialized: introduced in later forks, set via # replace() in the fork that activates them. TX_DATA_TOKEN_STANDARD=0, @@ -376,7 +376,7 @@ def opcode_gas_map( Opcodes.SHA3: cls._with_memory_expansion( lambda op: ( gas_costs.OPCODE_KECCAK256_BASE - + gas_costs.OPCODE_KECCACK256_PER_WORD + + gas_costs.OPCODE_KECCAK256_PER_WORD * ((op.metadata["data_size"] + 31) // 32) ), memory_expansion_calculator, diff --git a/packages/testing/src/execution_testing/forks/gas_costs.py b/packages/testing/src/execution_testing/forks/gas_costs.py index 7e637b1d37c..fcb8148cca0 100644 --- a/packages/testing/src/execution_testing/forks/gas_costs.py +++ b/packages/testing/src/execution_testing/forks/gas_costs.py @@ -136,7 +136,7 @@ class GasCosts: OPCODE_LOG_DATA_PER_BYTE: int OPCODE_LOG_TOPIC: int OPCODE_KECCAK256_BASE: int - OPCODE_KECCACK256_PER_WORD: int + OPCODE_KECCAK256_PER_WORD: int # Defined post-Frontier OPCODE_SHL: int = 0 diff --git a/packages/testing/src/execution_testing/forks/tests/test_opcode_gas_costs.py b/packages/testing/src/execution_testing/forks/tests/test_opcode_gas_costs.py index 472b499edd0..c8559088d5b 100644 --- a/packages/testing/src/execution_testing/forks/tests/test_opcode_gas_costs.py +++ b/packages/testing/src/execution_testing/forks/tests/test_opcode_gas_costs.py @@ -63,7 +63,7 @@ Osaka, Op.SHA3(data_size=64, new_memory_size=96), Osaka.gas_costs().OPCODE_KECCAK256_BASE - + Osaka.gas_costs().OPCODE_KECCACK256_PER_WORD * 2 + + Osaka.gas_costs().OPCODE_KECCAK256_PER_WORD * 2 + Osaka.memory_expansion_gas_calculator()(new_bytes=96), id="sha3_with_data_and_memory", ), @@ -279,7 +279,7 @@ Op.CREATE2(init_code_size=64, new_memory_size=64), Osaka.gas_costs().OPCODE_CREATE_BASE + Osaka.gas_costs().CODE_INIT_PER_WORD * 2 - + Osaka.gas_costs().OPCODE_KECCACK256_PER_WORD * 2 + + Osaka.gas_costs().OPCODE_KECCAK256_PER_WORD * 2 + Osaka.memory_expansion_gas_calculator()(new_bytes=64), id="create2_with_initcode_and_hash", ), diff --git a/src/ethereum/forks/amsterdam/vm/gas.py b/src/ethereum/forks/amsterdam/vm/gas.py index f8ad377ff73..0762027af01 100644 --- a/src/ethereum/forks/amsterdam/vm/gas.py +++ b/src/ethereum/forks/amsterdam/vm/gas.py @@ -189,7 +189,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/amsterdam/vm/instructions/keccak.py b/src/ethereum/forks/amsterdam/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/amsterdam/vm/instructions/keccak.py +++ b/src/ethereum/forks/amsterdam/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/amsterdam/vm/instructions/system.py b/src/ethereum/forks/amsterdam/vm/instructions/system.py index 9bf8b99171b..5e526279471 100644 --- a/src/ethereum/forks/amsterdam/vm/instructions/system.py +++ b/src/ethereum/forks/amsterdam/vm/instructions/system.py @@ -222,7 +222,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/arrow_glacier/vm/gas.py b/src/ethereum/forks/arrow_glacier/vm/gas.py index 2842b80b4d2..00a47783f9a 100644 --- a/src/ethereum/forks/arrow_glacier/vm/gas.py +++ b/src/ethereum/forks/arrow_glacier/vm/gas.py @@ -153,7 +153,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py b/src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py +++ b/src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/arrow_glacier/vm/instructions/system.py b/src/ethereum/forks/arrow_glacier/vm/instructions/system.py index 8d8eeeb8f2c..cbc799007a6 100644 --- a/src/ethereum/forks/arrow_glacier/vm/instructions/system.py +++ b/src/ethereum/forks/arrow_glacier/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/berlin/vm/gas.py b/src/ethereum/forks/berlin/vm/gas.py index 672dc2fd026..4b58c9f8a05 100644 --- a/src/ethereum/forks/berlin/vm/gas.py +++ b/src/ethereum/forks/berlin/vm/gas.py @@ -153,7 +153,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/berlin/vm/instructions/keccak.py b/src/ethereum/forks/berlin/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/berlin/vm/instructions/keccak.py +++ b/src/ethereum/forks/berlin/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/berlin/vm/instructions/system.py b/src/ethereum/forks/berlin/vm/instructions/system.py index 42b44718be8..e1e409cc8b8 100644 --- a/src/ethereum/forks/berlin/vm/instructions/system.py +++ b/src/ethereum/forks/berlin/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/bpo1/vm/gas.py b/src/ethereum/forks/bpo1/vm/gas.py index 2cd628097bc..5dbcbdaa520 100644 --- a/src/ethereum/forks/bpo1/vm/gas.py +++ b/src/ethereum/forks/bpo1/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/bpo1/vm/instructions/keccak.py b/src/ethereum/forks/bpo1/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/bpo1/vm/instructions/keccak.py +++ b/src/ethereum/forks/bpo1/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/bpo1/vm/instructions/system.py b/src/ethereum/forks/bpo1/vm/instructions/system.py index d71c776bf3d..092c6fb68c2 100644 --- a/src/ethereum/forks/bpo1/vm/instructions/system.py +++ b/src/ethereum/forks/bpo1/vm/instructions/system.py @@ -210,7 +210,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/bpo2/vm/gas.py b/src/ethereum/forks/bpo2/vm/gas.py index f2488b8e20a..22914dd22ae 100644 --- a/src/ethereum/forks/bpo2/vm/gas.py +++ b/src/ethereum/forks/bpo2/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/bpo2/vm/instructions/keccak.py b/src/ethereum/forks/bpo2/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/bpo2/vm/instructions/keccak.py +++ b/src/ethereum/forks/bpo2/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/bpo2/vm/instructions/system.py b/src/ethereum/forks/bpo2/vm/instructions/system.py index 713a04af13c..3fdfe3e4386 100644 --- a/src/ethereum/forks/bpo2/vm/instructions/system.py +++ b/src/ethereum/forks/bpo2/vm/instructions/system.py @@ -209,7 +209,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/bpo3/vm/gas.py b/src/ethereum/forks/bpo3/vm/gas.py index f2488b8e20a..22914dd22ae 100644 --- a/src/ethereum/forks/bpo3/vm/gas.py +++ b/src/ethereum/forks/bpo3/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/bpo3/vm/instructions/keccak.py b/src/ethereum/forks/bpo3/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/bpo3/vm/instructions/keccak.py +++ b/src/ethereum/forks/bpo3/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/bpo3/vm/instructions/system.py b/src/ethereum/forks/bpo3/vm/instructions/system.py index 713a04af13c..3fdfe3e4386 100644 --- a/src/ethereum/forks/bpo3/vm/instructions/system.py +++ b/src/ethereum/forks/bpo3/vm/instructions/system.py @@ -209,7 +209,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/bpo4/vm/gas.py b/src/ethereum/forks/bpo4/vm/gas.py index f2488b8e20a..22914dd22ae 100644 --- a/src/ethereum/forks/bpo4/vm/gas.py +++ b/src/ethereum/forks/bpo4/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/bpo4/vm/instructions/keccak.py b/src/ethereum/forks/bpo4/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/bpo4/vm/instructions/keccak.py +++ b/src/ethereum/forks/bpo4/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/bpo4/vm/instructions/system.py b/src/ethereum/forks/bpo4/vm/instructions/system.py index d71c776bf3d..092c6fb68c2 100644 --- a/src/ethereum/forks/bpo4/vm/instructions/system.py +++ b/src/ethereum/forks/bpo4/vm/instructions/system.py @@ -210,7 +210,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/bpo5/vm/gas.py b/src/ethereum/forks/bpo5/vm/gas.py index f2488b8e20a..22914dd22ae 100644 --- a/src/ethereum/forks/bpo5/vm/gas.py +++ b/src/ethereum/forks/bpo5/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/bpo5/vm/instructions/keccak.py b/src/ethereum/forks/bpo5/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/bpo5/vm/instructions/keccak.py +++ b/src/ethereum/forks/bpo5/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/bpo5/vm/instructions/system.py b/src/ethereum/forks/bpo5/vm/instructions/system.py index d71c776bf3d..092c6fb68c2 100644 --- a/src/ethereum/forks/bpo5/vm/instructions/system.py +++ b/src/ethereum/forks/bpo5/vm/instructions/system.py @@ -210,7 +210,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/byzantium/vm/gas.py b/src/ethereum/forks/byzantium/vm/gas.py index 0395403db01..5a0d5883a91 100644 --- a/src/ethereum/forks/byzantium/vm/gas.py +++ b/src/ethereum/forks/byzantium/vm/gas.py @@ -143,7 +143,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/byzantium/vm/instructions/keccak.py b/src/ethereum/forks/byzantium/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/byzantium/vm/instructions/keccak.py +++ b/src/ethereum/forks/byzantium/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/cancun/vm/gas.py b/src/ethereum/forks/cancun/vm/gas.py index 89ad479051f..b204e87342a 100644 --- a/src/ethereum/forks/cancun/vm/gas.py +++ b/src/ethereum/forks/cancun/vm/gas.py @@ -167,7 +167,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/cancun/vm/instructions/keccak.py b/src/ethereum/forks/cancun/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/cancun/vm/instructions/keccak.py +++ b/src/ethereum/forks/cancun/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/cancun/vm/instructions/system.py b/src/ethereum/forks/cancun/vm/instructions/system.py index 5b880be7285..3f7b1be3676 100644 --- a/src/ethereum/forks/cancun/vm/instructions/system.py +++ b/src/ethereum/forks/cancun/vm/instructions/system.py @@ -208,7 +208,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/constantinople/vm/gas.py b/src/ethereum/forks/constantinople/vm/gas.py index 770c5212461..4e13e5e779d 100644 --- a/src/ethereum/forks/constantinople/vm/gas.py +++ b/src/ethereum/forks/constantinople/vm/gas.py @@ -147,7 +147,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/constantinople/vm/instructions/keccak.py b/src/ethereum/forks/constantinople/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/constantinople/vm/instructions/keccak.py +++ b/src/ethereum/forks/constantinople/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/constantinople/vm/instructions/system.py b/src/ethereum/forks/constantinople/vm/instructions/system.py index d9faf756729..cf3f54c2c8d 100644 --- a/src/ethereum/forks/constantinople/vm/instructions/system.py +++ b/src/ethereum/forks/constantinople/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/dao_fork/vm/gas.py b/src/ethereum/forks/dao_fork/vm/gas.py index cb663624a36..a2a5c638fae 100644 --- a/src/ethereum/forks/dao_fork/vm/gas.py +++ b/src/ethereum/forks/dao_fork/vm/gas.py @@ -138,7 +138,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(10) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/dao_fork/vm/instructions/keccak.py b/src/ethereum/forks/dao_fork/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/dao_fork/vm/instructions/keccak.py +++ b/src/ethereum/forks/dao_fork/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/frontier/vm/gas.py b/src/ethereum/forks/frontier/vm/gas.py index 1974386b1c3..d145ef1d372 100644 --- a/src/ethereum/forks/frontier/vm/gas.py +++ b/src/ethereum/forks/frontier/vm/gas.py @@ -136,7 +136,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(10) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/frontier/vm/instructions/keccak.py b/src/ethereum/forks/frontier/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/frontier/vm/instructions/keccak.py +++ b/src/ethereum/forks/frontier/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/gray_glacier/vm/gas.py b/src/ethereum/forks/gray_glacier/vm/gas.py index 2842b80b4d2..00a47783f9a 100644 --- a/src/ethereum/forks/gray_glacier/vm/gas.py +++ b/src/ethereum/forks/gray_glacier/vm/gas.py @@ -153,7 +153,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/gray_glacier/vm/instructions/keccak.py b/src/ethereum/forks/gray_glacier/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/gray_glacier/vm/instructions/keccak.py +++ b/src/ethereum/forks/gray_glacier/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/gray_glacier/vm/instructions/system.py b/src/ethereum/forks/gray_glacier/vm/instructions/system.py index a4c1044a687..89a0d310f51 100644 --- a/src/ethereum/forks/gray_glacier/vm/instructions/system.py +++ b/src/ethereum/forks/gray_glacier/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/homestead/vm/gas.py b/src/ethereum/forks/homestead/vm/gas.py index cb663624a36..a2a5c638fae 100644 --- a/src/ethereum/forks/homestead/vm/gas.py +++ b/src/ethereum/forks/homestead/vm/gas.py @@ -138,7 +138,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(10) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/homestead/vm/instructions/keccak.py b/src/ethereum/forks/homestead/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/homestead/vm/instructions/keccak.py +++ b/src/ethereum/forks/homestead/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/istanbul/vm/gas.py b/src/ethereum/forks/istanbul/vm/gas.py index 25ff304ae00..a3c88ecef85 100644 --- a/src/ethereum/forks/istanbul/vm/gas.py +++ b/src/ethereum/forks/istanbul/vm/gas.py @@ -150,7 +150,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/istanbul/vm/instructions/keccak.py b/src/ethereum/forks/istanbul/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/istanbul/vm/instructions/keccak.py +++ b/src/ethereum/forks/istanbul/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/istanbul/vm/instructions/system.py b/src/ethereum/forks/istanbul/vm/instructions/system.py index cca5876670a..8002d48698a 100644 --- a/src/ethereum/forks/istanbul/vm/instructions/system.py +++ b/src/ethereum/forks/istanbul/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/london/vm/gas.py b/src/ethereum/forks/london/vm/gas.py index 2842b80b4d2..00a47783f9a 100644 --- a/src/ethereum/forks/london/vm/gas.py +++ b/src/ethereum/forks/london/vm/gas.py @@ -153,7 +153,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/london/vm/instructions/keccak.py b/src/ethereum/forks/london/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/london/vm/instructions/keccak.py +++ b/src/ethereum/forks/london/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/london/vm/instructions/system.py b/src/ethereum/forks/london/vm/instructions/system.py index a4c1044a687..89a0d310f51 100644 --- a/src/ethereum/forks/london/vm/instructions/system.py +++ b/src/ethereum/forks/london/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/muir_glacier/vm/gas.py b/src/ethereum/forks/muir_glacier/vm/gas.py index 25ff304ae00..a3c88ecef85 100644 --- a/src/ethereum/forks/muir_glacier/vm/gas.py +++ b/src/ethereum/forks/muir_glacier/vm/gas.py @@ -150,7 +150,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/muir_glacier/vm/instructions/keccak.py b/src/ethereum/forks/muir_glacier/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/muir_glacier/vm/instructions/keccak.py +++ b/src/ethereum/forks/muir_glacier/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/muir_glacier/vm/instructions/system.py b/src/ethereum/forks/muir_glacier/vm/instructions/system.py index cca5876670a..8002d48698a 100644 --- a/src/ethereum/forks/muir_glacier/vm/instructions/system.py +++ b/src/ethereum/forks/muir_glacier/vm/instructions/system.py @@ -193,7 +193,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/osaka/vm/gas.py b/src/ethereum/forks/osaka/vm/gas.py index 1d49b46098c..e4e9b94712e 100644 --- a/src/ethereum/forks/osaka/vm/gas.py +++ b/src/ethereum/forks/osaka/vm/gas.py @@ -181,7 +181,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/osaka/vm/instructions/keccak.py b/src/ethereum/forks/osaka/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/osaka/vm/instructions/keccak.py +++ b/src/ethereum/forks/osaka/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/osaka/vm/instructions/system.py b/src/ethereum/forks/osaka/vm/instructions/system.py index b431ce264ef..cb4058774e2 100644 --- a/src/ethereum/forks/osaka/vm/instructions/system.py +++ b/src/ethereum/forks/osaka/vm/instructions/system.py @@ -210,7 +210,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/paris/vm/gas.py b/src/ethereum/forks/paris/vm/gas.py index b4b9ab1e402..f791baefd4b 100644 --- a/src/ethereum/forks/paris/vm/gas.py +++ b/src/ethereum/forks/paris/vm/gas.py @@ -153,7 +153,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/paris/vm/instructions/keccak.py b/src/ethereum/forks/paris/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/paris/vm/instructions/keccak.py +++ b/src/ethereum/forks/paris/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/paris/vm/instructions/system.py b/src/ethereum/forks/paris/vm/instructions/system.py index 50eb3136a1d..447cf6410e2 100644 --- a/src/ethereum/forks/paris/vm/instructions/system.py +++ b/src/ethereum/forks/paris/vm/instructions/system.py @@ -192,7 +192,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost, ) diff --git a/src/ethereum/forks/prague/vm/gas.py b/src/ethereum/forks/prague/vm/gas.py index e6cc23df1b8..d7d839b8968 100644 --- a/src/ethereum/forks/prague/vm/gas.py +++ b/src/ethereum/forks/prague/vm/gas.py @@ -176,7 +176,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/prague/vm/instructions/keccak.py b/src/ethereum/forks/prague/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/prague/vm/instructions/keccak.py +++ b/src/ethereum/forks/prague/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/prague/vm/instructions/system.py b/src/ethereum/forks/prague/vm/instructions/system.py index 713a04af13c..3fdfe3e4386 100644 --- a/src/ethereum/forks/prague/vm/instructions/system.py +++ b/src/ethereum/forks/prague/vm/instructions/system.py @@ -209,7 +209,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/shanghai/vm/gas.py b/src/ethereum/forks/shanghai/vm/gas.py index f7b597f700f..ba9c5b7634e 100644 --- a/src/ethereum/forks/shanghai/vm/gas.py +++ b/src/ethereum/forks/shanghai/vm/gas.py @@ -155,7 +155,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/shanghai/vm/instructions/keccak.py b/src/ethereum/forks/shanghai/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/shanghai/vm/instructions/keccak.py +++ b/src/ethereum/forks/shanghai/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/shanghai/vm/instructions/system.py b/src/ethereum/forks/shanghai/vm/instructions/system.py index b83e201eff2..2527f02f12c 100644 --- a/src/ethereum/forks/shanghai/vm/instructions/system.py +++ b/src/ethereum/forks/shanghai/vm/instructions/system.py @@ -207,7 +207,7 @@ def create2(evm: Evm) -> None: charge_gas( evm, GasCosts.OPCODE_CREATE_BASE - + GasCosts.OPCODE_KECCACK256_PER_WORD * call_data_words + + GasCosts.OPCODE_KECCAK256_PER_WORD * call_data_words + extend_memory.cost + init_code_gas, ) diff --git a/src/ethereum/forks/spurious_dragon/vm/gas.py b/src/ethereum/forks/spurious_dragon/vm/gas.py index c4cd3ce528f..4304e1364fc 100644 --- a/src/ethereum/forks/spurious_dragon/vm/gas.py +++ b/src/ethereum/forks/spurious_dragon/vm/gas.py @@ -136,7 +136,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(50) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/spurious_dragon/vm/instructions/keccak.py b/src/ethereum/forks/spurious_dragon/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/spurious_dragon/vm/instructions/keccak.py +++ b/src/ethereum/forks/spurious_dragon/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) diff --git a/src/ethereum/forks/tangerine_whistle/vm/gas.py b/src/ethereum/forks/tangerine_whistle/vm/gas.py index 93c81fae94d..daa1ef0de63 100644 --- a/src/ethereum/forks/tangerine_whistle/vm/gas.py +++ b/src/ethereum/forks/tangerine_whistle/vm/gas.py @@ -136,7 +136,7 @@ class GasCosts: OPCODE_EXP_BASE: Final[Uint] = Uint(10) OPCODE_EXP_PER_BYTE: Final[Uint] = Uint(10) OPCODE_KECCAK256_BASE: Final[Uint] = Uint(30) - OPCODE_KECCACK256_PER_WORD: Final[Uint] = Uint(6) + OPCODE_KECCAK256_PER_WORD: Final[Uint] = Uint(6) OPCODE_LOG_BASE: Final[Uint] = Uint(375) OPCODE_LOG_DATA_PER_BYTE: Final[Uint] = Uint(8) OPCODE_LOG_TOPIC: Final[Uint] = Uint(375) diff --git a/src/ethereum/forks/tangerine_whistle/vm/instructions/keccak.py b/src/ethereum/forks/tangerine_whistle/vm/instructions/keccak.py index c8099ee0ecc..0d3e17cf08e 100644 --- a/src/ethereum/forks/tangerine_whistle/vm/instructions/keccak.py +++ b/src/ethereum/forks/tangerine_whistle/vm/instructions/keccak.py @@ -45,7 +45,7 @@ def keccak(evm: Evm) -> None: # GAS words = ceil32(Uint(size)) // Uint(32) - word_gas_cost = GasCosts.OPCODE_KECCACK256_PER_WORD * words + word_gas_cost = GasCosts.OPCODE_KECCAK256_PER_WORD * words extend_memory = calculate_gas_extend_memory( evm.memory, [(memory_start_index, size)] ) From 4441398db2ef50cebf7fa8af59bbf98c28291114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 28 May 2026 14:20:43 +0200 Subject: [PATCH 2/2] feat(tests): EIP-4844 point evaluation -G1 and G1 doubling vectors (#2927) --- tests/cancun/eip4844_blobs/common.py | 7 +++++ .../test_point_evaluation_precompile.py | 27 ++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/tests/cancun/eip4844_blobs/common.py b/tests/cancun/eip4844_blobs/common.py index 7f9787fcffe..a802ac989ef 100644 --- a/tests/cancun/eip4844_blobs/common.py +++ b/tests/cancun/eip4844_blobs/common.py @@ -3,6 +3,13 @@ from typing import Literal INF_POINT = (0xC0 << 376).to_bytes(48, byteorder="big") +# BLS12-381 G1 generator in compressed form (48 bytes, big-endian). +G1_GENERATOR = bytes.fromhex( + "97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac58" + "6c55e83ff97a1aeffb3af00adb22c6bb" +) +# Negation flips the y-sign bit (0x20) in the leading byte. +NEG_G1_GENERATOR = bytes([G1_GENERATOR[0] ^ 0x20]) + G1_GENERATOR[1:] Z = 0x623CE31CF9759A5C8DAF3A357992F9F3DD7F9339D8998BC8E68373E54F00B75E Z_Y_INVALID_ENDIANNESS: Literal["little", "big"] = "little" Z_Y_VALID_ENDIANNESS: Literal["little", "big"] = "big" diff --git a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py index cfeb75b22e5..d73ae12916c 100644 --- a/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py +++ b/tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py @@ -55,7 +55,13 @@ call_return_code, ) -from .common import INF_POINT, Z_Y_VALID_ENDIANNESS, Z +from .common import ( + G1_GENERATOR, + INF_POINT, + NEG_G1_GENERATOR, + Z_Y_VALID_ENDIANNESS, + Z, +) from .spec import Spec, ref_spec_4844 REFERENCE_SPEC_GIT_PATH = ref_spec_4844.git_path @@ -406,6 +412,25 @@ def test_valid_inputs( Spec.kzg_to_versioned_hash(INF_POINT, 0xFF), id="correct_proof_1_incorrect_versioned_hash_version_0xff", ), + # Proof is the negation of G1_generator. + pytest.param( + 0, + 0, + G1_GENERATOR, + NEG_G1_GENERATOR, + None, + id="proof_neg_g1_generator", + ), + # P+P doubling in the final G1 add: verifier computes + # `C - [y]_1 = [-1]_1 + [-1]_1`, forcing the doubling path. + pytest.param( + 0, + 1, + NEG_G1_GENERATOR, + INF_POINT, + None, + id="g1_doubling_in_final_add", + ), ], ) @pytest.mark.parametrize("result", [Result.FAILURE])