There have been various discussions around, and attempts at standardizing, a “ping” or “echo” protocol in Interleder, whereby a given node can monitor the health (uptime
, latency
, cost
, etc) of its existing connections and payment paths.
In the Internet system, ICMP echo request
and response
packets are used together to verify connectivity (colloquially known as a “pinging” a host). In Interledger, we perhaps need a similar system, but there are a number of questions that still deserve further discussion, including whether or not such functionality even needs specifying.
Prior Discussion
- RFC Issue #443: Document the Ping Protocol (open issue)
- PR #232: An RFC for a Ping/Echo Mechanism (Closed PR)
Loose Definitions
- Path Connectivity: Can I send a prepare packet from myself to ILP address X?
- Path Latency: How long does it take for my prepare packet to reach ILP address X?
- Path Response Time: How long does it take for the response to make it back to me?
- Path Cost: If I send 10 units to ILP Address X, how much makes it there?
- Uni-directional: I send a Prepare packet, and expect a Fulfill/Reject.
- Bi-directional: I send a Prepare packet. In response, the receiver does the same. We each send a corresponding Fulfill/Reject response, perhaps in an ordered fashion.
- Heartbeat/Ping: Uni-directional only (see definition above).
- Echo: Bi-directional (see definition above).
Outstanding General Questions
- What should the goals and non-goals be here?
- Should the protocol be uni-directional (i.e., “heartbeat”/“ping”) or bi-directional(i.e., “echo”)? In other words, should the protocol involve a mirror payment that allows a sender to glean data about both directions of a payment-path?
- If we decide there should be two protocols, should there be one RFC that defines both, or should there be two RFCs?
Heartbeat/Ping/ Protocol Questions
- What should the goals and non-goals be here?
- Is such a protocol even necessary, or do the existing prepare+fulfill/reject system suffice?
- Should the response-data to a unidirectional ping request contain anything more than what was in the request-data? For example, ICMP mandates that an ICMP echo response “…must include the exact payload received in the request.”
- Should the protocol rely upon a known condition/fulfillment pair, or an unfulfillable condition?
- Should the protocol measure just
connectivity
,response-time
, or should it measureconnectivity
,response-time
andlatency
? - Should the protocol measure path
cost
? - For collecting
cost
information, should this be an application concern that is performed using STREAM so that the Interledger layer doesn’t have to embed path-fx-pricing information into an ILP packet (Ping protocol), or else glean this information by inference (Echo Protocol)? - Should a node be able to PING any address on the Interledger, or should this protocol be limited to Interledger hosts/node addresses? For example, the current implementation in the Javascript Connector only allows for ping requests at a HOST level.
- Do we need a simpler “heartbeat” protocol that is just between peers to allow the ILP module on each peer to ensure that packets are routable. I.e. Not only is there an available data transport but the connectors are in a state to be able to route packets. If so, what should the address and packets contain?
Echo Protocol Questions
- What should the goals and non-goals be here?
- Are there security and/or information-leakage concerns if a Connector want to support echo, but is compelled to make a “mirror payment” back to the sender?