Skip to content

Commit 6296005

Browse files
mrLSDaleksuss
andauthored
Feat: aurora-evm-tests - ethjson refactoring (#95)
* Added basic StateTestCase, Env and json utils * Update rust toolchain to v1.86 * Fix clippy issues * Refactored with clippy fix * Added PostState logic * Extended types * Added full version of StateTestCase for eth-tests deserializer * eth-json tests deserializer fix all fields and pass all tests * State and VM refactoring * VM tests refactoring * Fix Vm-tests. Fix CI * Fix CI * Refactore deserialization for StateAccount and ExecutionTransaction * Blob gas for evm-tests * Types and state refactoring * Refactore tests vicinity * StateTests refactoring and fixes * Fix clippy * change rust to v1.86 * Fix toolchain * Fix clippy * Extend tests-runner * Extendn tests-runner with asserts validations * Extend eth-json tests EIPs * Added precompiles dependecies to aurora-engine * Refactored test-runner flow * Extend CLI arguments with test name args * Extend debug message * Extend debug info * Fix state account state for storage * Refactored json tests up to Cancun hardfork with all precompiles, including KZG. Adde debug info with TODO points * Force doungrade generic-array to v0.14.6 * Prague precompiles refactoring * Refactore: removed old code and dependencies * Refactoring: remove all old ethjson packages and remove all rependencies. Code clean up * Update evm-jsontests dependencies * Added precompiles state dump util * Fix generic-array crate issue * Small fixes after review * After review changes * chore: some refactoring and fix typos * chore: use ecrecover from aurora_engine_precompiles * chore: fix typo in the GasFloorMoreThanGasLimit error message --------- Co-authored-by: Oleksandr Anyshchenko <oleksandr.anyshchenko@aurora.dev>
1 parent 3e508d0 commit 6296005

88 files changed

Lines changed: 3615 additions & 11578 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
run: cargo clippy --no-default-features -- -D clippy::all -D clippy::nursery
2525
- name: Clippy with features
2626
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
27+
- name: Clippy with features for aurora-evm-jsontests
28+
run: cargo clippy -p aurora-evm-jsontests --features dump-state -- -D clippy::all -D clippy::nursery
2929

3030
build:
3131
runs-on: ubuntu-latest

.github/workflows/rust.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
7777
- name: Run Ethereum state tests
7878
run: |
79-
cargo run -r -p evm-jsontests -F enable-slow-tests -- state -f \
79+
cargo run -r -p aurora-evm-jsontests -F enable-slow-tests -- state -f \
8080
ethtests/GeneralStateTests/ \
8181
ethereum-spec-tests-static/fixtures/state_tests/ \
8282
ethtests/LegacyTests/Cancun/GeneralStateTests/ \
@@ -85,7 +85,7 @@ jobs:
8585
8686
- name: Run Ethereum vm tests
8787
run: |
88-
cargo run -r -p evm-jsontests -F enable-slow-tests -- vm -f \
88+
cargo run -r -p aurora-evm-jsontests -F enable-slow-tests -- vm -f \
8989
ethtests/LegacyTests/Constantinople/VMTests/vmArithmeticTest \
9090
ethtests/LegacyTests/Constantinople/VMTests/vmBitwiseLogicOperation \
9191
ethtests/LegacyTests/Constantinople/VMTests/vmBlockInfoTest \
@@ -138,14 +138,14 @@ jobs:
138138
mkdir ethereum-spec-tests-static
139139
tar -xzf ethereum-spec-tests-static.tar.gz -C ethereum-spec-tests-static
140140
141-
cargo run -r -p evm-jsontests -F enable-slow-tests -- state -f \
141+
cargo run -r -p aurora-evm-jsontests -F enable-slow-tests -- state -f \
142142
ethtests/GeneralStateTests/ \
143143
ethereum-spec-tests-static/fixtures/state_tests/ \
144144
ethtests/LegacyTests/Cancun/GeneralStateTests/ \
145145
ethereum-spec-tests/fixtures/state_tests/ \
146146
ethereum-spec-tests2/fixtures/state_tests/
147147
148-
cargo run -r -p evm-jsontests -F enable-slow-tests -- vm -f \
148+
cargo run -r -p aurora-evm-jsontests -F enable-slow-tests -- vm -f \
149149
ethtests/LegacyTests/Constantinople/VMTests/vmArithmeticTest \
150150
ethtests/LegacyTests/Constantinople/VMTests/vmBitwiseLogicOperation \
151151
ethtests/LegacyTests/Constantinople/VMTests/vmBlockInfoTest \

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
target
1010
**/result
1111
tests.bin
12-
Cargo.lock
12+
Cargo.lock
13+
ethtests/

Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
resolver = "2"
33
members = [
44
"evm",
5-
"evm-tests/jsontests"
5+
"evm-tests"
66
]
77

88
[workspace.package]
99
authors = ["Aurora Labs <hello@aurora.dev>"]
1010
edition = "2021"
11-
version = "2.1.3"
11+
version = "2.2.0"
1212
description = "Aurora Ethereum Virtual Machine implementation written in pure Rust"
1313
categories = ["no-std", "compilers", "cryptography::cryptocurrencies"]
1414
keywords = ["aurora-evm", "evm", "ethereum", "blockchain", "no_std"]
@@ -22,4 +22,8 @@ auto_impl = "1.0"
2222
primitive-types = { version = "0.13", default-features = false }
2323
rlp = { version = "0.6", default-features = false, features = ["derive"] }
2424
sha3 = { version = "0.10", default-features = false }
25-
serde = { version = "1.0", features = ["derive"] }
25+
serde = { version = "1.0", default-features = false }
26+
27+
[patch.crates-io]
28+
# Constrain to v0.14.6 to ensure compatibility with sha3 0.10 and prevent unexpected upgrades
29+
generic-array = { git = "https://github.com/fizyk20/generic-array", rev = "effb209dd7e61b8226e194dec2979314e27598d1" }

evm-tests/Cargo.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[package]
2+
name = "aurora-evm-jsontests"
3+
version.workspace = true
4+
license = "MIT"
5+
authors.workspace = true
6+
description = "Aurora EVM json tests"
7+
repository.workspace = true
8+
keywords.workspace = true
9+
edition.workspace = true
10+
publish = false
11+
12+
[lints.clippy]
13+
all = { level = "deny", priority = -1 }
14+
pedantic = { level = "deny", priority = -1 }
15+
nursery = { level = "deny", priority = -1 }
16+
17+
[dependencies]
18+
aurora-engine-modexp = { git = "https://github.com/aurora-is-near/aurora-engine.git", tag = "3.10.0-rc.1" }
19+
aurora-engine-precompiles = { git = "https://github.com/aurora-is-near/aurora-engine.git", tag = "3.10.0-rc.1" }
20+
aurora-evm.workspace = true
21+
bytecount = "0.6"
22+
clap = { version = "4.5", features = ["cargo"] }
23+
c-kzg = "1.0"
24+
derive_more = { version = "2", features = ["full"] }
25+
ethereum = "0.18"
26+
hex = "0.4"
27+
hex-literal = "1.1"
28+
libsecp256k1 = "0.7"
29+
primitive-types = { workspace = true, features = ["serde"] }
30+
rlp.workspace = true
31+
sha2 = { version = "0.10.0", default-features = false }
32+
sha3.workspace = true
33+
serde.workspace = true
34+
serde_json = "1.0"
35+
36+
[features]
37+
enable-slow-tests = []
38+
print-debug = ["aurora-evm/print-debug"]
39+
dump-state = ["aurora-evm/with-serde"]

evm-tests/EIP-152/Cargo.toml

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

evm-tests/EIP-152/LICENSE

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

evm-tests/EIP-152/benches/bench.rs

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

0 commit comments

Comments
 (0)