-
Notifications
You must be signed in to change notification settings - Fork 329
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
Gaiad manager #928
Gaiad manager #928
Conversation
strategy = 'naive' log_level = 'info' [[chains]] id='node1' rpc_addr='http://localhost:27010' grpc_addr='https://localhost:27012' websocket_addr='ws://localhost:27010/websocket' rpc_timeout='1s' account_prefix='cosmos' key_name='wallet' store_prefix='ibc' fee_denom='stake' [chains.trust_threshold] numerator = '1' denominator = '3' [[chains]] id='node3' rpc_addr='http://localhost:27040' grpc_addr='https://localhost:27042' websocket_addr='ws://localhost:27040/websocket' rpc_timeout='1s' account_prefix='cosmos' key_name='wallet' store_prefix='ibc' fee_denom='stake' [chains.trust_threshold] numerator = '1' denominator = '3' command added
Ran into:
Rurunning that fixed the issue Now I'm running into:
|
Hi @colin-axner ! Thank you for finding these bugs and shame on me for not testing them properly. I've updated the documentation with the correct commands to download stoml and sconfig. I've also fixed the error message. For your convenience, here's the updated documentation part to install the dependencies: On MacOS: curl -Lo /usr/local/bin/sconfig https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_darwin_amd64
curl -Lo /usr/local/bin/stoml https://github.com/freshautomations/stoml/releases/download/v0.6.1/stoml_darwin_amd64
chmod 755 /usr/local/bin/sconfig
chmod 755 /usr/local/bin/stoml On Linux: curl -Lo /usr/local/bin/sconfig https://github.com/freshautomations/sconfig/releases/download/v0.1.0/sconfig_linux_amd64
curl -Lo /usr/local/bin/stoml https://github.com/freshautomations/stoml/releases/download/v0.6.1/stoml_linux_amd64
chmod 755 /usr/local/bin/sconfig
chmod 755 /usr/local/bin/stoml (Note the If you don't have |
Thanks @greg-szabo for the fix! I happened to reinstall sconfig and stoml via go before seeing that comment which worked great. I attempted to startup a network using the new gaia version:
As a side note, Installing gaiad v4.2.1 results in:
which tells me the config files didn't get regenerated or overwritten (which makes sense). Maybe a Removing the configs and using an gaia v4.2.1 works as expected The gaia v4.2.1 never validated the supply (from my knowledge). There's a Here is the valid supply section for genesis: {
"denom": "network1coin",
"amount": "10000"
},
{
"denom": "network1v0token",
"amount": "1000000000"
},
{
"denom": "stake",
"amount": "510000000"
} |
scripts/gm/README.md
Outdated
|==============|====================| | ||
| RPC (26657) | ports_start_at + 0 | | ||
| App (1317) | ports_start_at + 1 | | ||
| GRPC (9090 | ports_start_at + 2 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new gaia version includes a GRPC-Web which defaults to 9091
There's an enable so I can manually set that to false for now
Cool, thanks for the feedback! I guess for now, I'll blindly replace that variable if it exists. But I think we'll have to keep the configuration management scope small so the developers can maintain their own config as well as we keep this compatible with the most apps. |
I have managed to get the new gaia binary running after manually fixing the genesis. The only other step that was a little cumbersome is setting up keys on hermes. It'd be nice if there was an easy way to load the keys from gm into hermes. The work around isn't that bad, you just need to copy/paste the mnemonic Other than that, gm works great! Clean UX, it will definitely be useful for the set of testing I'll be doing over the next week. There's a fix needed on hermes before I can test the new binary further, so will revisit this after that is fixed I appreciate the separation from hermes as I can reuse this for testing the ts-relayer |
Here are my The generated hermes config picks the fullnode name instead of the network. Also I get:
|
Bit'o feedback:
gm start
WARNING: invalid genesis.json for network1. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for network2. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for network3. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for network4. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for network5. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for node1. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for node2. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for node3. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for node4. Please check the log and fix manually. Skipping...
WARNING: invalid genesis.json for node5. Please check the log and fix manually. Skipping... Looking at the logs I see:
Consistent with Colin's comment above. LE: Switching to |
Hi @adizere , thanks for the feedback! I was thinking of adding a
For example, the default configuration is a one-validator, one-full-node network. If |
Indeed, I had a newer version of gaiad originally. Was assuming that
That makes sense, and it will probably be a very common use-case, thanks for the insight! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished the basic steps, I like it!
The biggest improvement I can see is allowing this to work with the end to end tests. For instance, I'd like to create multiple networks and subject two of them to the end to end tests.
This currently breaks b/c e2e.py assumes that network names are ibc-0
and ibc-1
, yet gm
breaks upon creating the configs:
$ gm start
Creating ibc-0 config...
WARNING: could not create config for ibc-0: "panic: invalid denom: ibc-0v0token
goroutine 1 [running]:
github.com/cosmos/cosmos-sdk/types.NewCoin(0xc001276090, 0xc, 0xc001162f20, 0x1, 0x1, 0xc001276090)
[omitted]
For some reason, gm
creates the following directories (note the name ibc-0v0
).
$ ll ~/.gm/
Permissions Size User Date Modified Name
drwxr-xr-x - adi 18 May 16:14 bin
.rw-r--r-- 808 adi 18 May 19:09 gm.toml
drwx------ - adi 18 May 19:15 ibc-0
drwxr-xr-x - adi 18 May 19:15 ibc-0v0
drwxr-xr-x - adi 18 May 19:15 ibc-1v0
drwxr-xr-x - adi 18 May 19:15 network3
drwxr-xr-x - adi 18 May 19:15 network4
drwxr-xr-x - adi 18 May 19:15 network5
drwxr-xr-x - adi 18 May 19:15 node1
The config I was using is here
One other improvement I see would be to add some testing recipes, but that's out of the scope of this PR I guess.
Co-authored-by: Adi Seredinschi <adi@informal.systems>
Dang, I thought I fixed the denom issue! I'll check it again. |
Do you think we could add an |
Another feature request 🙂 Reverse the log command so the latest logs show first (although this can be unintuitive). I just want to be able to quickly see the latest logs |
I think this should be fixed on gaia as well. I don't think it should generate tokens based on the directory name. Just minting "stake" is good.
Very much agree! I'd love to be able to put in two different gaia binaries, run gm start, and then run a set of end to end tests. Would be a great start to simulation testing Great work @greg-szabo! GM has worked wonderfully in some initial testing I've been doing between gaia versions |
Added features:
@colin-axner @adizere All mentioned points were fixed, I think. If you could give it another spin, I'd appreciate it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All mentioned points were fixed, I think. If you could give it another spin, I'd appreciate it.
Many thanks Greg, this is great! The remarks I left are optional, we can add features later, as we go along!
Co-authored-by: Adi Seredinschi <adi@informal.systems>
GM tool v0.1.0 release Co-authored-by: Adi Seredinschi <adi@informal.systems>
Closes: #902
Description
This PR introduces the
gm
command described in issue #902. All functionality of the issue is implemented with some extras described in the documentation.Start with the README!
For contributor use:
docs/
) and code comments.Files changed
in the Github PR explorer.