-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Bug]: ~/.avalanche-cli/config.json seems to be ignored when using avalanche blockchain deploy <blockchain_name> --local
#2535
Comments
Hi! Thanks for this detailed feedback. First point, yes, the local network deploy changed quite a bit in latest release. |
Secondly, yes currently L1 validator ports are dynamic, decided when creating the network (#2543). For this case I can make two comments (besides the team going to provide control of this):
|
Finally, some other responses:
Thanks very much! |
Can I ask a clarification about this? Let's say I've deployed an L1 network named I am also having difficulties with this process and would appreciate any guidance. |
|
Pls feel free to ask any question to have on this. Happy to help |
Thanks for these great responses! This is ultimately how I ended up figuring it out yesterday after much head scratching before I realized that you responded with the exact solutions I came up with 🤦♂️ 😆 In the end, the key thing that seems to have made it work is understanding that This is only partially explanatory though - since there seem to be some things that aren't supported in the same way they used to be. For example, if I understand it correctly setting Ultimately I think documentation on the following would be really helpful:
Simply documenting those three bullets in detail would GREATLY improve end users' ability to understand the system as a whole and their ability to properly configure it, and would probably lead to faster development of the CLI as a whole since it would become more clear what its capabilities already are. Thank you again and please let me know if you have any more questions about my setup or I can help in any way. EDIT: One other thing: is there an example blockchain aliases file (I think state.json?) somewhere? If we can't configure the RPC URL, it'd be handy to at least be able to set an alias and then if we have to recreate the network we can simply use the RPC server to get the id with info.getBlockchainID from /ext/info |
Thanks for the detailed comments. Most of the documentation improvements are taken into account. We are Regarding blockchain aliases file, an example is:
The expected location for such a file is
It is taken into account upon network restart. Alternatively, you can also use an admin API call for that, that must be done after every restart: https://docs.avax.network/api-reference/admin-api#adminaliaschain Regarding http-port setting, it is not used at this moment, as you said. But we will provide some means for that Regarding network.json structure, top level flags are applied to all l1 validator nodes, nodeConfig flags are applied to Agree the local network internals and file structure need improvement and documentation, for power users, Thanks again! |
Describe the bug
I am probably misunderstanding the correct usage of the CLI since the Etna upgrade, but it seems that the CLI now ignores the config.json file in
~/.avalanche-cli/
.To Reproduce
Beginning from a completely wiped out
~/.avalanche-cli/
directory with no logs, binaries or anything except the empty directory structure and the.last_actions.json
file:config.json
in~/.avalanche-cli
:Run
avalanche blockchain create myblockchain
and with the following prompt responses:<my desired admin address>
<my desired id>
<my desired symbol>
<my desired token holder address>
<my desired admin address>
<my desired admin address>
Output:
Run
avalanche blockchain deploy myblockchain --local
Relevant portion of output:
Note the following:
http-host
setting in the config.json file)netstat -tuln
indicates that the service is bound to the loopback address rather than0.0.0.0
:Expected behavior
I expected setting
http-host
to 0.0.0.0 inconfig.json
to bind the deployed blockchain to0.0.0.0
so that it could be accessed from the outside world (assuming my firewall rules allow it). I also expected the RPC URL to use port 9650. This is what used to happen with the CLI v1.7.1 which is what I was using pre-Etna, but since the Etna upgrade in AvalancheGo and upgrading the CLI to the latest (1.8.4), the local blockchain is configured with a different random high port each time, and I cannot figure out how to properly bind the local address to 0.0.0.0 so it's available from outside the local machine. This is a problem because a) the random high port means I have to reconfigure my clients to connect to a different RPC URL each time the local blockchain is stopped/started and b) currently I can't connect to the RPC URL from anything but localhost anyway.Screenshots
N/A
Logs
N/A - Let me know if there's any generated files that would be helpful
Operating System
I have reproduced this both on Ubuntu 22.04.5 LTS and MacOS Sonoma 14.7.1
Additional context
In general, I'm having trouble determining where things are supposed to be configured in the latest version of the CLI, and the documentation is either not up to date or I'm looking in the wrong places. Just a few examples:
--num-nodes
and--num-local-nodes
). The former seems to do nothing when used likeavalanche blockchain deploy myblockchain --local --num-nodes 5
(it still starts two Primary Nodes and a single L1 node) and the latter sometimes works - starting two Primary Nodes and 5 L1 nodes on unpredictable ports, still ignoring the config.json file - but other times fails with "Error: failure waiting for local cluster myblockchain bootstrapping". There doesn't seem to be a good source of information on what I'm doing wrong anywhere that I can findMuch of this stuff seems to have associated functionality in avalanchego itself, but it seems like the CLI is out of date or needs the docs updated to describe proper usage.
Any help would be GREATLY appreciated! Thank you!
The text was updated successfully, but these errors were encountered: