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

Allow specifying primary and witness peers for the light clients #311

Closed
4 tasks
romac opened this issue Oct 15, 2020 · 9 comments
Closed
4 tasks

Allow specifying primary and witness peers for the light clients #311

romac opened this issue Oct 15, 2020 · 9 comments
Assignees
Labels
A: question Admin: further information is requested I: CLI Internal: related to the relayer's CLI
Milestone

Comments

@romac
Copy link
Member

romac commented Oct 15, 2020

Summary

We need to be able to somehow configure the primary and witness peers for the light client of a given chain.

Problem Definition

Spawning a light client requires providing both a primary peer and one or more witness peers.
We currently do not track this information, and thus point both the primary and a single witness to the same node.
We need a way of specifying the primary and its witnesses via the command line.

Proposal

Add new subcommands to the light command which will allow us to manage the primary and witness peers for a chain's light client. I propose the following API:

USAGE:
    relayer-cli light peer <OPTIONS>

DESCRIPTION:
    configure the peers of the light client for a given chain

SUBCOMMANDS:
    add       add a peer to the light client configuration
    rm        remove a peer from the light client configuration
USAGE:
    relayer-cli light peer add <OPTIONS>

DESCRIPTION:
    add a peer to the light client of a given chain

POSITIONAL ARGUMENTS:
    chain_id                  identifier of the chain

FLAGS:
    -a, --address ADDRESS     network address of the peer
    -i, --peer-id PEER_ID     identifier of the peer
    -p, --primary             make this peer the primary peer
USAGE:
    relayer-cli light peer rm <OPTIONS>

DESCRIPTION:
    remove a peer from the light client of a given chain

POSITIONAL ARGUMENTS:
    chain_id                  identifier of the chain

FLAGS:
    -i, --peer-id PEER_ID     identifier of the peer to remove

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac romac added the I: CLI Internal: related to the relayer's CLI label Oct 15, 2020
@romac romac self-assigned this Oct 15, 2020
@romac
Copy link
Member Author

romac commented Oct 15, 2020

One question I have is where should those be stored?

a) in the light_config.toml file, just like the trust options
b) in the relayer config file

If we go with b), perhaps we should also merge the light_config.toml into the relayer config file?

@romac romac added the A: question Admin: further information is requested label Oct 15, 2020
@romac romac added this to the v0.0.5 milestone Oct 15, 2020
@ancazamfir
Copy link
Collaborator

One question I have is where should those be stored?

a) in the light_config.toml file, just like the trust options
b) in the relayer config file

If we go with b), perhaps we should also merge the light_config.toml into the relayer config file?

I would prefer b) and add any required light client options to the the relayer config file. It includes some today already. Could you please add a link to a full light client config as reference?

@romac
Copy link
Member Author

romac commented Oct 15, 2020

Could you please add a link to a full light client config as reference?

It's currently just a map from ChainId to TrustOptions: https://github.com/informalsystems/ibc-rs/blob/master/relayer-cli/src/light/config.rs

@ancazamfir
Copy link
Collaborator

I was asking about the tendermint-rs light client config.

@romac

This comment has been minimized.

@romac
Copy link
Member Author

romac commented Oct 15, 2020

Here is the config file we use for the light node: https://github.com/informalsystems/tendermint-rs/blob/master/light-node/light_node.toml.example

@ancazamfir
Copy link
Collaborator

We have a similar issue in #99, should we close that?

@romac
Copy link
Member Author

romac commented Oct 16, 2020

Let's keep both issues, we'll do the configs merge first and then we can tackle the CLI for editing it.

@romac
Copy link
Member Author

romac commented Nov 5, 2020

Done in #348

@romac romac closed this as completed Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: question Admin: further information is requested I: CLI Internal: related to the relayer's CLI
Projects
None yet
Development

No branches or pull requests

2 participants