Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nonce starting at 0 #1

Closed
wants to merge 42 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2614ad0
docs: fix documentation links after update (#56)
antonbaliasnikov Jun 25, 2024
e80d380
feat: support vyper v0.4.0 (#51)
hedgar2017 Jun 27, 2024
0e1ac17
chore: add linux arm64 platform dir for vyper bins (#57)
antonbaliasnikov Jun 27, 2024
5c4eb01
fix: remove redundant Ethereum artifacts from Vyper tests (#58)
hedgar2017 Jun 29, 2024
7a04d47
docs: add info about special tags in other repos (#59)
antonbaliasnikov Jul 1, 2024
25c32e2
fix: the Vyper Cancun version check
hedgar2017 Jul 1, 2024
c85aa46
Update pull_request_template.md
hedgar2017 Jul 1, 2024
cdd1534
Fix nonce starting at 0
gianbelinche Jul 4, 2024
84f5005
Add EVMAddressIterator false to matterlabstest
gianbelinche Jul 4, 2024
5f92263
chore: update the EVMInterpreter
hedgar2017 Jul 5, 2024
2e1e179
ci: fix default llvm versions for benchmarks (#63)
antonbaliasnikov Jul 10, 2024
e5bbfa3
chore: Pull the latest changes of the EVMInterpreter (#64)
vladimirradosavljevic Jul 10, 2024
c51d34e
Merge branch 'fix-semantic-tests' into nonce-address-fix
jrchatruc Jul 11, 2024
f52ca6c
chore: update deps
hedgar2017 Jul 11, 2024
2baad11
fuzzer: fix readme and targets after renaming; simple ⇒ demo (#65)
FlashSheridan Jul 12, 2024
43864aa
fix: upstream semantic tests for EVM (#60)
jorbush Jul 12, 2024
9047a09
Merge branch 'main' into az-cpr-1741-add-the-target-filter-to-tests
hedgar2017 Jul 12, 2024
493710c
Merge branch 'main' into az-cpr-1741-add-the-target-filter-to-tests
hedgar2017 Jul 12, 2024
9ac4deb
fix: names of some Yul tests
hedgar2017 Jul 14, 2024
4a0b978
chore: refactor system context
hedgar2017 Jul 14, 2024
3ab1f17
feat: rename EVM to EVMEmulator
hedgar2017 Jul 14, 2024
48bc70d
Merge branch 'az-cpr-1741-add-the-target-filter-to-tests' into nonce-…
IAvecilla Jul 15, 2024
4728c20
Remove unused imports
IAvecilla Jul 15, 2024
2b5242a
Fix target check when converting expected from ethereum
IAvecilla Jul 16, 2024
603c8cb
fix: upstream balance for `ecrecover` address (#69)
IAvecilla Jul 16, 2024
c70aee0
fix: upstream evm contract nonces starting at 0 instead of 1 (#68)
IAvecilla Jul 16, 2024
d9704ef
fix: burn all gas with assert unreachable (#70)
hedgar2017 Jul 16, 2024
1dcad9d
feat: integrate REVM instead of SputnikEVM (#67)
gianbelinche Jul 17, 2024
47b611e
Merge branch 'main' into az-cpr-1741-add-the-target-filter-to-tests
hedgar2017 Jul 17, 2024
6df1e19
fix: some warnings
hedgar2017 Jul 17, 2024
2f4be98
feat: Move REVM logic to new vm module (#71)
IAvecilla Jul 22, 2024
65dd1f6
feat: vyper combined JSON I/O overhaul (#72)
hedgar2017 Jul 23, 2024
d10fbaa
Use consistent importing
jrchatruc Jul 29, 2024
986bac4
fix: ignored loop range bounds (#76)
hedgar2017 Jul 30, 2024
3a374a3
Change the evm address iterator to receive the starting nonce by para…
jrchatruc Jul 30, 2024
f5c9221
ci: make integration tests and benchmarks skippable (#77)
antonbaliasnikov Jul 31, 2024
62cde03
chore: Update EVMInterpreter (#78)
vladimirradosavljevic Jul 31, 2024
3cf0de4
Merge branch 'az-cpr-1741-add-the-target-filter-to-tests' into nonce-…
jrchatruc Jul 31, 2024
9b55249
Fix inconsistent import
jrchatruc Jul 31, 2024
64c37d4
Update tests submodule
jrchatruc Jul 31, 2024
5183698
Merge remote-tracking branch 'origin/main' into nonce-address-fix
jrchatruc Jul 31, 2024
4352eac
cargo update compiler-vyper
jrchatruc Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions fuzzer/README.md
Original file line number Diff line number Diff line change
@@ -11,25 +11,40 @@ The project consists of the following directories:

### Fuzzing targets

Each fuzzing target is a separate Rust binary crate and defined in the `fuzz_targets` directory. The `Cargo.toml` file in the root directory contains the dependencies and the configuration for the fuzzing engine.
Each fuzzing target is a separate Rust binary crate and defined in the `fuzz_targets` directory. The `Cargo.toml` file in the fuzzer directory contains the dependencies and the configuration for the fuzzing engine.

For example, the `simple` fuzzing target is defined in the `fuzz_targets/simple.rs` file. The `Cargo.toml` file contains the following section:
For example, the `demo` fuzzing target is defined in the `fuzz_targets/demo.rs` file. The `Cargo.toml` file contains the following section:

```properties
[[bin]]
name = "simple"
path = "fuzz_targets/simple.rs"
name = "demo"
path = "fuzz_targets/demo.rs"
...
```

`cargo fuzz add <target_name>` command can be used to add a new empty fuzzing target.

## Running fuzzing

To run the fuzzing, execute the following command:
### Prerequisites

1. Follow the build instructions from [README.md](../README.md) to build `era-compiler-tester`.
2. Install the `cargo-fuzz` tool:
```bash
cargo fuzz run <target_name>
cargo install cargo-fuzz
```
3. Build `zksolc` compiler and make sure that `zksolc` is added in the `PATH`.
4. Install nightly Rust toolchain:
```bash
rustup toolchain install nightly
```

### Executing fuzzing

To execute a fuzzing target, run the following command from the root directory of the project:

```bash
cargo +nightly fuzz run --fuzz-dir fuzzer <target_name>
```

## Supported targets
2 changes: 1 addition & 1 deletion fuzzer/fuzz_targets/common.rs
Original file line number Diff line number Diff line change
@@ -151,7 +151,7 @@ pub fn gen_fuzzing_test(case: FuzzingCase) -> anyhow::Result<EthereumTest> {
/// * `Summary` - The test summary
pub fn build_and_run(test: EthereumTest) -> anyhow::Result<Summary> {
// TODO: this should be parametrized
let solc_version = semver::Version::new(0, 8, 24);
let solc_version = semver::Version::new(0, 8, 26);
let mode = Mode::Solidity(SolidityMode::new(
solc_version,
SolcPipeline::Yul,
2 changes: 1 addition & 1 deletion fuzzer/fuzz_targets/demo.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ mod common;
fuzz_target!(|data: u8| {
// Fuzzing case definition
let case = common::FuzzingCase {
contract_path: String::from("fuzz/fuzz_contracts/demo/demo.sol"),
contract_path: String::from("fuzzer/fuzz_contracts/demo/demo.sol"),
function_name: String::from("should_always_return_0"),
input_types: vec![common::TypeVariant::integer_unsigned(8)],
inputs: vec![common::integer_literal(data)],
2 changes: 1 addition & 1 deletion fuzzer/fuzz_targets/optimizer_bug.rs
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ mod common;
fuzz_target!(|data: u8| {
// Fuzzing case definition
let case = common::FuzzingCase {
contract_path: String::from("fuzz/fuzz_contracts/optimizer_bug/optimizer_bug.sol"),
contract_path: String::from("fuzzer/fuzz_contracts/optimizer_bug/optimizer_bug.sol"),
function_name: String::from("function_to_fuzz"),
input_types: vec![
common::TypeVariant::integer_unsigned(8),