Skip to content

Echidna Tests Fail with crytic-compile v0.3.11 #627

@pcaversaccio

Description

@pcaversaccio

I'm running nightly tests in 🐍 snekmate and last night my Echidna tests started to fail:

echidna: Couldn't compile given file
stdout:
stderr:
INFO:CryticCompile:--ignore-compile used, if something goes wrong, consider removing the ignore compile flag
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/crytic-compile", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/__main__.py", line 220, in main
    compilations = compile_all(**vars(args))
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/crytic_compile.py", line 722, in compile_all
    compilations.append(CryticCompile(target, **kwargs))
                        ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/crytic_compile.py", line 211, in __init__
    self._compile(**kwargs)
    ~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/crytic_compile.py", line 633, in _compile
    self._platform.compile(self, **kwargs)
    ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/platform/foundry.py", line 102, in compile
    hardhat_like_parsing(
    ~~~~~~~~~~~~~~~~~~~~^
        crytic_compile, str(self._target), build_directory, str(self._project_root)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/home/linuxbrew/.linuxbrew/Cellar/crytic-compile/0.3.11/libexec/lib/python3.14/site-packages/crytic_compile/platform/hardhat.py", line 78, in hardhat_like_parsing
    optimized = input_json["settings"]["optimizer"].get("enabled", False)
                ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'optimizer'

Error: Process completed with exit code 1.

After quick investigation, I realised that a new crytic-compile version 0.3.11 was released yesterday. I'm very confident that this release breaks the Echidna compilation somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions