This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
forked from 0xPolygonZero/evm-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request 0xPolygonZero#37 from topos-protocol/update_latest
Update with latest plonky2 and rely on BlockchainTests instead
- Loading branch information
Showing
25 changed files
with
568 additions
and
1,349 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,58 @@ | ||
# EVM Test | ||
|
||
Parses and runs compatible common Ethereum tests from [ethereum/tests](https://github.com/ethereum/tests) against Polygon Zero's EVM. | ||
|
||
> Note: This repo is currently very early in development and is not yet ready to evaluate the EVM completeness! | ||
## Components | ||
|
||
### Parser | ||
|
||
Since the tests from the Ethereum test repo are meant for a full node, only certain tests are compatible with our EVM. Additionally, for the tests that are compatible, they need to be parsed (or converted) into a format that is usable by our EVM. | ||
|
||
The parser has two responsibilities: | ||
|
||
- Query the upstream Ethereum tests repo and check if any tests have been added/updated/removed. | ||
- If there is a change, re-parse the tests. | ||
|
||
### Runner | ||
|
||
The runner feeds the parsed tests into the EVM. Successes are defined as no errors occurring (the tests themselves do not provide an expected final state). If the EVM returns an error or panics, then the test is considered to have failed. | ||
|
||
The runner also outputs a results file (likely as a `*.md`) which contains statistics on the last test run. | ||
|
||
## Quick Start | ||
|
||
*TODO: Add more details...* | ||
|
||
Run the parser to parse the Eth tests into a format usable by `plonky2`: | ||
|
||
```sh | ||
cd eth_test_parser | ||
cargo run | ||
``` | ||
|
||
Then launch the runner pointing it at the parsed tests directory: | ||
|
||
```sh | ||
cd ../evm_test_runner | ||
cargo run --release -- -r summary ../generation_inputs # For a high-level summary report | ||
cargo run --release -- -r test ../generation_inputs # For detailed information per test (likely want to use a filter with `-f`) | ||
cargo run --release -- -r summary ../generation_inputs/BlockchainTests # For a high-level summary report | ||
cargo run --release -- -r test ../generation_inputs/BlockchainTests # For detailed information per test (likely want to use a filter with `-f`) | ||
``` | ||
|
||
## Other | ||
|
||
[Polygon Hermez](https://github.com/0xPolygonHermez) is doing something similar [here](https://github.com/0xPolygonHermez/zkevm-testvectors). | ||
|
||
## License | ||
|
||
Licensed under either of | ||
|
||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) | ||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>) | ||
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>) | ||
|
||
at your option. | ||
|
||
## Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub const GENERATION_INPUTS_DEFAULT_OUTPUT_DIR: &str = "generation_inputs"; | ||
pub const MAIN_TEST_DIR: &str = "BlockchainTests"; | ||
pub const MATIC_CHAIN_ID: u64 = 137; | ||
pub const ETHEREUM_CHAIN_ID: u64 = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
pub mod config; | ||
pub mod revm; | ||
pub mod types; | ||
pub mod utils; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.