Skip to content

Commit 17aeb0a

Browse files
authored
Feat: update ethereum/tests to v17.0 (#86)
* Update ethtests to v17.0 * Updated badges for README
1 parent f24bc36 commit 17aeb0a

5 files changed

Lines changed: 132 additions & 72 deletions

File tree

.github/workflows/lint.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v4
17+
18+
- name: Rustfmt
19+
run: cargo fmt --all -- --check
20+
21+
- name: Clippy
22+
run: cargo clippy --workspace --all-targets -- -D clippy::all -D clippy::nursery
23+
- name: Clippy no_std
24+
run: cargo clippy --no-default-features -- -D clippy::all -D clippy::nursery
25+
- name: Clippy with features
26+
run: cargo clippy --features tracing,create-fixed -- -D clippy::all -D clippy::nursery
27+
- name: Clippy with features for evm-jsontests
28+
run: cargo clippy -p evm-jsontests --features dump-state -- -D clippy::all -D clippy::nursery
29+
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout sources
34+
uses: actions/checkout@v4
35+
36+
- name: Build
37+
run: cargo build --verbose
38+
39+
- name: Build NoStd
40+
run: cargo build --no-default-features
41+
42+
- name: Build for feature (tracing)
43+
run: cargo build --features tracing

.github/workflows/rust.yml

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust
1+
name: Ethereum tests
22

33
on:
44
push:
@@ -7,43 +7,10 @@ on:
77

88
env:
99
CARGO_TERM_COLOR: always
10-
ETHTESTS_VERSION: v14.1
10+
ETHTESTS_VERSION: v17.0
1111
ETHEREUM_SPEC_TESTS_URL: https://github.com/ethereum/execution-spec-tests/releases/download/pectra-devnet-6%40v1.0.0/fixtures_pectra-devnet-6.tar.gz
1212

1313
jobs:
14-
lint:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Checkout sources
18-
uses: actions/checkout@v4
19-
20-
- name: Rustfmt
21-
run: cargo fmt --all -- --check
22-
23-
- name: Clippy
24-
run: cargo clippy --workspace --all-targets -- -D clippy::all -D clippy::nursery
25-
- name: Clippy no_std
26-
run: cargo clippy --no-default-features -- -D clippy::all -D clippy::nursery
27-
- name: Clippy with features
28-
run: cargo clippy --features tracing,create-fixed -- -D clippy::all -D clippy::nursery
29-
- name: Clippy with features for evm-jsontests
30-
run: cargo clippy -p evm-jsontests --features dump-state -- -D clippy::all -D clippy::nursery
31-
32-
build:
33-
runs-on: ubuntu-latest
34-
steps:
35-
- name: Checkout sources
36-
uses: actions/checkout@v4
37-
38-
- name: Build
39-
run: cargo build --verbose
40-
41-
- name: Build NoStd
42-
run: cargo build --no-default-features
43-
44-
- name: Build for feature (tracing)
45-
run: cargo build --features tracing
46-
4714
unit-tests:
4815
runs-on: ubuntu-latest
4916
steps:
@@ -99,8 +66,6 @@ jobs:
9966
ethtests/GeneralStateTests/ \
10067
ethtests/LegacyTests/Cancun/GeneralStateTests/ \
10168
ethereum-spec-tests/fixtures/state_tests/
102-
# Temporally disable as EOFv1 not implemented
103-
# ethtests/EIPTests/StateTests/
10469
10570
- name: Run Ethereum vm tests
10671
run: |
@@ -151,8 +116,7 @@ jobs:
151116
ethtests/GeneralStateTests/ \
152117
ethtests/LegacyTests/Cancun/GeneralStateTests/ \
153118
ethereum-spec-tests/fixtures/state_tests/
154-
# Temporally disable as EOFv1 not implemented
155-
# ethtests/EIPTests/StateTests/
119+
156120
cargo run -r -p evm-jsontests -F enable-slow-tests -- vm -f \
157121
ethtests/LegacyTests/Constantinople/VMTests/vmArithmeticTest \
158122
ethtests/LegacyTests/Constantinople/VMTests/vmBitwiseLogicOperation \

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
[![Build Status](https://github.com/rust-blockchain/evm/workflows/Rust/badge.svg)](https://github.com/rust-blockchain/evm/actions?query=workflow%3ARust)
21
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](sLICENSE)
2+
[![Build & Lint Status](https://github.com/aurora-is-near/aurora-evm/actions/workflows/lint.yml/badge.svg)](https://github.com/aurora-is-near/aurora-evm/actions/workflows/lint.yml)
3+
[![Ethereum tests Status](https://github.com/aurora-is-near/aurora-evm/actions/workflows/rust.yml/badge.svg)](https://github.com/aurora-is-near/aurora-evm/actions/workflows/rust.yml)
4+
[![Crates.io version](https://img.shields.io/crates/v/aurora-evm.svg?style=flat-square)](https://crates.io/crates/aurora-evm)
5+
[![Crates.io Total Downloads](https://img.shields.io/crates/d/aurora-evm?style=flat-square&label=crates.io%20downloads)](https://crates.io/crates/aurora-evm)
6+
37

48
<div align="center">
59
<h1>Aurora EVM</h1>
@@ -47,7 +51,7 @@ To get started, add the following dependency to your `Cargo.toml`:
4751

4852
```toml
4953
[dependencies]
50-
aurora-evm = "1.0"
54+
aurora-evm = "2.0"
5155
```
5256

5357
## License: [MIT](LICENSE)

evm-tests/jsontests/src/main.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::fs;
88
use std::fs::File;
99
use std::io::BufReader;
1010
use std::path::{Path, PathBuf};
11+
use std::sync::Arc;
1112

1213
#[allow(clippy::cognitive_complexity)]
1314
fn main() -> Result<(), String> {
@@ -239,8 +240,15 @@ fn run_test_for_file(
239240
let test_suite = serde_json::from_reader::<_, HashMap<String, statetests::Test>>(reader)
240241
.expect("Parse test cases failed");
241242

243+
let file_name = Arc::new(file_name.to_path_buf());
242244
for (name, test) in test_suite {
243-
let test_res = statetests::test(verbose_output.clone(), &name, test, spec.clone());
245+
let test_res = statetests::test(
246+
verbose_output.clone(),
247+
&name,
248+
test,
249+
spec.clone(),
250+
file_name.clone(),
251+
);
244252

245253
if test_res.failed > 0 {
246254
if verbose_output.verbose {

0 commit comments

Comments
 (0)