Skip to content

Commit 95c3bcc

Browse files
committed
updated docs
1 parent 67c1bd7 commit 95c3bcc

File tree

6 files changed

+9
-302
lines changed

6 files changed

+9
-302
lines changed

docs/CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ Test fixtures for use by clients are available for each release on the [Github r
88

99
### 💥 Breaking Change
1010

11+
#### 💥 Important Change for test contributors
12+
13+
We do not allow usage of Yul code in your Python tests anymore. Please from now on make use of our opcode wrapper. The only place where Yul code is still allowed is in `static_tests`.
14+
1115
#### 💥 Important Change for `fill` Users
1216

1317
The output behavior of `fill` has changed ([#1608](https://github.com/ethereum/execution-spec-tests/pull/1608)):
@@ -26,7 +30,7 @@ Users can select any of the artifacts depending on their testing needs for their
2630
#### 🔀 Refactoring
2731

2832
- 🔀 Move `TransactionType` enum from test file to proper module location in `ethereum_test_types.transaction_types` for better code organization and reusability.
29-
- 🔀 Remove dependency `solc-select` and in CI instead fetch solc 0.8.24 from the official GitHub release. Code changes required involved porting a few Python tests that made use of Yul to our Opcode language ([#1779](https://github.com/ethereum/execution-spec-tests/pull/1779)).
33+
- 🔀 Remove dependency `solc-select` and in CI instead fetch solc 0.8.24 from the official GitHub release. Code changes required involved porting a few Python tests that made use of Yul to our Opcode language ([#1779](https://github.com/ethereum/execution-spec-tests/pull/1779)). Solc is only needed for filling `static_tests`, from now on it is assumed that the solc binary (v0.8.24) is available in your PATH if you want to fill those.
3034

3135
#### `fill`
3236

docs/dev/porting_legacy_tests.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,14 @@ Follow the hyperlinks for lost base coverage (`LBC`) to address coverage gaps. H
8585

8686
It's important to note that coverage helps identify missing test paths. If you believe the coverage loss is due to differences in "setup" code between frameworks and doesn't impact the feature you're testing, explain this in your PR. A team member can help with the review.
8787

88-
Also note that yul tests and possibly other tests used `CALLDATALOAD` that might no longer needed when designing a test with python. But we must always investigate if an opcode is not covered anymore to see if its okay.
89-
90-
For example, review the [discussion in this PR.](https://github.com/ethereum/execution-spec-tests/pull/975#issuecomment-2528792289)
88+
For example, review the [discussion in this PR] to see an example of why and how coverage loss can occur.(https://github.com/ethereum/execution-spec-tests/pull/975#issuecomment-2528792289)
9189

9290
## Resolving Coverage Gaps from Yul Compilation
9391

9492
When porting tests from ethereum/tests, you may encounter coverage gaps that are false positives. This commonly occurs because:
9593

9694
- **Original tests** often used Yul to define smart contracts, and solc compilation introduces additional opcodes that aren't specifically under test
97-
- **EEST ports** typically use the explicit EEST Opcode mini-language, which is more precise in opcode definition
95+
- **EEST ports** use the explicit EEST Opcode mini-language, which is more precise in opcode definition
9896

9997
If coverage analysis shows missing opcodes that were only present due to Yul compilation artifacts (not the actual feature being tested), this can be resolved during PR review by adding the `coverage_missed_reason` parameter:
10098

docs/writing_tests/tutorials/blockchain.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Before proceeding with this tutorial, it is assumed that you have prior knowledg
99
- Repository set-up, see [installation](../../getting_started/installation.md).and run an execution specification test as outlined in the .
1010
- Able to run `fill`, see [Getting Started: Filling Tests](../../filling_tests/getting_started.md).
1111
- Understand how to read a [blockchain test](https://ethereum-tests.readthedocs.io/en/latest/test_filler/blockchain_filler.html).
12-
- Know the basics of [Yul](https://docs.soliditylang.org/en/latest/yul.html), which is an EVM assembly language.
1312
- Familiarity with [Python](https://docs.python.org/3/tutorial/).
1413
- Understand how to write an execution spec [state transition test](./state_transition.md).
1514

@@ -26,15 +25,7 @@ A smart contract is defined that is called by each transaction in the test. It s
2625
```python
2726
contract_addr: Account(
2827
balance=1000000000000000000000,
29-
code=Yul(
30-
"""
31-
{
32-
let next_slot := sload(0)
33-
sstore(next_slot, number())
34-
sstore(0, add(next_slot, 1))
35-
}
36-
"""
37-
),
28+
code=code,
3829
storage={
3930
0x00: 0x01,
4031
},

docs/writing_tests/tutorials/state_transition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# State Transition Tests
22

3-
This tutorial teaches you to create a state transition execution specification test. These tests verify that a starting pre-state will reach a specified post-state after executing a single transaction.
3+
This tutorial teaches you to create a state transition execution specification test. These tests verify that a starting pre-state will reach a specified post-state after executing a single transaction. Note: This tutorial is partly outdated because it still uses Yul code, today we instead only use our Python opcode language.
44

55
## Pre-requisites
66

docs/writing_tests/tutorials/state_transition_bad_opcode.md

Lines changed: 0 additions & 279 deletions
This file was deleted.

docs/writing_tests/writing_a_new_test.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ The code can be in either of the following formats:
156156
- `str`, representing an hexadecimal format of the opcodes.
157157
- `Code` compilable object.
158158

159-
Currently supported built-in compilable objects are:
160-
161-
- `Yul` object containing [Yul source code](https://docs.soliditylang.org/en/latest/yul.html).
162-
163159
`Code` objects can be concatenated together by using the `+` operator.
164160

165161
## Verifying the Accounts' Post States
@@ -201,9 +197,6 @@ It can verify the following properties of an account:
201197

202198
- `code`: Bytecode contained by the account. To verify that an account contains
203199
no code, this property needs to be set to "0x" or "".
204-
205-
It is not recommended to verify Yul compiled code in the output account,
206-
because the bytecode can change from version to version.
207200

208201
- `storage`: Storage within the account represented as a `dict` object.
209202
All storage keys that are expected to be set must be specified, and if a

0 commit comments

Comments
 (0)