Skip to content

Releases: crytic/medusa

v0.1.8

15 Oct 20:11
c58a72f
Compare
Choose a tag to compare

This marks a minor release of medusa. Note that this version has no new features or bug fixes from the previous version (v0.1.7). A new release had to be made due to a bug in the CI of medusa that prevented the CI artifacts for the release from being built correctly (#406).

v0.1.7

15 Oct 19:15
47fdfd8
Compare
Choose a tag to compare

This marks a minor release of medusa. Version 0.1.7 brings a variety of critical bug fixes, adds support for LCOV reports, and has optimizations that improves coverage tracking.

What's Changed

Bug Fixes

  • Fix a missing initcode size override (#483 ) by @anishnaik
  • Fix panic during execution tracing (#457 ) by @anishnaik
  • Fix bug related to initial contract balances when using predeployed contracts (#461 ) by @0xalpharush
  • Fix bug that prevented deployed addresses from being added to the value set (#488 ) by @smonicas

New Contributors

Full Changelog: v0.1.6...v0.1.7

v0.1.6

02 Aug 18:30
54532f1
Compare
Choose a tag to compare

This marks a minor release of medusa. Version 0.1.6 brings a variety of critical bug fixes related to coverage tracking, coverage reporting, and execution tracing.

Bug Fixes

  • Fix regression in coverage reports for constructors (#412)
  • Fix panic while execution tracing cheatcode execution (#411)
  • Fixed source unit Iookup and coverage reporting due to changes made to Foundry's compilation artifacts (#427)
  • Reduce bias in weighted method selection that was omitting some methods (#427)

Full Changelog: v0.1.5...v0.1.6

v0.1.5

19 Jul 17:24
7b67ceb
Compare
Choose a tag to compare

This marks a minor release of Medusa. Note that this version has no new features or bug fixes from the previous version (v0.1.4). A new release had to be made due to an inconsistency in the version that was reported by the medusa binary (via medusa --version) versus the version tag on GitHub and package managers such as Homebrew.

v0.1.4

19 Jul 16:16
a724090
Compare
Choose a tag to compare

This marks a minor release of medusa. Version 0.1.4 brings support for the new Cancun fork of go-ethereum. We also added additional features such as the ability to test pure/view functions, deterministically deploy contracts to fixed address, filter functions, and support for new cheatcodes. Finally, other minor QoL improvements and bug fixes were made in this release.

What's Changed

  • Support for the new Cancun fork. This includes new opcodes such as TLOAD or TSTORE (#397)
  • Added the ability to call pure or view methods in assertion testing mode (#363)
  • Support for deterministic deployment of contracts to predefined addresses (#353)
  • Support for blacklisting and whitelisting function signatures (#400)
  • Support for the snapshot and revertTo cheatcodes (#276)
  • Attachment of execution traces for failed contract deployments (#337)
  • Attachment of execution traces for reverting property tests (#335)
  • Display test cases discovered by the fuzzer on startup (#382)
  • Improved documentation (#348)
  • Automated release builds in the CI (#342)

Bug Fixes

  • Use of function signatures in execution traces to handle overloaded function names (#336)
  • Mutate calldata in call sequence mutator (#380)
  • Mutate calldata during shrinking (#374)
  • Use default compilation platform during fuzzer initialization (#362)

New Contributors

  • Thank you to @konnov for their first contribution (#347)

Full Changelog: v0.1.3...v0.1.4

v0.1.3

01 Mar 01:28
72e9b85
Compare
Choose a tag to compare

This marks a minor release of medusa. Version 0.1.3 brings fixes to a variety of critical and minor bugs, improvements in shrinking performance, improved logging, exit code standardization, and other quality-of-life improvements.

What's Changed

  • Added a ShrinkLimit configuration parameter that bounds the number of iterations that the call sequence and value shrinking process executes for. This limits worker exhaustion on heavy-processing call sequences.
  • Standardized medusa exit codes. 0 means the fuzzer exited successfully. 1 means medusa encountered an unexpected error. 7 means that medusa encountered a failing test case.
  • Renamed DeploymentOrder to TargetContracts and renamed AssertionModesConfig to PanicCodeConfig.
  • Added a TargetContractBalances configuration parameter to allow target contracts to have starting ETH balances.
  • Enabled all testing modes (assertion, property, and optimization) by default. The --assertion-mode and --optimization-mode flags were removed from the CLI. Testing modes can now be disabled only through the configuration file.
  • Renamed the --target CLI flag to --compilation-target.
  • Improved logging during fuzzer startup.
  • Updated the behavior of TestAllContracts to only invoke functions within contracts specified in TargetContracts.
  • Updated coverage reports to have any files that have non-zero coverage to be opened by default.
  • Added a NoColor configuration parameter to disable colored CLI output.

Bug Fixes

  • Fixed a memory leak in the test chain object that caused medusa to crash after a given period of time.
  • Fixed a panic in the coverage tracer.
  • Fixed an array out-of-bounds panic in coverage maps.
  • Fixed a non-deterministic copy-length-based panic in the parseBytes32 cheatcode.
  • Fixed the warp cheatcode to accept uint256 arguments.
  • Fixed the CI to support Python 3.12.
  • Fixed a bug within corpus call method resolution.

New Contributors

Full Changelog: v0.1.2...v0.1.3

v0.1.2

23 Aug 20:21
ac99e78
Compare
Choose a tag to compare

This marks a minor release of medusa. Version 0.1.2 brings updates to the EVM, support for console.log cheat codes, AST literal extraction, logging, and error handling.

What's Changed

  • Added support for console.log cheat codes, enabling users to log on-chain information into medusa execution traces shown when a test failure occurs.
  • Updated the underlying medusa-geth fork to target go-ethereum 1.12.0, enabling the Shanghai fork and use of Solidity 0.8.20, which leverages the newer PUSH0 opcode.
  • Improved AST literal extraction and added denomination parsing. Constants such as 1e9, 1 ether, or 3 hours are now properly extracted, enabling better value generation.
  • Updated the logger to improve upon error logging. Errors are now presented in a more intuitive manner to end users.
  • Fixed a nil dereference when calling SetTarget, which would cause a crash if an invalid platform was set in the project config file and --target was provided.

Full Changelog: v0.1.1...v0.1.2

v0.1.1

17 Jul 21:05
f58c60a
Compare
Choose a tag to compare

This marks the second release of medusa. Version 0.1.1 introduces coverage report generation, initial value shrinking logic, improved logging, and various fixes.

What's Changed

  • Introduced initial coverage report generation. This produces a report showing coverage across a fuzzer run. Note: view/pure methods in Solidity are currently not called by the fuzzer and it does not capture property test call coverage.
  • Added support for optimization mode: Similar to echidna's optimization mode, this mode returns a call sequence which maximizes a given value returned by a function call.
  • Added extensions to the assertion testing mode. Users can now configure different panic codes that will trigger an assertion failure (e.g. arithmetic overflow).
  • Introduced initial value shrinking. This will attempt to find more human-readable values to trigger a failure, after one has been discovered. This is currently used for a minimal number of iterations and will be further iterated on in a later release.
  • Added colorized output to the CLI, with support for structured JSON logging (to be integrated in a later release).
  • Added support for CLI autocompletion.
  • Fixed an issue where the addr and sign cheatcodes may error.
  • Fixed a panic that would occur when changing Solidity function input arguments between runs, by ensuring corpus validation on startup disables any outdated corpus items.
  • Fixes an issue where some event defined outside of the immediate contract (e.g. through inheritance) would not be resolved in execution traces.
  • Fixed a bug where arrays/slices would not properly copy during mutations.

Full Changelog: v0.1.0...v0.1.1

v0.1.0

31 Mar 21:44
8d1519b
Compare
Choose a tag to compare

This marks the first initial public release of medusa. medusa is a cross-platform go-ethereum-based smart contract fuzzer. It provides parallelized fuzz testing of smart contracts through CLI, or its Go API that allows custom user-extended testing methodology.

This release includes many of our desired core features: parallelized coverage guided mutational fuzzing, assertion and property testing, EVM cheatcodes, testing of dynamically deployed smart contracts, execution traces for failed tests, and more.

Note: As the README states, medusa is still noted to be in an experimental phase, is subject to future breaking changes, and should not be used in production test environments.

To learn more about how to use medusa, check out our README or Wiki pages!