Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions packages/testing/src/execution_testing/forks/forks/forks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/src/execution_testing/forks/gas_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
),
Expand Down Expand Up @@ -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",
),
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/amsterdam/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/arrow_glacier/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/arrow_glacier/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/arrow_glacier/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/berlin/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/berlin/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/berlin/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo1/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo1/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo1/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo2/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo2/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo2/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo3/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo3/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo3/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo4/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo4/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo4/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo5/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo5/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/bpo5/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/byzantium/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/byzantium/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/cancun/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/cancun/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/cancun/vm/instructions/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/constantinople/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/dao_fork/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/dao_fork/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/frontier/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/frontier/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/gray_glacier/vm/gas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ethereum/forks/gray_glacier/vm/instructions/keccak.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)
Expand Down
Loading
Loading