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

Check that the ethereum node has all rpc interfaces enabled. If not inform the user. #2962

Closed
kelsos opened this Issue Nov 6, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@kelsos
Contributor

kelsos commented Nov 6, 2018

After the latest changes on master, if the user doesn't start the geth node with the txpool option enabled, raiden crashes with the following message:

2018-11-06 10:46:07 [info     ] Starting Raiden                [raiden.ui.runners] distribution=source python_implementation=CPython python_version=3.7.1 raiden=0.15.2.dev15+g66fa381d system=Linux 64bit_ 4.18.16-arch1-1-ARCH x86_64
Traceback (most recent call last):
  File "/home/kelsos/.virtualenvs/raiden/bin/raiden", line 11, in <module>
    load_entry_point('raiden', 'console_scripts', 'raiden')()
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/__main__.py", line 11, in main
    run(auto_envvar_prefix='RAIDEN')  # pylint: disable=no-value-for-parameter
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 1043, in invoke
    return Command.invoke(self, ctx)
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/ui/cli.py", line 425, in run
    app = runner.run()
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/ui/runners.py", line 245, in run
    return self._start_services()
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/ui/runners.py", line 99, in _start_services
    app_ = run_app(**self._options)
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/ui/app.py", line 236, in run_app
    block_num_confirmations=DEFAULT_NUMBER_OF_BLOCK_CONFIRMATIONS,
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/network/rpc/client.py", line 217, in __init__
    address_checksumed,
  File "/home/kelsos/development/github/raiden-network/raiden/raiden/network/rpc/client.py", line 54, in geth_discover_next_available_nonce
    pool = web3.txpool.inspect or {}
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/web3/txpool.py", line 13, in inspect
    return self.web3.manager.request_blocking("txpool_inspect", [])
  File "/home/kelsos/.virtualenvs/raiden/lib/python3.7/site-packages/web3/manager.py", line 112, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method txpool_inspect does not exist/is not available'}

While the documentation is properly updated and specifies that the option txpool has to be specified in geth, it might be easy to miss for people.

Instead of crashing, it would be better to show a message to the user, informing them that the txpool option is required.

@kelsos kelsos added the usability label Nov 6, 2018

@palango

This comment has been minimized.

Collaborator

palango commented Nov 6, 2018

It's already in the docs:

https://raiden-network.readthedocs.io/en/latest/overview_and_guide.html#using-geth

Do you think that's enough?

@hackaugusto

This comment has been minimized.

Collaborator

hackaugusto commented Nov 6, 2018

If we do add any handling for admin interfaces, it would be nice to handle the other ones too.

@LefterisJP

This comment has been minimized.

Collaborator

LefterisJP commented Nov 6, 2018

The only thing we can do here is try to use all the extra rpc interfaces at the beginning and if they are not there, then catch this error and show it to the user

@kelsos

This comment has been minimized.

Contributor

kelsos commented Nov 7, 2018

@LefterisJP Yes that would be better than crashing, and letting the user figure out what he might have missed

@LefterisJP LefterisJP self-assigned this Nov 7, 2018

@LefterisJP LefterisJP changed the title from Inform user about enabling txpool option in geth to Check that the ethereum node has all rpc interfaces enabled. If not inform the user. Nov 7, 2018

LefterisJP added a commit to LefterisJP/raiden that referenced this issue Nov 7, 2018

LefterisJP added a commit to LefterisJP/raiden that referenced this issue Nov 7, 2018

LefterisJP added a commit to LefterisJP/raiden that referenced this issue Nov 7, 2018

@palango palango closed this in #2969 Nov 7, 2018

palango added a commit that referenced this issue Nov 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment