Skip to content

Commit c8e1a93

Browse files
committed
Merge branch 'master' into feat/rework-mutators
2 parents 7260ca1 + 4e56d69 commit c8e1a93

File tree

5 files changed

+21
-2
lines changed

5 files changed

+21
-2
lines changed

Diff for: chain/config/config.go

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ type TestChainConfig struct {
1414
// CheatCodeConfig indicates the configuration for EVM cheat codes to use.
1515
CheatCodeConfig CheatCodeConfig `json:"cheatCodes"`
1616

17+
// SkipAccountChecks skips account pre-checks like nonce validation and disallowing non-EOA tx senders (this is done in eth_call, for instance).
18+
SkipAccountChecks bool `json:"skipAccountChecks"`
19+
1720
// ContractAddressOverrides describes contracts that are going to be deployed at deterministic addresses
1821
ContractAddressOverrides map[common.Hash]common.Address `json:"contractAddressOverrides,omitempty"`
1922
}

Diff for: chain/config/config_defaults.go

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ func DefaultTestChainConfig() (*TestChainConfig, error) {
1010
CheatCodesEnabled: true,
1111
EnableFFI: false,
1212
},
13+
SkipAccountChecks: true,
1314
}
1415

1516
// Return the generated configuration.

Diff for: docs/src/project_configuration/chain_config.md

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ The chain configuration defines the parameters for setting up `medusa`'s underly
99
- > 🚩 Setting `codeSizeCheckDisabled` to `false` is not recommended since it complicates the fuzz testing process.
1010
- **Default**: `true`
1111

12+
### `skipAccountChecks`
13+
14+
- **Type**: Boolean
15+
- **Description**: If `true`, account-related checks (nonce validation, transaction origin must be an EOA) are disabled in `go-ethereum`.
16+
- **Default**: `true`
17+
1218
## Cheatcode Configuration
1319

1420
### `cheatCodesEnabled`

Diff for: docs/src/static/medusa.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"workerResetLimit": 50,
55
"timeout": 0,
66
"testLimit": 0,
7+
"shrinkLimit": 5000,
78
"callSequenceLength": 100,
89
"corpusDirectory": "",
910
"coverageEnabled": true,
1011
"targetContracts": [],
12+
"predeployedContracts": {},
1113
"targetContractsBalances": [],
1214
"constructorArgs": {},
1315
"deployerAddress": "0x30000",
@@ -45,14 +47,17 @@
4547
"optimizationTesting": {
4648
"enabled": true,
4749
"testPrefixes": ["optimize_"]
48-
}
50+
},
51+
"targetFunctionSignatures": [],
52+
"excludeFunctionSignatures": []
4953
},
5054
"chainConfig": {
5155
"codeSizeCheckDisabled": true,
5256
"cheatCodes": {
5357
"cheatCodesEnabled": true,
5458
"enableFFI": false
55-
}
59+
},
60+
"skipAccountChecks": true
5661
}
5762
},
5863
"compilation": {

Diff for: fuzzing/sequence_generator.go

+4
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ func (g *CallSequenceGenerator) generateNewElement() (*calls.CallSequenceElement
341341
InputValues: args,
342342
})
343343

344+
if g.worker.fuzzer.config.Fuzzing.TestChainConfig.SkipAccountChecks {
345+
msg.SkipAccountChecks = true
346+
}
347+
344348
// Determine our delay values for this element
345349
blockNumberDelay := uint64(0)
346350
blockTimestampDelay := uint64(0)

0 commit comments

Comments
 (0)