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

Network host parameter is not respected when launching local development RPC network nodes #1533

Open
danceratopz opened this issue May 17, 2022 · 0 comments

Comments

@danceratopz
Copy link

Environment information

  • brownie Version: 1.18.2
  • ganache-cli Version: 6.12.2
  • solc Version: 0.8.11+commit.d7f03943.Linux.g++
  • Python Version: 3.8.12
  • OS: linux

What was wrong?

Brownie does not apply the host parameter configured using the "brownie networks" CLI when it launches a local RPC network node for use within a development console.

For example, if the local (ganache) development network is modified to use 0.0.0.0:

brownie networks modify development host="http://0.0.0.0"

brownie ignores the host configuration when it launches ganache (only the cmd_settings parameters are passed to ganache):

➜ brownie console --network development
Brownie v1.18.2 - Python development framework for Ethereum

xxx is the active project.

Launching 'ganache-cli --accounts 10 --hardfork istanbul --gasLimit 12000000 --port 8545 --defaultBalanceEther 100'...
Brownie environment is ready

This is required, for example, when connecting to a local network node from a client running within a docker container.

How can it be fixed?

There's an easy work-around: Start ganache manually and supply the required host via the -h flag; brownie will attach to this RPC instead of launching a new one.

A fix would require propagating the parameter to the code where the rpc is launched. Currently, it the host parameter appears to be ignored when starting local network nodes, unless I've missed something :)

danceratopz added a commit to danceratopz/brownie that referenced this issue May 17, 2022
…wnie#1533

Modify fixtures and tests to use a different host ip when launching a temporary rpc network node. This demonstrates that the host parameter is not respected when launching the node.
danceratopz added a commit to danceratopz/brownie that referenced this issue May 17, 2022
danceratopz added a commit to danceratopz/brownie that referenced this issue May 17, 2022
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

1 participant