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 COMIT node to talk to more than one COMIT node! #555

Closed
LLFourn opened this Issue Dec 11, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@LLFourn
Copy link
Contributor

LLFourn commented Dec 11, 2018

At the moment, we have a setting: remote_comit_node_url = "127.0.0.1:8001" (which incidentally isn't a url).

We should allow the user to send swap requests to any other node by specifying their host and (optionally) port when POSTing to /swaps/rfc003.

DoD:

  • remote_comit_node_url does not exist anymore
  • Alice accepts socket address in the http swap request
  • Alice can do a swap with Bob and then with Charlie (can be dry test)

Note:
Just keep socket addresses as id for now, will do node pubkey id at later stage.

@D4nte

This comment has been minimized.

Copy link
Member

D4nte commented Dec 12, 2018

Not to be done part of this issue

I think this is part of a bigger picture: how to uniquely identify nodes and manage connection to them. Also, it may be time to use noise.

I would propose to add node id now and use that.

Setup a number of peers in the configuration file as

  • 1.2.3.4:8001 <- should try to get the peer id at start up
  • 2.5.6.7 <- need to decide on a default port for bam
  • abcde@6.7.8.9 <- This peer is expected to have id "abcde" and we will refuse to connect if it's not the case

Then, when creating a swap: (don't mind the "counterpart" notation)

counterpart: "abcde" <- local node already knows the counterpart
counterpart: "1.2.3.4" <- first connection will be done as part of the swap
counterpart: "bcdef@2.3.4.5" <- first connection will be done as part of the swap and it fails if another id is received.

I think we can create an epic for that as we'd need to:

  • use noise to allow authentication of the other party (ie, extern node cannot fake its id)
  • peer management: config file, in swap request but also new http api to add/remove/list peers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment