Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cassc committed Nov 21, 2023
1 parent 05b7081 commit 65616e8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
- Rust
- Cargo

## Download

Prebuilt binaries are available for Ubuntu 22.04 at [release page](https://github.com/cassc/evm_interpreter/releases).

## Installation

```bash
Expand Down Expand Up @@ -92,10 +96,25 @@ ID: 608060 ✅ OUTPUT: 0x0000000000000000000000000000000000000000000000000000000

### Run ethtest json file(s)

Randomly select
``` bash
❯ evm-interpreter compare -h
Compares the output of two EVM interpreters

Usage: evm-interpreter compare [OPTIONS] --executable <EXECUTABLE> --test-json <TEST_JSON>

Options:
--executable <EXECUTABLE> Path to another EVM interpreter executable
--test-json <TEST_JSON> A path which contains ethtest JSON files
--pprint If provided, print stack traces to stdout
--limit <LIMIT> Maximum number of test files to run, valid when using with --test-json [default: 10]
--failfast Fail on the first mismatch
-h, --help Print help
```

Randomly select 10 testcases to run

``` bash
evm-interpreter --test-json dev-resources/ethtest/GeneralStateTests/stSolidityTest/ --pprint --output out.json

```

## Caveats
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ fn compare_evms(
"Comparing {} Passed? {}",
json_file.display(),
if let Err(e) = &r {
format!("❌ {:?}", e)
format!("❌ {:?}", e.to_string())
} else {
"✅".to_string()
}
);

if failfast && r.is_err() {
panic!("Failfast is enabled, exiting");
std::process::exit(1);
}
});
}
Expand Down

0 comments on commit 65616e8

Please sign in to comment.