Skip to content

feat(tests): Remove redundant Blake2 fixtures and callcode tests #1405

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

Merged
merged 1 commit into from
Apr 8, 2025
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 @@ -64,7 +64,7 @@ consume cache --help

### πŸ§ͺ Test Cases

- ✨ Add additional test coverage for EIP-152 Blake2 precompiles ([#1244](https://github.com/ethereum/execution-spec-tests/pull/1244)). Refactor to add variables for spec constants and common fixture code. ([#1395](https://github.com/ethereum/execution-spec-tests/pull/1395)).
- ✨ Add additional test coverage for EIP-152 Blake2 precompiles ([#1244](https://github.com/ethereum/execution-spec-tests/pull/1244)). Refactor to add variables for spec constants and common fixture code. ([#1395](https://github.com/ethereum/execution-spec-tests/pull/1395)), ([#1405](https://github.com/ethereum/execution-spec-tests/pull/1405)).
- ✨ Add EIP-7702 incorrect-rlp-encoding tests ([#1347](https://github.com/ethereum/execution-spec-tests/pull/1347)).
- ✨ Add EIP-2935 tests for all call opcodes ([#1379](https://github.com/ethereum/execution-spec-tests/pull/1379)).
- ✨ Add more tests for EIP-7702: max-fee-per-gas verification, delegation-designation as initcode tests ([#1372](https://github.com/ethereum/execution-spec-tests/pull/1372)).
Expand Down
25 changes: 0 additions & 25 deletions tests/istanbul/eip152_blake2/test_blake2.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,6 @@
REFERENCE_SPEC_VERSION = ref_spec_152.version


@pytest.fixture
def blake2b_contract_bytecode():
"""Contract code that performs a CALL to the BLAKE2b precompile and stores the result."""
return (
# Store all CALLDATA into memory (offset 0)
Op.CALLDATACOPY(0, 0, Op.CALLDATASIZE())
# Store the returned CALL status (success = 1, fail = 0) into slot 0:
+ Op.SSTORE(
0,
# Setup stack to CALL into Blake2b with the CALLDATA and CALL into it (+ pop value)
Op.CALL(
address=9,
args_offset=0,
args_size=Op.CALLDATASIZE(),
ret_offset=0x200,
ret_size=0x40,
),
)
+ Op.SSTORE(1, Op.MLOAD(0x200))
+ Op.SSTORE(2, Op.MLOAD(0x220))
+ Op.STOP()
)


@pytest.mark.valid_from("Istanbul")
@pytest.mark.parametrize("call_opcode", [Op.CALL])
@pytest.mark.parametrize(
Expand Down Expand Up @@ -406,7 +382,6 @@ def test_blake2b(
"""Test BLAKE2b precompile."""
env = Environment()

account = pre.deploy_contract(blake2b_contract_bytecode, storage={0: 0xDEADBEEF})
account = pre.deploy_contract(blake2b_contract_bytecode, storage={0: 0xDEADBEEF})
sender = pre.fund_eoa()

Expand Down
Loading