interledger / network

Documents and tools related to the live network and test net
Apache License 2.0
5 stars 4 forks source link

Additions #4

Open kruisdraad opened 6 years ago

kruisdraad commented 6 years ago

= Community =

We need to communicate with the community thru a good process, example changes in network. This is needed now, announcing changes, requirements and asking for feedback. My suggestion would be to create a non-profit organation where anyone can be a member and members can have resources like G_addr (like RIPE) which are all vetted (process needs to be defined for intake and auditting).

Some might not want to register, so the IX's will provide a limited amount 'anonymous' connection points, with a 'disclaimer' stating those nodes to not qualify from the community guidelines, security, trustlevel, etc.

We can redesign ILP-IX to take on this role, but creating some official entity with a member voted board and foundation statutes will be a good start. Perhaps take on some (non technical) community managers that will focus on communication and making sure developers and users are on the same road.

= Technical =

kruisdraad commented 6 years ago

addition on the community part is to create a registry where nodes are registered ... something like the RIPE whois system for IP's, but then for ILP nodes.

kruisdraad commented 6 years ago

Looking at the code https://github.com/interledgerjs/ilp-connector/blob/master/src/routing/prefix-map.ts this seems to do all the routing, which seems quite simplified. The problem is, its not that simple.

Globally, its not a peering relation, but a master/child. It should not matter which of the two peers initiates the session and the plugin should be able to both have the same configuration and the session is established either way.

In general we need to split a few processes. For example which session is a child process adding data onto the local routing table, if a session resets (config change) not the entire routing table has to be restarted (as discussed on roadmap already).

In addition we need a method confirming an identity from peers to prevent duplicate names (or hijacks?) in the network. The offline registry is a administrative solution to assign unique addresses and have naming requirements implemented. But if we look at the RPKI example, routes are signed and able to be validated. Perhaps its possible to use the wallet key material to sign the identity (direct peers) and use a smaller part for upstream validation. It still rely's on nodes to trust their peers, but if a specific peers does not validate his peers and they are roque, its easier to see which one should be kicked off. For example, what happens if a T1 added a roque T2 with all the g.nodes names of the entire network?

I suggest peering plugin will get a few extra options to influance routing:

Idle: This is the first stage. ILP detects a start event, tries to initiate a TCP connection to the peer, and also listens for a new connect from a peer router. The ConnectRetryTimer is set to 60 seconds and must decrement to zero before the connection is initiated again. Further failures to leave the Idle state result in the ConnectRetryTimer doubling in length from the previous time.

Connect: In this state, ILP initiates the TCP connection. If the 3-way TCP handshake completes, the established BGP Session BGP process resets the ConnectRetryTimer and sends the Open message to the neighbor, and then changes to the OpenSent State. If the ConnectRetry timer depletes before this stage is complete, a new TCP connection is attempted, the ConnectRetry timer is reset, and the state is moved to Active. If any other input is received, the state is changed to Idle.

Active: In this state, BGP starts a new 3-way TCP handshake. If a connection is established, an Open message is sent, the Hold Timer is set to 4 minutes, and the state moves to OpenSent. If this attempt for TCP connection fails, the state moves back to the Connect state and resets the ConnectRetryTimer.

OpenSent: In this state, an Open message has been sent from the originating router and is awaiting an Open message from the other router. After the originating router receives the OPEN message from the other router, both OPEN messages are checked for errors. The following items are being compared:

If the Open messages do not have any errors, the Hold Time is negotiated (using the lower value), and a KEEPALIVE message is sent (assuming the value is not set to zero). The connection state is then moved to OpenConfirm. If an error is found in the OPEN message, a Notification message is sent, and the state is moved back to Idle. If TCP receives a disconnect message, BGP closes the connection, resets the ConnectRetryTimer, and sets the state to Active. Any other input in this process results in the state moving to Idle.

OpenConfirm: In this state, ILP waits for a Keepalive or Notification message. Upon receipt of a neighbor’s Keepalive, the state is moved to Established. If the hold timer expires, a stop event occurs, or a Notification message is received, and the state is moved to Idle.

Established: In this state, the ILP session is established. ILP neighbors exchange routes via Update messages. As Update and Keepalive messages are received, the Hold Timer is reset. If the Hold Timer expires, an error is detected and BGP moves the neighbor back to the Idle state.

adrianhopebailie commented 6 years ago

cc @justmoon @sappenin @dora-gt