Releases: crytic/medusa
v1.1.0
This marks a minor release of medusa
. Version 1.1.0 introduces a few critical bug fixes and some minor feature additions.
What's Changed
- Allow users to specify additional arguments while running slither @anishnaik in #554
- Add
--rpc-url
and--rpc-block
flags by @anishnaik in #557 - Add "Collapse all" and "Expand all" buttons to the HTML coverage report by @Xenomega in #302
- Deprecation of the
difficulty
cheatcode which is now a no-op by @anishnaik in #564 - Introduction of the
prevrandao
cheatcode by @anishnaik in #564 - Improvements to logging during call sequence shrinking by @anishnaik in #564
Bug Fixes
- Hotfix for a non-deterministic panic that was triggered with the introduction of on-chain fuzzing by @bsamuels453 in #560
- Fix issues related to using VM cheatcodes by @anishnaik in #564
- Fix panic that occurred in optimization mode by @anishnaik in #564
- Fix issues related to context management and cancellations by @anishnaik in #564
Full Changelog: v1.0.0...v1.1.0
v1.0.0
This is medusa
's first major release. It includes many powerful features and important bug fixes. The biggest update is the introduction of on-chain fuzzing! medusa
can now run starting with an existing state provided by an external RPC service (Infura, Alchemy, local node, etc). This enables users to speed up the fuzzing setup when using already deployed contracts. Please note that the on-chain fuzzing capability is in "experimental mode" and will continue to improve over the next few releases.
Additional features include integration with Slither for improved value generation, capturing transaction return values for improved value generation, efficient shrinking during optimization mode, and support for the label
cheatcode.
What's Changed
- Support for on-chain fuzzing via external RPC by @bsamuels453 in #513
- Integrate Slither for improved value generation by @anishnaik in #530
- Capture transaction return values for improved value generation by @anishnaik in #533
- Add support for the
vm.label
cheatcode by @priyankabose in #545 - Improve runtime performance and shrinking during optimization mode by @anishnaik in #548
- Add Docker support by @elopez in #522
- Add Nix support by @bohendo in #143
- Add support for exploration mode through the CLI by @tuturu-tech in #526
Bug Fixes
- Fix
warp
to allow for the setting of a starting timestamp by @anishnaik in #499 - Fix duplication bug in program counter coverage by @0xalpharush in #485
- Fix execution tracing during failed contract deployments by @anishnaik in #538
- Fix weighting of corpus items to use timestamp to favor 'hardest-to-discover' inputs by @0xalpharush in #383
- Improve error logging for arithmetic overflows and underflows by @hexshire in #536
- Fix error handling during corpus initialization by @MukulKolpe in #537
New Contributors
- @tuturu-tech made their first contribution in #526
- @bohendo made their first contribution in #143
- @hexshire made their first contribution in #536
- @MukulKolpe made their first contribution in #537
- @priyankabose made their first contribution in #543
- @bsamuels453 made their first contribution in #513
Full Changelog: v0.1.8...v1.0.0
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