Skip to content

Commit

Permalink
fuzzing: fix (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch authored Jan 19, 2025
1 parent aeae367 commit 1ec3969
Show file tree
Hide file tree
Showing 14 changed files with 534 additions and 296 deletions.
40 changes: 20 additions & 20 deletions fuzzing/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuzzing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ doctest = false
testutils = []

[dependencies]
soroban-sdk = { version = "22.0.1" }
soroban-sdk = { version = "22.0.5" }

[dev-dependencies]
soroban-sdk = { version = "22.0.1", features = ["testutils"] }
soroban-sdk = { version = "22.0.5", features = ["testutils"] }
arbitrary = { version = "1.1.3", features = ["derive"] }
proptest = "1.2.0"
proptest-arbitrary-interop = "0.1.0"
Expand Down
40 changes: 20 additions & 20 deletions fuzzing/fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions fuzzing/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ cargo-fuzz = true

[dependencies]
libfuzzer-sys = "0.4"
soroban-sdk = { version = "22.0.1", features = ["testutils"] }
soroban-ledger-snapshot = { version = "22.0.1" }
soroban-sdk = { version = "22.0.5", features = ["testutils"] }
soroban-ledger-snapshot = { version = "22.0.5" }

[dependencies.soroban-fuzzing-contract]
path = ".."
Expand Down
2 changes: 1 addition & 1 deletion fuzzing/fuzz/fuzz_targets/fuzz_target_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fuzz_target!(|input: Input| {
});

// Turn off the CPU/memory budget for testing.
env.cost_estimate().detailed_metering().reset_unlimited();
env.cost_estimate().budget().reset_unlimited();

let depositor_address = Address::generate(&env);
let claimant_address = Address::generate(&env);
Expand Down
2 changes: 1 addition & 1 deletion fuzzing/fuzz/fuzz_targets/fuzz_target_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ fuzz_target!(|input: Input| {
snapshot.ledger.sequence_number += 1;
snapshot.ledger.timestamp = snapshot.ledger.timestamp.saturating_add(step.advance_time);
let env = Env::from_snapshot(snapshot);
env.cost_estimate().detailed_metering().reset_unlimited();
env.cost_estimate().budget().reset_unlimited();
env
};

Expand Down
2 changes: 1 addition & 1 deletion fuzzing/src/proptest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ proptest! {
});

// Turn off the CPU/memory budget for testing.
env.budget().reset_unlimited();
env.cost_estimate().budget().reset_unlimited();

let depositor_address = Address::generate(&env);
let claimant_address = Address::generate(&env);
Expand Down
Loading

0 comments on commit 1ec3969

Please sign in to comment.