raiden-network / raiden

Raiden Network
https://developer.raiden.network
Other
1.84k stars 378 forks source link

Startup crash with private chain #3687

Closed offerm closed 5 years ago

offerm commented 5 years ago

Using a private chain (ID 4321) and starting raiden (master) I get the flow crash:

/Users/admin/.virtualenvs/raiden/bin/python -m raiden --datadir exchange-a --keystore-path /Users/admin/xud-eth/blkchain1/keystore/ --network-id 4321 --accept-disclaimer --address 0x4F6799E2341379eA52213919622B9bEc80a1b655 --rpc --api-address 0.0.0.0:5001 --web-ui --environment-type development --password-file passwd_file --console --no-sync-check --accept-disclaimer --tokennetwork-registry-contract-address 0xaa1c9586BbCF5795828A09d705d41B7fF65dD90A --secret-registry-contract-address 0x6DC70232E11b5b5C4A5f2DEbe7DfE83752b24de9 --endpoint-registry-contract-address 0x147fa2035beB2a5e6613b232213e6962B6bD1C47 --gas-price 10000000000
Welcome to Raiden, version 0.100.2rc5.dev548+g50e6f3ff.d20190325!
----------------------------------------------------------------------
| This is an Alpha version of experimental open source software      |
| released as a test version under an MIT license and may contain    |
| errors and/or bugs. No guarantee or representations whatsoever is  |
| made regarding its suitability (or its use) for any purpose or     |
| regarding its compliance with any applicable laws and regulations. |
| Use of the software is at your own risk and discretion and by      |
| using the software you acknowledge that you have read this         |
| disclaimer, understand its contents, assume all risk related       |
| thereto and hereby release, waive, discharge and covenant not to   |
| sue Brainbot Labs Establishment or any officers, employees or      |
| affiliates from and for any direct or indirect liability resulting |
| from the use of the software as permissible by applicable laws and |
| regulations.                                                       |
|                                                                    |
| Privacy Warning: Please be aware, that by using the Raiden Client, |
| among others, your Ethereum address, channels, channel deposits,   |
| settlements and the Ethereum address of your channel counterparty  |
| will be stored on the Ethereum chain, i.e. on servers of Ethereum  |
| node operators and ergo are to a certain extent publicly available.|
| The same might also be stored on systems of parties running Raiden |
| nodes connected to the same token network. Data present in the     |
| Ethereum chain is very unlikely to be able to be changed, removed  |
| or deleted from the public arena.                                  |
|                                                                    |
| Also be aware, that data on individual Raiden token transfers will |
| be made available via the Matrix protocol to the recipient,        |
| intermediating nodes of a specific transfer as well as to the      |
| Matrix server operators.                                           |
----------------------------------------------------------------------
2019-03-26 16:20:55.398350 [info     ] Starting Raiden                [raiden.ui.runners] architecture=x86_64 distribution=source python_implementation=CPython python_version=3.7.2 raiden=0.100.2rc5.dev548+g50e6f3ff.d20190325 system=macOS 10.14 64bit
Raiden is running in development mode
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/admin/raiden/raiden/__main__.py", line 15, in <module>
    main()
  File "/Users/admin/raiden/raiden/__main__.py", line 11, in main
    run(auto_envvar_prefix='RAIDEN')  # pylint: disable=no-value-for-parameter
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/Users/admin/.virtualenvs/raiden/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/admin/raiden/raiden/ui/cli.py", line 494, in run
    app = runner.run()
  File "/Users/admin/raiden/raiden/ui/runners.py", line 276, in run
    return self._start_services()
  File "/Users/admin/raiden/raiden/ui/runners.py", line 95, in _start_services
    app_ = run_app(**self._options)
  File "/Users/admin/raiden/raiden/ui/app.py", line 405, in run_app
    ID_TO_NETWORKNAME[node_network_id] != 'smoketest'
KeyError: 4321
LefterisJP commented 5 years ago

@offerm Apologies. We currently don't have too many tests for the startup and definitely 0 tests for private nets. I made a quick PR to fix this key error. Can you also try out if the fix works for you? #3688

pirapira commented 5 years ago

I was able to reproduce the issue, and I don't see the problem after switching to this PR.