runtimeverification / runtimeverification/evm-semantics

solc-select not integrating with kevm-pyk

Open
#2,061 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
KCL
Stars
591
Forks
156
Avg merge
2h 19m
Merged PRs (30d)
1

Description

While running integration tests locally, kevm-pyk seems to have trouble finding the solc installation.

src/kontrol/solc_to_k.py:542: RuntimeError
------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/anvacaru/.local/bin/solc", line 8, in <module>
    sys.exit(solc())
  File "/home/anvacaru/.local/lib/python3.10/site-packages/solc_select/__main__.py", line 87, in solc
    res = current_version()
  File "/home/anvacaru/.local/lib/python3.10/site-packages/solc_select/solc_select.py", line 67, in current_version
    raise argparse.ArgumentTypeError(
argparse.ArgumentTypeError: No solc version set. Run `solc-select use VERSION` or set SOLC_VERSION environment variable.
-------------------------------------------------------------------------------------------- Captured log call ---------------------------------------------------------------------------------------------
INFO     pyk.kast.outer:outer.py:1402 Loading JSON definition: /home/anvacaru/rv/evm-semantics/.build/usr/lib/kevm/haskell/compiled.json
INFO     pyk.kast.outer:outer.py:1404 Converting JSON definition to Kast: /home/anvacaru/rv/evm-semantics/.build/usr/lib/kevm/haskell/compiled.json
INFO     kontrol.solc_to_k:utils.py:403 Running: solc --standard-json
INFO     kontrol.solc_to_k:utils.py:418 Completed in 0.059s with status 1: solc --standard-json
============================================================================================ slowest durations =============================================================================================
1.23s call     src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
0.00s setup    src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
0.00s teardown src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
========================================================================================= short test summary info ==========================================================================================
FAILED src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md] - RuntimeError: ('solc error', '', None)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================================================== 1 failed, 14227 deselected in 1.93s ====================================================================================
make: *** [Makefile:36: test-integration] Error 1

I have solc-select installed to manage multiple versions of solc

anvacaru@desktop kevm-pyk$ solc-select versions
0.8.21 (current, set by /home/anvacaru/.solc-select/global-version)
0.8.17
0.8.15
0.8.13
anvacaru@desktop kevm-pyk$ solc --version
solc, the solidity compiler commandline interface
Version: 0.8.21+commit.d9974bed.Linux.g++
anvacaru@desktop kevm-pyk$ 

Also, manually setting the SOLC_VERSION env var leads to another error

anvacaru@desktop kevm-pyk$ make test-integration TEST_ARGS+='-k "test_prove and examples/storage-spec.md" -n0 --bug-report -vv' SOLC_VERSION='0.8.21'

src/kontrol/solc_to_k.py:542: RuntimeError
------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/anvacaru/.local/bin/solc", line 8, in <module>
    sys.exit(solc())
  File "/home/anvacaru/.local/lib/python3.10/site-packages/solc_select/__main__.py", line 87, in solc
    res = current_version()
  File "/home/anvacaru/.local/lib/python3.10/site-packages/solc_select/solc_select.py", line 72, in current_version
    raise argparse.ArgumentTypeError(
argparse.ArgumentTypeError: 
Version '0.8.21' not installed (set by SOLC_VERSION).
Run `solc-select install 0.8.21`.
Or use one of the following versions: []
-------------------------------------------------------------------------------------------- Captured log call ---------------------------------------------------------------------------------------------
INFO     pyk.kast.outer:outer.py:1402 Loading JSON definition: /home/anvacaru/rv/evm-semantics/.build/usr/lib/kevm/haskell/compiled.json
INFO     pyk.kast.outer:outer.py:1404 Converting JSON definition to Kast: /home/anvacaru/rv/evm-semantics/.build/usr/lib/kevm/haskell/compiled.json
INFO     kontrol.solc_to_k:utils.py:403 Running: solc --standard-json
INFO     kontrol.solc_to_k:utils.py:418 Completed in 0.055s with status 1: solc --standard-json
============================================================================================ slowest durations =============================================================================================
1.24s call     src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
0.00s setup    src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
0.00s teardown src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md]
========================================================================================= short test summary info ==========================================================================================
FAILED src/tests/integration/test_prove.py::test_pyk_prove[examples/storage-spec.md] - RuntimeError: ('solc error', '', None)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================================================== 1 failed, 14227 deselected in 1.95s ====================================================================================
make: *** [Makefile:36: test-integration] Error 1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with make test-integration and the example filter shown in the report. Inspect src/tests/integration/test_prove.py::test_pyk_prove and src/kontrol/solc_to_k.py:542, then verify that the integration test can invoke the solc installation managed by solc-select without either reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, solidity
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.