275 Commits
Author SHA1 Message Date
Dan GuidoandClaude Opus 4.5 85c6711ec7 feat: add --timing flag for phase-level performance breakdown (#2928)
* feat: add --timing flag for phase-level performance breakdown

Add PhaseTimer utility for instrumenting Slither phases:
- New --timing CLI flag to enable timing collection
- Instruments parse_contracts, analyze_contracts, convert_to_slithir,
  compute_dependency, compute_storage_layout, and detector runs
- Outputs sorted timing report showing total/count/avg per phase

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* feat: add timing infrastructure and fix benchmark compatibility

Add phase-level timing support:
- New --timing flag for slither CLI to capture execution phases
- Timing data exported via --json-types timing
- Benchmark script updated to display phase breakdowns

Replace aave-v3-core with safe-smart-account in benchmarks:
- aave-v3-core requires Node 14/16/18, incompatible with Node 22+
- safe-smart-account uses modern Node.js (22.14.0 per .nvmrc)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-19 17:14:48 -05:00
Dan GuidoandClaude Opus 4.5 5eeb1443d0 feat: add performance benchmark script (#2933)
* feat: add performance benchmark script

Add scripts/benchmark_perf.py for benchmarking Slither against real-world
smart contract projects (Uniswap v4, Compound Comet, Aave v3, etc.).

Features:
- Clone and setup benchmark projects with --setup
- Benchmark current checkout or compare across branches
- Support for git worktrees (--slither-path) for parallel benchmarking
- Baseline comparison (--baseline) with percentage deltas
- PR comment formatting (--pr) for CI integration
- JSON output for automation

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* feat: add lock file to prevent benchmark contention

Multiple subagents running benchmarks in parallel now automatically
serialize via /tmp/slither-bench.lock. Use --no-lock to skip for
isolated environments.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

* fix: remove hardcoded comparison branch

Default to just master for branch comparison.

Co-Authored-By: Claude Opus 4.5 <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-19 12:51:31 -05:00
Dan GuidoandClaude Opus 4.5 fe7590f0e7 fix: remove Etherscan API dependency from CI tests (#2890)
Replace live Etherscan API calls with cached local contract sources.
The contracts are immutable on-chain, so testing against cached source
still validates the analysis logic.

This fixes intermittent CI failures from Etherscan API rate limits when
multiple jobs run in parallel. The Etherscan platform integration is
already tested by crytic-compile's own CI.

Co-authored-by: Claude Opus 4.5 <[email protected]>
2026-01-15 23:30:47 -05:00
Simone 62d97f5552 Update CI scripts 2026-01-06 18:58:41 +01:00
Simone 42a0a1d523 Remove uv run 2026-01-06 18:55:52 +01:00
Simone cd485ffed4 Merge branch 'dev' into ci-modernize-python39 2026-01-06 17:37:28 +01:00
Simone 9c63e7a6fa Remove pylint comments 2026-01-06 16:48:43 +01:00
Emilio López 8973b058d1 ci: fix broken tests 2026-01-05 20:50:26 -03:00
Emilio López 9b2a6fa028 ci: make test scripts fail early 2026-01-05 19:58:28 -03:00
Emilio López e08857ad37 pip-audit: fix uv integration 2026-01-05 19:45:21 -03:00
Dan GuidoandClaude Opus 4.5 5de4c01726 CI: Modernize CI workflows and bump Python to 3.9+
## Python 3.9+ Compatibility
- Update minimum Python version from 3.8 to 3.9
- Use importlib.metadata API (Python 3.9+) instead of pkg_resources
- Update slither/tools/doctor/checks/paths.py for Python 3.9+ compatibility

## CI Modernization
- Add scripts/ci_test_common.sh with shared CI utilities
- Update all ci_test_*.sh scripts to source common utilities
- Update test.yml: use uv, Python 3.9+ matrix, windows-2025, node 20
- Update other workflows: ci.yml, docs.yml, doctor.yml, pip-audit.yml, publish.yml, docker.yml
- Add test_ci_locally.sh for local CI testing

## Action Bumps
- actions/checkout v4 -> v5
- actions/setup-python v5 -> v6
- actions/setup-node v4 -> v6
- actions/upload-artifact v4 -> v5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
2026-01-05 14:00:29 -05:00
Emilio López 0839fafc6f tests: fix slither_config 2025-11-25 17:44:24 -03:00
shenpengfeng a40528f3a6 chore: fix some typos in comments
Signed-off-by: shenpengfeng <[email protected]>
2025-02-28 11:58:19 +08:00
Josselin Feist cca47a1d90 Merge branch 'dev' into printer-cheatcode 2024-10-02 10:46:32 +02:00
Qiuhao Li e4657f5f6c tool: add detector for multiple new reinitializers (#2536)
* tool: support reinitializer in slither-check-upgradeability

* MissingCalls: don't account reinitializers

* tool: add detector for multiple new reinitializers

* fix: comments and pylint
2024-08-23 07:52:02 -05:00
alpharush 221cfc69ce chore: remove unused scripts 2024-06-03 14:48:07 -05:00
Alexis b5766dc27d Add cheatcode printer to test files 2024-04-09 09:44:43 +02:00
alpharush 613c62b46a add pylint disable to buggy_versions.py 2024-03-28 22:48:10 -05:00
alpharush 448d77fad5 lint and text update 2024-03-28 22:31:05 -05:00
alpharush 1af07d15bb add known solc bugs, remove allowed versions, improve formatting 2024-03-01 17:58:54 -06:00
Emilio López 925102b4ff ci: test:: make scripts executable 2024-02-20 15:12:09 -03:00
Feist Josselin bcbe4ffe93 Update ci_test_printers.sh 2023-09-15 11:30:47 +02:00
devtooligan 4a3ab0a653 fix: add martin printer to testing printer list 2023-07-07 11:30:39 -07:00
devtooliganandalpharush 8c51e47a42 Update scripts/ci_test_printers.sh
Co-authored-by: alpharush <[email protected]>
2023-07-07 11:25:51 -07:00
devtooligan c175d527ff Merge branch 'dev' into halstead 2023-07-05 13:04:27 -07:00
devtooligan 6a0add01b1 Merge branch 'dev' into halstead 2023-06-14 14:18:38 -07:00
Feist Josselin e1cd39fb41 Merge branch 'dev' into loc-printer 2023-05-25 11:23:23 +02:00
Feist Josselin 9185f54663 Merge pull request #1898 from 0xGusMcCrae/slither-interface
add tool slither-interface
2023-05-16 10:51:45 +02:00
0xGusMcCrae 6fbb366fe7 add --strip-trailing-cr to diff 2023-05-11 16:20:27 -04:00
0xGusMcCrae d4b041a399 fix incorrect files in test error message 2023-05-11 15:39:51 -04:00
devtooligan d682232b46 chore: add to scripts/ci_test_printers.sh 2023-05-11 11:01:12 -07:00
devtooligan 8408788e8e chore: add to scripts/ci_test_printers.sh 2023-05-11 10:59:09 -07:00
0xGusMcCrae 279f1cb61c resolve pragma version causing tests to fail 2023-05-09 15:29:31 -04:00
0xGusMcCrae 92c06c4f4a add tool slither-interface 2023-05-08 14:08:27 -04:00
alpharush 6e08172e8b lint bash 2023-05-06 10:46:52 -05:00
alpharush 6e781e1c58 update slither-flat test cases, run solc out its output 2023-05-06 10:36:09 -05:00
alpharush 5124993274 fix path filtering test location 2023-03-23 15:58:40 -05:00
alpharush 4c6d3aee2b fix script paths 2023-03-20 23:36:08 -05:00
alpharush bc65997cad merge dev 2023-03-16 22:24:03 -05:00
alpharush d6adbca519 update printer tests 2023-03-16 22:21:19 -05:00
Feist Josselin 36052fdc4e Sync cc@master
Use cc@master
Remove rinkeby test (etherscan does not support rinkeby anymore)
2023-03-08 11:09:16 +01:00
webthethird 19b3af3449 Merge remote-tracking branch 'crytic/slither/dev' into slither/dev-upgradeability-complex-datatype 2023-01-10 11:46:46 -06:00
Emilio López 2109b5fad9 ci: etherscan: fix test check 2023-01-05 11:14:28 -03:00
Emilio López d72302f94c ci: etherscan: sleep briefly when the API key is not available
Etherscan performs a 1/5s rate limit when using no API key, so this
adds a small random sleep to avoid the second test failing if it
executes fast enough.
2023-01-05 11:14:28 -03:00
Emilio López 8d3aa94450 ci: etherscan: add output grouping 2023-01-05 10:31:30 -03:00
webthethird e91fc2f91e Update CI test for upgradeability
with new test cases using structures
2022-12-28 11:50:39 -06:00
Feist Josselin c80c3ba3b6 Fix dapp
Based on @elopez work from https://github.com/crytic/crytic-compile/pull/320
2022-12-06 10:44:24 +01:00
Pascal Marco Caversaccio b1ed6b3ad8 use solc 0.8.0 for path filtering test
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
2022-09-26 16:21:47 +02:00
Pascal Marco CaversaccioandEmilio López f787982922 Update scripts/ci_test_path_filtering.sh
Co-authored-by: Emilio López <[email protected]>
2022-09-26 15:02:46 +02:00
Pascal Marco Caversaccio 94159fab12 Merge pull request #1 from pcaversaccio/dev
Merge `dev` into `patch-1`
2022-09-26 08:11:20 +01:00