Skip to content

Commit

Permalink
Merge branch 'master' of github.com:interledger/rfcs into df/add-stre…
Browse files Browse the repository at this point in the history
…am-frame-test-vectors
  • Loading branch information
sappenin committed Oct 23, 2019
2 parents 7abe5e6 + 734c2f0 commit efb52fe
Show file tree
Hide file tree
Showing 9 changed files with 379 additions and 32 deletions.
18 changes: 5 additions & 13 deletions 0001-interledger-architecture/0001-interledger-architecture.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: Interledger Architecture
draft: 6
draft: 7
---

# Interledger Architecture

Interledger provides for secure payments across multiple assets on different ledgers. The architecture consists of a conceptual model for interledger payments, a mechanism for securing payments, and a suite of protocols that implement this design.
Expand Down Expand Up @@ -38,8 +39,6 @@ Like the Internet protocol stack that inspired it, the Interledger protocol suit

> **Aside:** Not pictured in the diagram are configuration protocols including [IL-RFC-31: Interledger Dynamic Configuration Protocol](../0031-dynamic-configuration-protocol/0031-dynamic-configuration-protocol.md) and **Route Broadcasting Protocol**. These protocols are built on top of the Interledger Protocol layer and support it, but are not considered to be transport or application-layer protocols.
<!-- TODO: Add a link to [RBP](https://github.com/interledger/rfcs/pull/455)'s final location. -->

The following sections describe the general functions of each layer in the protocol suite. For an alternate explanation with detailed depictions of the protocols' data formats, see [IL-RFC-33: Relationship Between Protocols](../0033-relationship-between-protocols/0033-relationship-between-protocols.md).

#### Ledger Protocols
Expand All @@ -58,8 +57,7 @@ If settlement of one account in the Interledger is contingent on the status of a

Nodes can also choose never to settle their obligations. This configuration may be useful when several nodes representing different pieces of software or devices are all owned by the same person or business, and all their traffic with the outside world goes through a single "home router" connector. This is the model of [moneyd](https://github.com/interledgerjs/moneyd), one of the current implementations of Interledger.

Most implementations of Interledger use a plugin architecture to settle obligations automatically while abstracting the differences between different ledger layer protocols. For an example of this, see [IL-RFC-24: JavaScript Ledger Plugin Interface version 2](../0024-ledger-plugin-interface-2/0024-ledger-plugin-interface-2.md).

Implementations of Interledger are recommended to use settlement engines as defined in [IL-RFC-00: Settlement Engines](../0038-settlement-engines/0038-settlement-engines.md) to settle obligations automatically while abstracting the differences between different settlement systems and ledgers.

#### Link Protocols

Expand All @@ -72,7 +70,6 @@ Peers in the Interledger Protocol require a way to communicate securely with one

The implementation of a Link protocol may be incorporated into a ledger plugin, since the Link protocol has to communicate settlements that occur in the underlying ledger.


#### Interledger Protocol

The Interledger Protocol version 4 (ILPv4) is the core protocol of the entire Interledger Protocol suite. This protocol's packets pass through all participants in the chain: from the sender, through one or more connectors, to the receiver. This protocol is compatible with any variety of currencies and underlying ledger systems.
Expand All @@ -81,7 +78,6 @@ This level is concerned with currency amounts, routing, and whether each step in

This layer abstracts the layers above and below it from one another, so there can be only one protocol at this layer. Other protocols, including older versions of the Interledger Protocol, are incompatible. The current protocol is defined by [IL-RFC-27: Interledger Protocol version 4](../0027-interledger-protocol-4/0027-interledger-protocol-4.md).


#### Transport Protocols

Transport layer protocols are used for **end-to-end communication** between sender and receiver; connectors are not expected to be involved. This layer is responsible for:
Expand All @@ -94,7 +90,6 @@ Transport layer protocols are used for **end-to-end communication** between send

For an example, see the STREAM protocol, defined by [IL-RFC-29: STREAM](../0029-stream/0029-stream.md). STREAM creates a bidirectional connection between a sender and receiver that consists of many individual Interledger packets.


#### Application Protocols

Protocols at the application level communicate details outside of the minimum information that is technically necessary to complete a payment. For example, application protocols may check that participants are interested in conducting a transaction and are legally allowed to do so.
Expand All @@ -110,7 +105,6 @@ An example of an application layer protocol is the [Simple Payment Setup Protoco

Many different messaging protocols can be defined on and above the Application level of the Interledger clearing system.


#### Comparison to Traditional Financial Infrastructure

The layers of Interledger are similar to the different layers of traditional inter-bank systems:
Expand All @@ -120,7 +114,6 @@ The layers of Interledger are similar to the different layers of traditional int
- Interledger's _Link protocols_ don't have a direct banking equivalent, but they provide authenticated messaging to enable the Interledger Protocol layer, and they also associate settlement events in the underlying ledgers to balances in the Interledger Protocol layer.
- The underlying _Ledger_ systems are equivalent of _settlement_ in banking terms.


### Interledger Protocol Flow

Interledger moves money by relaying _packets_. In the Interledger Protocol, a "prepare" packet represents a possible movement of some money and comes with a condition for releasing it. As the packet moves forward through the chain of connectors, the sender and connectors prepare balance changes for the accounts between them. The connectors also adjust the amount for any currency conversions and fees subtracted.
Expand All @@ -145,7 +138,6 @@ A packet does not have to represent the full amount of a real-world payment. _Tr

The Interledger Protocol does not have a specific definition of "small", nor a size limit on packets. Each connector can choose minimum and maximum packet sizes they are willing to relay; as a result, any path's maximum packet size is the smallest maximum packet size among the connectors in that path. To be compatible with as much of the network as possible, one should choose packet sizes that fit between the minimum and maximum values of as many connectors as possible.


### Addresses

_Interledger addresses_ (also called _ILP addresses_) provide a universal way to address senders, receivers and connectors. These addresses are used in several different protocol layers, but their most important feature is to enable routing on the Interleder Protocol layer. Interledger addresses are hierarchical, dot-separated strings where the left-most segment is most significant. An example address might look like:
Expand All @@ -157,9 +149,9 @@ If two parties in the Interledger have a "parent/child" connection rather than a

## Interledger Security

**Interledger uses *conditional transfers* to secure payments across multiple hops and even through untrusted connectors.** Everyone only needs to trust their direct peers, no matter how many connectors are involved in forwarding a given packet. Connectors take some risk, but this risk can be managed and is primarily based upon the connector's chosen peers.
**Interledger uses _conditional transfers_ to secure payments across multiple hops and even through untrusted connectors.** Everyone only needs to trust their direct peers, no matter how many connectors are involved in forwarding a given packet. Connectors take some risk, but this risk can be managed and is primarily based upon the connector's chosen peers.

> **Hint:** Conditional transfers or *authorization holds* are the financial equivalent of a [two-phase commit](http://foldoc.org/two-phase%20commit).
> **Hint:** Conditional transfers or _authorization holds_ are the financial equivalent of a [two-phase commit](http://foldoc.org/two-phase%20commit).
Because each party is isolated from risks beyond their immediate peers, longer paths are not inherently more risky than shorter paths. This enables longer paths to compete with shorter paths to convey money from any given sender to any given receiver, while reducing the risk to the sender.

Expand Down
3 changes: 2 additions & 1 deletion 0026-payment-pointers/0026-payment-pointers.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Payment Pointers
draft: 2
draft: FINAL
deprecated: https://paymentpointers.org/
---
# Payment Pointers and Payment Setup Protocols

Expand Down
3 changes: 2 additions & 1 deletion 0028-web-monetization/0028-web-monetization.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Web Monetization
draft: FINAL
deprecated: https://adrianhopebailie.github.io/web-monetization/
deprecated: https://webmonetization.org/specification.html
---

# Web Monetization
Expand Down Expand Up @@ -173,3 +173,4 @@ Contains the `Monetization ID` (currently referred to as `requestId` in the even
```http
Web-Monetization-Id: dcd479ad-7d8d-4210-956a-13c14b8c67eb
```

8 changes: 6 additions & 2 deletions 0029-stream/0029-stream.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: STREAM - A Multiplexed Money and Data Transport for ILP
draft: 7
draft: 8
---

# STREAM: A Multiplexed Money and Data Transport for ILP
Expand Down Expand Up @@ -174,7 +174,9 @@ Implementations SHOULD wait for a valid response (encrypted with the same shared

#### 4.3.1. Connection Asset Details

Each endpoint MAY expose their asset details by sending a `ConnectionAssetDetails` frame.
Each endpoint MAY expose their asset details by sending a `ConnectionAssetDetails` frame. This frame is optional because some use-cases do not require it.

Asset details exposed by this frame MUST not change during the lifetime of a Connection.

### 4.4. Streams

Expand Down Expand Up @@ -432,6 +434,8 @@ In other words, if a sender resends data (e.g. because a packet was lost), it MU
| Source Asset Code | Utf8String | Asset code of endpoint that sent the frame. |
| Source Asset Scale | UInt8 | Asset scale of endpoint that sent the frame. |

Asset details exposed by this frame MUST NOT change during the lifetime of a Connection.

### 5.4. Error Codes

Error codes are sent in `StreamClose` and `ConnectionClose` frames to indicate what caused the stream or connection to be closed.
Expand Down
Loading

0 comments on commit efb52fe

Please sign in to comment.