Releases: crytic/medusa
v0.1.8
v0.1.7
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
- Display success and revert hit count in coverage report (#364 ) by @0xalpharush
- Add LCOV support (#442 ) by @0xalpharush
- Improve performance during coverage tracking (#472 ) by @samalws
- Update corpus format (#456 ) by @anishnaik
- Disable account checks to allow for non-EOA transaction origins (#468 ) by @0xalpharush
- Log unique PCs that have been encountered by
medusa
(#453 ) by @0xalpharush
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
- @highcloudwind made their first contribution in #430
- @samalws-tob made their first contribution in #472
- @smonicas made their first contribution in #488
Full Changelog: v0.1.6...v0.1.7
v0.1.6
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
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
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
orTSTORE
(#397) - Added the ability to call
pure
orview
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
andrevertTo
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
Full Changelog: v0.1.3...v0.1.4
v0.1.3
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
meansmedusa
encountered an unexpected error.7
means thatmedusa
encountered a failing test case. - Renamed
DeploymentOrder
toTargetContracts
and renamedAssertionModesConfig
toPanicCodeConfig
. - 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 inTargetContracts
. - 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 acceptuint256
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
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 targetgo-ethereum
1.12.0, enabling the Shanghai fork and use of Solidity 0.8.20, which leverages the newerPUSH0
opcode. - Improved AST literal extraction and added denomination parsing. Constants such as
1e9
,1 ether
, or3 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
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
andsign
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
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!