-
Notifications
You must be signed in to change notification settings - Fork 563
feat(cmd/network): implement client create
cmd
#2401
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
Conversation
network connect
command to send MsgCreateClient
to the network
network connect
command to send MsgCreateClient
to the networknetwork connect
command to send MsgCreateClient
to the network
I tested with https://github.com/lubtd/orbit, it works great!
I can use Hermes to connect the chains and relay monitoring afterward Do we plan to extend this command to perform the connection? |
I Agree. I think we can keep this command and create another one to perform the connect. What do you consider changing this command's name to I will work in the relayer now in another PR |
network connect
command to send MsgCreateClient
to the networknetwork client create
command to send MsgCreateClient
to the network
network client create
command to send MsgCreateClient
to the networkclient create
cmd
client create
cmdclient create
cmd
client create
cmdclient create
cmd
ignite/services/network/node.go
Outdated
} | ||
return &Node{ | ||
cosmos: c, | ||
stakingQuery: stakingtypes.NewQueryClient(c.Context()), |
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.
This query client needs to be configurable from outside through Options, like we do in network.New. for easy testing
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.
It's the same logic used for the network. And also, the mocks for the StakingQuery are already there. It's already prepared for the unit test. We only need to find a way to mock the Node
structure with mockery package.
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.
I tried with single node (coordinator as the validator) and I get the following error, can you please help me to understand what would be the problem or if this is a bug?
ilker>ignite-hq/cli $ ignite n chain publish https://github.com/ilgooz/mars
✔ Source code fetched
✔ Blockchain set up
✔ Chain's binary built
✔ Blockchain initialized
✔ Genesis initialized
✔ Network published
⋆ Launch ID: 8
⋆ Campaign ID: 9
? The chain has already been initialized under: /Users/ilker/spn/8. Would you like to overwrite the home directory? [y/N] y█
✔ Source code fetched
✔ Blockchain set up
✔ Blockchain initialized
✔ Genesis initialized
? Staking amount 95000000stake
? Commission rate 0.10
? Commission max rate 0.20
? Commission max change rate 0.01
⋆ Gentx generated: /Users/ilker/spn/8/config/gentx/gentx.json
ilker>ignite-hq/cli $ ignite n chain join 8 --amount 96000000stake
? Peer's address 176.238.80.73:26656
✔ Source code fetched
✔ Blockchain set up
✔ Account added to the network by the coordinator!
✔ Validator added to the network by the coordinator!
ilker>ignite-hq/cli $ ignite n chain launch 8
✔ Chain 8 will be launched on Fri May 6 15:58:48 +03 2022
ilker>ignite-hq/cli $ ignite n chain prepare 8
✔ Source code fetched
✔ Blockchain set up
✔ Genesis initialized
✔ Genesis built
✔ Chain is prepared for launch
You can start your node by running the following command:
/Users/ilker/Documents/source/go/bin/marsd start --home /Users/ilker/spn/8
ilker>ignite-hq/cli $ marsd start --home /Users/ilker/spn/8
3:59PM INF starting ABCI with Tendermint
3:59PM INF Starting multiAppConn service impl=multiAppConn module=proxy
3:59PM INF Starting localClient service connection=query impl=localClient module=abci-client
...
ilker>ignite-hq/cli $ ignite n client create 8 http://localhost:26657
rpc error: code = InvalidArgument desc = failed to execute message; message index: 0: validator set can't be verified validator consensus pub key not found: 1AF9274F725CF263EF32EC2455668C5DC39915E3: validator not found: invalid validator set: invalid request
6e5f99d
to
c3ec51b
Compare
* add network connect command * add keyring flags and fix the pubkey encode * migrate ibc method to cosmoclient * move the command to `network client create` * apply comments suggestions from the PR and code quality * remove unused mocks * add cliui to network conenct command * fix pk encoding * converting to pk to proto * update mock and new node method name to `NewNodeClient` * fix pub key into the gentx parser * fix unit tests for ParseGentx test method * simplify code logic * fix unit tests * Apply suggestions from code review * refactor Co-authored-by: İlker G. Öztürk <ilkergoktugozturk@gmail.com>
part of #2289
Description
node
package to fetch the info from the launching chain;StakingParams
from the launching chain;ConsensusState
from the launching chain;ValidatorSet
from the launching chain;MsgCreateClient
to the network;How to test