Skip to content

Commit

Permalink
feat(foundry.toml): better defaults
Browse files Browse the repository at this point in the history
Fix and comment fuzz and invariant settings.
  • Loading branch information
sambacha authored May 5, 2023
1 parent de5dbdc commit f524c89
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,36 @@ book = "book.toml"
ignore = []

[fuzz]
runs = 1024
max_test_rejects = 65536
# The number of fuzz runs for fuzz tests
runs = 10_000
# The maximum number of test case rejections allowed by proptest, to be
# encountered during usage of `vm.assume` cheatcode. This will be used
# to set the `max_global_rejects` value in proptest test runner config.
# `max_local_rejects` option isn't exposed here since we're not using
# `prop_filter`.
max_test_rejects = 120000
# The weight of the dictionary
dictionary_weight = 40
# The flag indicating whether to include values from storage
include_storage = true
# The flag indicating whether to include push bytes values
include_push_bytes = true
max_fuzz_dictionary_addresses = 15728640
max_fuzz_dictionary_values = 6553600
fail_on_revert = false
call_override = false

[invariant]
runs = 512
depth = 20
# The number of runs that must execute for each invariant test group
runs = 256
# The number of calls executed to attempt to break invariants in one run
depth = 100
# Fails the invariant fuzzing if a revert occurs
fail_on_revert = false
# Allows overriding an unsafe external call when running invariant tests. eg. reentrancy checks
call_override = false
dictionary_weight = 85
# The weight of the dictionary
dictionary_weight = 80
# The flag indicating whether to include values from storage
include_storage = true
# The flag indicating whether to include push bytes values
include_push_bytes = true
max_fuzz_dictionary_addresses = 15728640
max_fuzz_dictionary_values = 6553600

[default.optimizer_details]
# constantOptimizer = true
Expand Down

0 comments on commit f524c89

Please sign in to comment.