aztec-v1 icon indicating copy to clipboard operation
aztec-v1 copied to clipboard

[WIP] Demo echidna testing

Open incertia opened this issue 6 years ago • 0 comments

Summary

This is a demo for how Echidna may be integrated into the AZTEC Solidity pipeline.

Echidna is a property based EVM fuzzer. It reads a contract's public ABI and makes randomized calls by supplying random arguments according to the function signature and tries to falsify any defined tests with a given prefix, defaulting to echidna_. Currently, echidna is exhibiting some very slow behavior which I am trying to debug, but this should be fixed soon (tm).

The openzeppelin library in the config file cfg should refer to the library, in the format /path/to/source.sol:library, as would be given by compiling the solidity with solc. Run echidna once without the config and examine the contracts field of crytic-export/combined_solc.json and pull the correct value from there. There may also be some other solc arguments that are required to integrate into the upstream source tree. This can be added via the solcArgs config option.

Description

Add an Echidna property test.

Testing instructions

Install Echidna by following the instructions in the readme. Then run via echidna-test AdminUpgradeTest.sol AdminUpgradeTest --config cfg.

Types of changes

  • New type of testing (non-breaking change which adds functionality)

Checklist:

  • [x] Mark 'WIP' if needed.
  • [x] Add tests to cover changes as needed.
  • [x] Update documentation as needed.

incertia avatar Oct 01 '19 16:10 incertia