You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FUZZING_GUIDE.md
+58-2Lines changed: 58 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,9 @@ in the contract crate and use the same `PROPTEST_CASES` setting as this guide.
44
44
# Run property tests with default 256 cases per property.
45
45
cargo test --test property_tests
46
46
47
+
# Run contract property tests.
48
+
cargo test --test contract_property_tests
49
+
47
50
# Increase cases for a deeper search.
48
51
PROPTEST_CASES=5000 cargo test --test property_tests
49
52
@@ -63,6 +66,9 @@ cargo fuzz list --fuzz-dir fuzz
63
66
# Run a specific target for 60 seconds.
64
67
cargo fuzz run fuzz_validate_public_key --fuzz-dir fuzz -- -max_total_time=60
65
68
69
+
# Run a contract fuzz target.
70
+
cargo fuzz run fuzz_wasm_validation --fuzz-dir fuzz -- -max_total_time=60
71
+
66
72
# Run with a size cap (good for initial exploration).
67
73
cargo fuzz run fuzz_passphrase_strength --fuzz-dir fuzz \
68
74
-- -max_total_time=120 -max_len=1024
@@ -120,6 +126,7 @@ Additional property suites live in their own files:
120
126
|---|---|---|
121
127
|[`tests/config_property_tests.rs`](tests/config_property_tests.rs)| Config round trips | TOML/JSON serialization preserves every value; merging is identity-on-empty, idempotent, and overlay-wins; malformed combinations (unknown network, duplicate wallet, non-HTTP endpoint, unknown overlay key) are rejected |
122
128
|[`tests/wallet_import_property_tests.rs`](tests/wallet_import_property_tests.rs)| Wallet import/backup | The same invariants the wallet fuzz targets assert, run on stable in every `cargo test` sweep |
|`fuzz_wallet_backup_structured`| Near-valid backup documents built with `arbitrary::Arbitrary`, to reach the semantic checks the byte-level harness rarely hits |
0 commit comments