Skip to content

Commit 8009f58

Browse files
committed
update README.md
Signed-off-by: Cyrill Leutwiler <[email protected]>
1 parent c590fa7 commit 8009f58

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
11
# revive-differential-tests
2-
revive differential testing framework
2+
3+
The revive differential testing framework allows to define smart contract tests in a declarative manner in order to compile and execute them against different Ethereum-compatible blockchain implmentations. This is useful to:
4+
- Analyze observable differences in contract compilation and execution across different blockchain implementations, including contract storage, account balances, transaction output and emitted events on a per-transaction base.
5+
- Collect and compare benchmark metrics such as code size, gas usage or transaction throughput per seconds (TPS) of different blockchain implementations.
6+
- Ensure reproducible contract builds across multiple compiler implementations or multiple host platforms.
7+
- Implement end-to-end regression tests for Ethereum-compatible smart contract stacks.
8+
9+
# Declarative test format
10+
11+
For now, the format used to write tests is the [matter-labs era compiler format](https://github.com/matter-labs/era-compiler-tests?tab=readme-ov-file#matter-labs-simplecomplex-format). This allows us to re-use many tests from their corpora.
12+
13+
# The `retester` utility
14+
15+
The `retester` helper utilty is used to run the tests. To get an idea of what `retester` can do, please consults its command line help:
16+
17+
```
18+
cargo run -p revive-dt-core -- --help
19+
```
20+
21+
For example, to run the [complex Solidity tests](https://github.com/matter-labs/era-compiler-tests/tree/main/solidity/complex), define a corpus structure as follows:
22+
23+
```json
24+
{
25+
"name": "ML Solidity Complex",
26+
"path": "/path/to/era-compiler-tests/solidity/complex"
27+
}
28+
```
29+
30+
Assuming this to be saved in a `ml-solidity-complex.json` file, the following command will try to compile and execute the tests found inside the corpus:
31+
32+
```bash
33+
RUST_LOG=debug cargo r --release -p revive-dt-core -- --corpus ml-solidity-complex.json
34+
```

0 commit comments

Comments
 (0)