Skip to content

Commit 84a34f4

Browse files
authored
docs(config): complete fuzz and invariant sections with 20+ missing options (#12789)
1 parent 48f27e5 commit 84a34f4

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

crates/config/README.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,91 @@ fs_permissions = [{ access = "read", path = "./out"}]
194194
assertions_revert = true
195195
# whether `failed()` should be invoked to check if the test have failed
196196
legacy_assertions = false
197+
197198
[fuzz]
198199
runs = 256
199200
max_test_rejects = 65536
200201
seed = '0x3e8'
202+
# Fails the fuzz test if a revert occurs
203+
fail_on_revert = true
204+
# Number of runs to execute and include in the gas report
205+
gas_report_samples = 256
206+
# Show `console.log` in fuzz test
207+
show_logs = false
208+
# Optional timeout (in seconds) for each property test
209+
# timeout = 60
210+
# Path where fuzz failures are recorded and replayed
211+
# failure_persist_dir = 'cache/fuzz'
212+
213+
# Fuzz dictionary configuration
201214
dictionary_weight = 40
202215
include_storage = true
203216
include_push_bytes = true
217+
# Maximum addresses to record for the fuzz dictionary
218+
max_fuzz_dictionary_addresses = 15728640
219+
# Maximum values to record for the fuzz dictionary
220+
max_fuzz_dictionary_values = 9830400
221+
# Maximum literals to seed from the AST for the fuzz dictionary
222+
max_fuzz_dictionary_literals = 6553600
223+
224+
# Fuzz corpus configuration (for coverage-guided fuzzing)
225+
# Path to corpus directory, enables coverage guided fuzzing mode
226+
# corpus_dir = 'corpus'
227+
# Whether corpus uses gzip compression
228+
corpus_gzip = true
229+
# Number of mutations until entry marked as eligible to be flushed from in-memory corpus
230+
corpus_min_mutations = 5
231+
# Minimum corpus size that won't be evicted from memory
232+
corpus_min_size = 0
233+
# Whether to collect and display edge coverage metrics
234+
show_edge_coverage = false
204235

205236
[invariant]
206237
runs = 256
207238
depth = 500
208239
fail_on_revert = false
209240
call_override = false
241+
# The maximum number of attempts to shrink the sequence
242+
shrink_run_limit = 5000
243+
# The maximum number of rejects via `vm.assume` which can be encountered during a single invariant run
244+
max_assume_rejects = 65536
245+
# Number of runs to execute and include in the gas report
246+
gas_report_samples = 256
247+
# Whether to collect and display fuzzed selectors metrics
248+
show_metrics = true
249+
# Optional timeout (in seconds) for each invariant test
250+
# timeout = 60
251+
# Display counterexample as solidity calls
252+
show_solidity = false
253+
# Maximum time (in seconds) between generated txs
254+
# max_time_delay = 86400
255+
# Maximum number of blocks elapsed between generated txs
256+
# max_block_delay = 10000
257+
# Path where invariant failures are recorded and replayed
258+
# failure_persist_dir = 'cache/invariant'
259+
260+
# Invariant dictionary configuration
210261
dictionary_weight = 80
211262
include_storage = true
212263
include_push_bytes = true
213-
shrink_run_limit = 5000
264+
# Maximum addresses to record for the fuzz dictionary
265+
max_fuzz_dictionary_addresses = 15728640
266+
# Maximum values to record for the fuzz dictionary
267+
max_fuzz_dictionary_values = 9830400
268+
# Maximum literals to seed from the AST for the fuzz dictionary
269+
max_fuzz_dictionary_literals = 6553600
270+
271+
# Invariant corpus configuration (for coverage-guided fuzzing)
272+
# Path to corpus directory, enables coverage guided fuzzing mode
273+
# corpus_dir = 'corpus'
274+
# Whether corpus uses gzip compression
275+
corpus_gzip = true
276+
# Number of mutations until entry marked as eligible to be flushed from in-memory corpus
277+
corpus_min_mutations = 5
278+
# Minimum corpus size that won't be evicted from memory
279+
corpus_min_size = 0
280+
# Whether to collect and display edge coverage metrics
281+
show_edge_coverage = false
214282

215283
[fmt]
216284
line_length = 100

0 commit comments

Comments
 (0)