telosnetwork / telos-evm-docker

Automated Telos EVM development and automated test framework
Apache License 2.0
12 stars 3 forks source link

Can't start the stack with `tvmc up`: File "/usr/lib/python3.10/hashlib.py", line 160, in __hash_new #148

Closed manh-vv closed 6 months ago

manh-vv commented 6 months ago

Describe the bug Can't start the stack with tvmc up

10:11:41:INFO:running nodeos container with command:
10:11:41:INFO:/bin/bash -c nodeos --config=/root/config.ini --data-dir=/mnt/dev/data --logconf=/root/logging.json --disable-replay-opts --genesis-json=/root/genesis/local.json -e -p eosio --subst-admin-apis --override-max-tx-time=499 >> /logs/nodeos.log 2>&1
10:11:41:INFO:opening nodeos-42488-telos-local-tevmc...
10:11:41:INFO:running
Traceback (most recent call last):
  File "/usr/lib/python3.10/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] unsupported

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/bin/tevmc", line 6, in <module>
    sys.exit(cli())
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/mnt/l2/w/genereos/telos-evm-docker/tevmc/cmdline/up.py", line 154, in up
    with TEVMController(
  File "/mnt/l2/w/genereos/telos-evm-docker/tevmc/tevmc.py", line 1214, in __enter__
    self.start()
  File "/mnt/l2/w/genereos/telos-evm-docker/tevmc/tevmc.py", line 1156, in start
    self.start_nodeos()
  File "/mnt/l2/w/genereos/telos-evm-docker/tevmc/tevmc.py", line 634, in start_nodeos
    cleos.import_key('eosio', key)
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/leap/cleos.py", line 882, in import_key
    public_key = get_pub_key(private_key)
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/leap/protocol/ds.py", line 1011, in get_pub_key
    data = data + ripmed160(data)[:4]
  File "/mnt/l2/w/genereos/telos-evm-docker/.venv/lib/python3.10/site-packages/leap/protocol/ds.py", line 997, in ripmed160
    h = hashlib.new('ripemd160')
  File "/usr/lib/python3.10/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/usr/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160
10:11:41:INFO:stopping container "redis-42488-telos-local-tevmc"
10:11:42:INFO:stopped.
10:11:42:INFO:stopping container "elasticsearch-42488-telos-local-tevmc"
10:11:52:INFO:stopped.
10:11:52:INFO:stopping container "kibana-42488-telos-local-tevmc"
10:11:52:INFO:stopped.
10:11:52:INFO:stopping

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/telosnetwork/telos-evm-docker.git -b v1.5.0-rc8
  2. cd telos-evm-docker
  3. rm poetry.lock (It raised an error if keep this file)
  4. ./install.sh <dir>/telos
  5. export <dir>/telos/bin to PATH
  6. source ./activate.sh
  7. tevmc init local
  8. tevmc up

Expected behavior The stack is running

Desktop (please complete the following information):

manh-vv commented 6 months ago

I noticed ValueError: unsupported hash type ripemd160 could be fix by following this guide https://stackoverflow.com/a/72508879

manh-vv commented 6 months ago

Look like it worked after remove the local folder and running the tevmc init local again.

11:56:08:CRITICAL:control point reached
 * Serving Flask app 'tevmc-71619'
 * Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on http://127.0.0.1:12321
Press CTRL+C to quit