Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Connect app and proxy to different networks and nodes. #440

Closed
geigerzaehler opened this issue Jun 2, 2020 · 5 comments · Fixed by #472
Closed

Connect app and proxy to different networks and nodes. #440

geigerzaehler opened this issue Jun 2, 2020 · 5 comments · Fixed by #472
Assignees

Comments

@geigerzaehler
Copy link
Contributor

As a developer I want to be able to work with the app on the ffnet as well as the devnet, a local node, and the registry emulator so that I can work with persistent data and test the app under realistic conditions. The mechanism for this should be properly documented.

In the future it should be possible to extend this mechanism to allow an app user to set the network/node host through a CLI flag when starting the app.

We will not implement the full network selector described in #128.

@cloudhead
Copy link
Contributor

cloudhead commented Jun 2, 2020

Makes sense, although I'd expect as a developer to be able to pass these options via the CLI too, since editing the code isn't ideal.

I'm also realizing now that we are conflating two configurations (correct me if I'm wrong):

  1. The application (proxy) wants to have the option to connect to a local node, vs. a remote node or network.
  2. The registry node wants the option to connect to a chosen network (testnet/mainnet/ffnet).

Thinking about this more, I think the application shouldn't be concerned directly with ffnet/mainnet/etc (1). Rather, it should connect to some registry node somewhere and have the option to specify an address (2). And that node will be configured to join some network (testnet/mainnet).

Example:

$ radicle-registry --testnet
[radicle-registry] Connecting to Testnet...
[radicle-registry] Listening on 127.0.0.1:8333
$ radicle-upstream --connect 127.0.0.1:8333

@geigerzaehler
Copy link
Contributor Author

What you said makes sense. I’ll need to look closer at this but what I’m imagining now for the implementation is to use some flag on the proxy that allows you to specify the node address. I’ll also add a shortcut (or documentation) for a ffnet host so that it is not necessary to run you own node.

@xla
Copy link
Contributor

xla commented Jun 4, 2020

Thinking about this more, I think the application shouldn't be concerned directly with ffnet/mainnet/etc (1). Rather, it should connect to some registry node somewhere and have the option to specify an address (2). And that node will be configured to join some network (testnet/mainnet).

I disagree with that direction while we should allow connection to a host/port pair we should also have simple ways of switching between our major networks, ideally through the settings (the interface exists). This will allow users to switch easily between the networks for different use-cases.

@geigerzaehler
Copy link
Contributor Author

Thanks for the input @xla. I’d like to keep the discussion in this issue focused on the smaller scope of allowing developers to easily connect to a network and allowing users to connect to some node. For the larger issue we can discuss this in #128.

@cloudhead
Copy link
Contributor

I disagree with that direction while we should allow connection to a host/port pair we should also have simple ways of switching between our major networks, ideally through the settings (the interface exists). This will allow users to switch easily between the networks for different use-cases.

I'm not sure what use-cases you're thinking about, but since the app will not always directly control the registry node it's connecting to, this seems impossible. Since this is a developer-only feature anyway, I don't see this as a problem either.

@geigerzaehler geigerzaehler self-assigned this Jun 10, 2020
geigerzaehler pushed a commit that referenced this issue Jun 11, 2020
Fixes #440. The proxy now accepts a node host for the `--registry`
option and can connect to an arbitrary registry node. We also provide
shortcuts for the ffnet and devnet.
geigerzaehler pushed a commit that referenced this issue Jun 15, 2020
Fixes #440. The proxy now accepts a node host for the `--registry`
option and can connect to an arbitrary registry node. We also provide
shortcuts for the ffnet and devnet.
geigerzaehler pushed a commit that referenced this issue Jun 16, 2020
Fixes #440. The proxy now accepts a node host for the `--registry`
option and can connect to an arbitrary registry node. We also provide
shortcuts for the ffnet and devnet.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants