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
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Users can select any of the artifacts depending on their testing needs for their
- πŸ”€ Refactored `SELFDESTRUCT` opcode collision tests to use the `pre_alloc` plugin in order to avoid contract and EOA address collisions ([#1643](https://github.com/ethereum/execution-spec-tests/pull/1643)).
- ✨ EIP-7594: Sanity test cases to send blob transactions and verify `engine_getBlobsVX` using the `execute` command ([#1644](https://github.com/ethereum/execution-spec-tests/pull/1644)).
- πŸ”€ Refactored EIP-145 static tests into python ([#1683](https://github.com/ethereum/execution-spec-tests/pull/1683)).
- ✨ EIP-7823, EIP-7883: Add test cases for ModExp precompile gas-cost updates and input limits on Osaka ([#1579](https://github.com/ethereum/execution-spec-tests/pull/1579), [#1729](https://github.com/ethereum/execution-spec-tests/pull/1729)).
- ✨ EIP-7823, EIP-7883: Add test cases for ModExp precompile gas-cost updates and input limits on Osaka ([#1579](https://github.com/ethereum/execution-spec-tests/pull/1579), [#1729](https://github.com/ethereum/execution-spec-tests/pull/1729), [#1881](https://github.com/ethereum/execution-spec-tests/pull/1881)).
- ✨ [EIP-7825](https://eips.ethereum.org/EIPS/eip-7825): Add test cases for the transaction gas limit of 2^24 gas ([#1711](https://github.com/ethereum/execution-spec-tests/pull/1711), [#1882](https://github.com/ethereum/execution-spec-tests/pull/1882)).
- ✨ [EIP-7951](https://eips.ethereum.org/EIPS/eip-7951): add test cases for `P256VERIFY` precompile to support secp256r1 curve [#1670](https://github.com/ethereum/execution-spec-tests/pull/1670).
- ✨ Introduce blockchain tests for benchmark to cover the scenario of pure ether transfers [#1742](https://github.com/ethereum/execution-spec-tests/pull/1742).
Expand Down
8 changes: 6 additions & 2 deletions tests/osaka/eip7883_modexp_gas_increase/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def calculate_iteration_count(cls, exponent_length: int, exponent: bytes) -> int
def calculate_gas_cost(
cls, base_length: int, modulus_length: int, exponent_length: int, exponent: bytes
) -> int:
"""Calculate the ModExp gas cost according to EIP-7883 specification."""
"""Calculate the ModExp gas cost according to EIP-2565 specification."""
multiplication_complexity = cls.calculate_multiplication_complexity(
base_length, modulus_length
)
Expand All @@ -78,13 +78,17 @@ def calculate_gas_cost(

@dataclass(frozen=True)
class Spec7883(Spec):
"""Constants and helpers for the ModExp gas cost increase EIP."""
"""
Constants and helpers for the ModExp gas cost increase EIP.
These override the original Spec class variables for EIP-7883.
"""

MODEXP_ADDRESS = 0x05
MIN_GAS = 500

LARGE_BASE_MODULUS_MULTIPLIER = 2
EXPONENT_BYTE_MULTIPLIER = 16
GAS_DIVISOR = 1 # Overrides the original Spec class GAS_DIVISOR

@classmethod
def calculate_multiplication_complexity(cls, base_length: int, modulus_length: int) -> int:
Expand Down
Loading
Loading