Skip to content

Commit d2f5237

Browse files
feat(tests): add increased nonce with invalid nonce tests (#1441)
* feat(tests): add invalid nonce, self-sponsered, multiple signers cases * feat(tests): add invalid auth w/eoa authority & multiple signers * docs: fix changelog * fix(tools): CodeGasMeasure allow non-int keys * fix(tests): EIP-7702 gas tests refactor and fixes * chore(deps): update eels resolutions to use current best prague branch --------- Co-authored-by: Mario Vega <[email protected]>
1 parent adfdd10 commit d2f5237

File tree

4 files changed

+146
-63
lines changed

4 files changed

+146
-63
lines changed

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Test fixtures for use by clients are available for each release on the [Github r
2525
### 🧪 Test Cases
2626

2727
-[EIP-7702](https://eips.ethereum.org/EIPS/eip-7702): Test precompile case in same transaction as delegation without extra gas in case of precompile code execution; parametrize all call opcodes in existing precompile test ([#1431](https://github.com/ethereum/execution-spec-tests/pull/1431)).
28+
-[EIP-7702](https://eips.ethereum.org/EIPS/eip-7702): Add invalid nonce authorizations tests for the case of multiple signers when the sender's nonce gets increased ([#1441](https://github.com/ethereum/execution-spec-tests/pull/1441)).
2829
-[EIP-7623](https://eips.ethereum.org/EIPS/eip-7623): Additionally parametrize transaction validity tests with the `to` set to an EOA account (previously only contracts) ([#1422](https://github.com/ethereum/execution-spec-tests/pull/1422)).
2930

3031
## [v4.2.0](https://github.com/ethereum/execution-spec-tests/releases/tag/v4.2.0) - 2025-04-08

eels_resolutions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
"same_as": "EELSMaster"
3636
},
3737
"Prague": {
38-
"git_url": "https://github.com/ethereum/execution-specs.git",
39-
"branch": "devnets/prague/6"
38+
"git_url": "https://github.com/gurukamath/execution-specs.git",
39+
"branch": "7702-to-precompile",
40+
"commit": "bbc469729ab095300b07de8fe323c3f9fac31857"
4041
}
4142
}

src/ethereum_test_tools/code/generators.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class CodeGasMeasure(Bytecode):
149149
To be considered when subtracting the value of the previous GAS operation,
150150
and to be popped at the end of the execution.
151151
"""
152-
sstore_key: int
152+
sstore_key: int | Bytes
153153
"""
154154
Storage key to save the gas used.
155155
"""
@@ -160,7 +160,7 @@ def __new__(
160160
code: Bytecode,
161161
overhead_cost: int = 0,
162162
extra_stack_items: int = 0,
163-
sstore_key: int = 0,
163+
sstore_key: int | Bytes = 0,
164164
stop: bool = True,
165165
):
166166
"""Assemble the bytecode that measures gas usage."""
@@ -173,9 +173,7 @@ def __new__(
173173
+ Op.SUB
174174
+ Op.PUSH1(overhead_cost + 2)
175175
+ Op.SWAP1
176-
+ Op.SUB
177-
+ Op.PUSH1(sstore_key)
178-
+ Op.SSTORE
176+
+ Op.SSTORE(sstore_key, Op.SUB)
179177
)
180178
if stop:
181179
res += Op.STOP

0 commit comments

Comments
 (0)