Skip to content

Commit 36c5f13

Browse files
authored
Remove redundant fixtures and callcode tests (#1405)
1 parent e0eeecb commit 36c5f13

File tree

3 files changed

+1
-537
lines changed

3 files changed

+1
-537
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ consume cache --help
6464

6565
### 🧪 Test Cases
6666

67-
- ✨ 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)).
67+
- ✨ 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)).
6868
- ✨ Add EIP-7702 incorrect-rlp-encoding tests ([#1347](https://github.com/ethereum/execution-spec-tests/pull/1347)).
6969
- ✨ Add EIP-2935 tests for all call opcodes ([#1379](https://github.com/ethereum/execution-spec-tests/pull/1379)).
7070
- ✨ 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)).

tests/istanbul/eip152_blake2/test_blake2.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,6 @@
2424
REFERENCE_SPEC_VERSION = ref_spec_152.version
2525

2626

27-
@pytest.fixture
28-
def blake2b_contract_bytecode():
29-
"""Contract code that performs a CALL to the BLAKE2b precompile and stores the result."""
30-
return (
31-
# Store all CALLDATA into memory (offset 0)
32-
Op.CALLDATACOPY(0, 0, Op.CALLDATASIZE())
33-
# Store the returned CALL status (success = 1, fail = 0) into slot 0:
34-
+ Op.SSTORE(
35-
0,
36-
# Setup stack to CALL into Blake2b with the CALLDATA and CALL into it (+ pop value)
37-
Op.CALL(
38-
address=9,
39-
args_offset=0,
40-
args_size=Op.CALLDATASIZE(),
41-
ret_offset=0x200,
42-
ret_size=0x40,
43-
),
44-
)
45-
+ Op.SSTORE(1, Op.MLOAD(0x200))
46-
+ Op.SSTORE(2, Op.MLOAD(0x220))
47-
+ Op.STOP()
48-
)
49-
50-
5127
@pytest.mark.valid_from("Istanbul")
5228
@pytest.mark.parametrize("call_opcode", [Op.CALL])
5329
@pytest.mark.parametrize(
@@ -406,7 +382,6 @@ def test_blake2b(
406382
"""Test BLAKE2b precompile."""
407383
env = Environment()
408384

409-
account = pre.deploy_contract(blake2b_contract_bytecode, storage={0: 0xDEADBEEF})
410385
account = pre.deploy_contract(blake2b_contract_bytecode, storage={0: 0xDEADBEEF})
411386
sender = pre.fund_eoa()
412387

0 commit comments

Comments
 (0)