Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError preventing use of etheno with --ganache #101

Open
jackson-clerkenwell-labs opened this issue May 30, 2022 · 3 comments
Open

Comments

@jackson-clerkenwell-labs

I am trying to run Etheno with ganache to capture transactions for an echidna test. I am starting Etheno with the following command:

etheno --ganache --ganache-args "--gasLimit 10000000" -x init.json

After running, the ganache output provides the following output, then throws a runtime error:

INFO     [05-30|10:08:26][Ganache@8546] ganache v7.0.3 (@ganache/cli: 0.1.4, @ganache/core: 0.1.4)
INFO     [05-30|10:08:26][Ganache@8546] cannot convert string value "1098918061707753166174719436420667867553160713642701484075379
Traceback (most recent call last):
  File "/Users/jacksonernst/mambaforge/bin/etheno", line 8, in <module>
    sys.exit(main())
  File "/Users/jacksonernst/mambaforge/lib/python3.8/site-packages/etheno/__main__.py", line 246, in main
    ETHENO.master_client = ganache.GanacheClient(ganache_instance)
  File "/Users/jacksonernst/mambaforge/lib/python3.8/site-packages/etheno/etheno.py", line 159, in master_client
    self.accounts: list[int] = list(map(lambda a: int(a, 16), client.post({
  File "/Users/jacksonernst/mambaforge/lib/python3.8/site-packages/etheno/client.py", line 184, in post
    ret = self.client.post(data)
  File "/Users/jacksonernst/mambaforge/lib/python3.8/site-packages/etheno/ganache.py", line 63, in post
    self.start()
  File "/Users/jacksonernst/mambaforge/lib/python3.8/site-packages/etheno/ganache.py", line 59, in start
    raise RuntimeError(f"{' '.join(self.args)} exited with non-zero status {retcode}")
RuntimeError: /usr/bin/env ganache-cli -d -p 8546 --account=109891806170775316617471943642066786755316071364270148407537998213554720155005,0x56bc75e2d63100000 --account=42302103610597028425285740569650371168511679135457624922469531760977464749938,0x56bc75e2d63100000 --account=100870083039498194968905591548145282128725665563480050404127864771982117015473,0x56bc75e2d63100000 --account=115373150260844996401793173181603946311413146491015576768058777734917710127568,0x56bc75e2d63100000 --account=53001614672554792902779076596216615296764409633909208276641440248418084348489,0x56bc75e2d63100000 --account=108423602806403586082964421630950060010932211521460727391252402121327615073485,0x56bc75e2d63100000 --account=59604273759680909804650830416294379401009216907174373741665691593639472345743,0x56bc75e2d63100000 --account=84662448971784691084114880351835696387596565905580124357617650010663179228850,0x56bc75e2d63100000 --account=80959231915385603714551776387480621855748162939160947305508002130176050382175,0x56bc75e2d63100000 --account=16190400443940898392371145865360649145951099448761774038403681914007303146633,0x56bc75e2d63100000 -g 20000000000 -i 111550642089583 --deterministic --gasLimit 10000000 exited with non-zero status 1

It seems Etheno is starting ganache with the following arguments, and ganache is having an issue with the --account arguments:

['--account=109891806170775316617471943642066786755316071364270148407537998213554720155005,0x56bc75e2d63100000', '--account=42302103610597028425285740569650371168511679135457624922469531760977464749938,0x56bc75e2d63100000', '--account=100870083039498194968905591548145282128725665563480050404127864771982117015473,0x56bc75e2d63100000', '--account=115373150260844996401793173181603946311413146491015576768058777734917710127568,0x56bc75e2d63100000', '--account=53001614672554792902779076596216615296764409633909208276641440248418084348489,0x56bc75e2d63100000', '--account=108423602806403586082964421630950060010932211521460727391252402121327615073485,0x56bc75e2d63100000', '--account=59604273759680909804650830416294379401009216907174373741665691593639472345743,0x56bc75e2d63100000', '--account=84662448971784691084114880351835696387596565905580124357617650010663179228850,0x56bc75e2d63100000', '--account=80959231915385603714551776387480621855748162939160947305508002130176050382175,0x56bc75e2d63100000', '--account=16190400443940898392371145865360649145951099448761774038403681914007303146633,0x56bc75e2d63100000', '-g', '20000000000', '-i', '111550642089583', '--gasLimit', '10000000']

I have Etheno installed in a conda osx-arm64 enviroment with python 3.8.13. I have also tried running the command with python 3.10.1, and I still got the same error.

Any help would be much appreciated!

@elopez
Copy link
Member

elopez commented May 30, 2022

I've seen this issue once; in case it helps, I worked around it by downgrading to ganache-cli@6

@anishnaik
Copy link
Contributor

Hi @jackson-clerkenwell-labs thanks for reporting this! We will be releasing a new version of etheno in the next few days that should fix this issue. In the meantime, using @elopez fix should be sufficient. You can move to ganache-cli@6 using the following steps:

npm uninstall -g ganache
npm install -g ganache-cli

The reason it is not working is because the integer needs to be converted to a hex string before passing it to ganache which will be handled in the upcoming release.

@anishnaik
Copy link
Contributor

anishnaik commented Jul 13, 2022

@jackson-clerkenwell-labs feel free to download the latest pre-release of etheno pip install etheno==0.3a1 where this issue has been fixed. Feel free to use the latest version of ganache with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants