Skip to content

Commit 2d9e871

Browse files
committed
Apply changes from Gustavo's review
1 parent 62df258 commit 2d9e871

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

program-analysis/echidna/configuration.md

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,37 +23,39 @@ The test mode to run. It should be one of the following items:
2323
- `"overflow"`: Detect integer overflows (only available in Solidity 0.8.0 or greater).
2424
- `"exploration"`: Run contract code without executing any tests.
2525

26+
Review the [testing modes tutorial](./basic/testing-modes.md) to select the one most suitable to your project.
27+
2628
## `testLimit`
2729

2830
| Type | Default | Available in | CLI equivalent |
2931
| ---- | ------- | ------------ | ---------------- |
3032
| Int | `50000` | \* | `--test-limit N` |
3133

32-
Number of sequences of transactions to generate during testing.
34+
Number of transactions to generate during testing. The campaign will stop when the `testLimit` is reached or if a `timeout` is set and the execution time exceeds it.
3335

3436
## `seqLen`
3537

3638
| Type | Default | Available in | CLI equivalent |
3739
| ---- | ------- | ------------ | -------------- |
3840
| Int | `100` | \* | `--seq-len N` |
3941

40-
Number of transactions to generate during testing.
42+
Number of transactions that a transaction sequence will have during testing, and maximum length of transaction sequences in the corpus. After every N transactions, Echidna will reset the EVM to the initial post-deployment state.
4143

4244
## `timeout`
4345

4446
| Type | Default | Available in | CLI equivalent |
4547
| ---- | ------- | ------------ | -------------- |
4648
| Int | `null` | \* | `--timeout N` |
4749

48-
Campaign timeout, in seconds. By default it is not time-limited.
50+
Campaign timeout, in seconds. By default it is not time-limited. If a value is set, the campaign will stop when the time is exhausted or the `testLimit` is reached, whichever happens first.
4951

5052
## `seed`
5153

5254
| Type | Default | Available in | CLI equivalent |
5355
| ---- | ------- | ------------ | -------------- |
5456
| Int | random | \* | `--seed N` |
5557

56-
Seed used for random value generation. By default it is a random integer.
58+
Seed used for random value generation. By default it is a random integer. The seed may not guarantee reproducibility if multiple `workers` are used, as the operating system thread scheduling may introduce additional randomness into the process.
5759

5860
## `shrinkLimit`
5961

@@ -77,7 +79,7 @@ Address to deploy the contract to test.
7779
| ---- | ------- | ------------ |
7880
| Bool | `true` | \* |
7981

80-
Enable the use of coverage-guided fuzzing and corpus collection.
82+
Enable the use of coverage-guided fuzzing and corpus collection. We recommend keeping this enabled.
8183

8284
## `corpusDir`
8385

@@ -141,15 +143,15 @@ Prefix of the function names used as properties in the contract to test.
141143
| ---- | -------------------------------------- | ------------ |
142144
| Int | `12500000` (current max gas per block) | \* |
143145

144-
Maximum amount of gas to consume when running function properties.
146+
Maximum amount of gas to consume when running function properties. If a property runs out of gas, it will be considered as a failure.
145147

146148
## `testMaxGas`
147149

148150
| Type | Default | Available in |
149151
| ---- | -------------------------------------- | ------------ |
150152
| Int | `12500000` (current max gas per block) | \* |
151153

152-
Maximum amount of gas to consume when running random transactions.
154+
Maximum amount of gas to consume when running random transactions. A non-property transaction that runs out of gas (e.g. a transaction in assertion mode) will not be considered a failure.
153155

154156
## `maxGasprice`
155157

@@ -217,23 +219,23 @@ Select a textual output format. By default, interactive TUI is run or text if a
217219
| ---- | ------- | ------------ |
218220
| Int | `0` | \* |
219221

220-
Initial Ether balance of `contractAddr`.
222+
Initial Ether balance of `contractAddr`. See our tutorial on [working with ETH](./basic/working-with-eth.md) for more details.
221223

222224
## `balanceAddr`
223225

224226
| Type | Default | Available in |
225227
| ---- | ------------ | ------------ |
226228
| Int | `0xffffffff` | \* |
227229

228-
Initial Ether balance of `deployer` and each of the `sender` accounts.
230+
Initial Ether balance of `deployer` and each of the `sender` accounts. See our tutorial on [working with ETH](./basic/working-with-eth.md) for more details.
229231

230232
## `maxValue`
231233

232234
| Type | Default | Available in |
233235
| ---- | --------------------------------- | ------------ |
234236
| Int | `100000000000000000000` (100 ETH) | \* |
235237

236-
Max amount of value in each randomly generated transaction.
238+
Max amount of value in each randomly generated transaction. See our tutorial on [working with ETH](./basic/working-with-eth.md) for more details.
237239

238240
## `testDestruction`
239241

@@ -289,20 +291,28 @@ Allows the use of the HEVM `ffi` cheatcode.
289291

290292
## `rpcUrl`
291293

292-
| Type | Default | Available in | CLI equivalent |
293-
| ------ | ------- | ------------ | --------------- |
294-
| String | `null` | 2.2.0+ | `--rpc-url URL` |
294+
| Type | Default | Available in | CLI equivalent | Env. variable equivalent |
295+
| ------ | ------- | ------------------------------------------- | --------------- | ------------------------ |
296+
| String | `null` | 2.1.0+ (env), 2.2.0+ (config), 2.2.3+ (cli) | `--rpc-url URL` | `ECHIDNA_RPC_URL` |
295297

296298
URL to fetch contracts over RPC.
297299

298300
## `rpcBlock`
299301

300-
| Type | Default | Available in | CLI equivalent |
301-
| ------ | ------- | ------------ | --------------- |
302-
| String | `null` | 2.2.0+ | `--rpc-block N` |
302+
| Type | Default | Available in | CLI equivalent | Env. variable equivalent |
303+
| ------ | ------- | ------------------------------------------- | --------------- | ------------------------ |
304+
| String | `null` | 2.1.0+ (env), 2.2.0+ (config), 2.2.3+ (cli) | `--rpc-block N` | `ECHIDNA_RPC_BLOCK` |
303305

304306
Block number to use when fetching over RPC.
305307

308+
## `etherscanApiKey`
309+
310+
| Type | Default | Available in | Env. variable equivalent |
311+
| ------ | ------- | ----------------------------- | ------------------------ |
312+
| String | `null` | 2.1.0+ (env), 2.2.4+ (config) | `ETHERSCAN_API_KEY` |
313+
314+
Etherscan API key used to fetch contract code.
315+
306316
## `coverageFormats`
307317

308318
| Type | Default | Available in |
@@ -351,16 +361,15 @@ relevant if `symExec` is true.
351361
| ---- | ------- | ------------ |
352362
| Int | `1` | 2.2.4+ |
353363

354-
Number of SMT solvers used in symbolic execution. Only relevant if `symExec` is
355-
true.
364+
Number of SMT solvers used in symbolic execution. While there is a single symExec worker, N threads may be used to solve SMT queries. Only relevant if `symExec` is true.
356365

357366
## `symExecTimeout`
358367

359368
| Type | Default | Available in |
360369
| ---- | ------- | ------------ |
361370
| Int | `30` | 2.2.4+ |
362371

363-
Timeout for symbolic execution SMT solver. Only relevant if `symExec` is true.
372+
Timeout for symbolic execution SMT solver. Only relevant if `symExec` is true. When the SMT solver used is Z3, this timeout applies per query, and is not global.
364373

365374
## `symExecMaxIters`
366375

0 commit comments

Comments
 (0)