-
Notifications
You must be signed in to change notification settings - Fork 108
Overhaul architecture overview, separate ledger requirements #181
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
Conversation
|
||
All electronic transfers have to be recorded in stateful systems. Otherwise the same instance of an asset could be sent to two different destinations, essentially duplicating the asset. This is also known as a double-spend. We call these stateful systems *ledgers*. | ||
[diagram] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a diagram here that ideally shows a sender, 2 connectors, 3 ledgers, and a receiver
All Interledger transport protocols use the [Interledger Protocol (ILP)](#interledger-protocol-ilp) to communicate with connectors about transfer requests. This may include requesting a quote or requesting a transfer on another ledger. | ||
|
||
The Interledger layer defines a standard way to refer to ledgers, accounts and amounts. This is used in routing as well as to try and make quotes comparable. | ||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SVG doesn't render because of github/markup#556, we should either find a workaround or render a PNG file as well from the graph. The only issue with doing that is the node libraries that do that include PhantomJS, which is a pretty heavy dependency just for rendering 1-2 PNG files.
@@ -1,252 +1,135 @@ | |||
# Interledger Architecture | |||
|
|||
This document outlines the Interledger architecture and explains how the different layers relate to each other. The [Interledger Protocol (ILP)](#interledger-protocol-ilp) is one layer in the Interledger architecture. | |||
The Interledger protocol suite provides for secure payments across multiple assets on different ledgers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the usage of these grouping terms like Interledger Architecture
and Interledger Protocol Suite
, but I'm not sure the document clearly differentiates between the two terms. Are these meant to be synonymous, or is “Interledger Protocol Suite” a component of the “Interledger Architecture”, which actually has more to it than just the protocol suite?
|
||
The Interledger architecture is heavily inspired by the Internet architecture described in [RFC 1122](https://tools.ietf.org/html/rfc1122), [RFC 1123](https://tools.ietf.org/html/rfc1123) and [RFC 1009](https://tools.ietf.org/html/rfc1009). | ||
The [Interledger Protocol (ILP)](#interledger-layer) is the core of the Interledger protocol suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still find our colloquial usage of ILP
to be unclear. Let's assume there's some proper name for the collection of all Interledger protocols (the suite). One of those protocols (the thing in RFC-3) is called “ILP”, or “Interledger Protocol”. If you put it all together, it reduces to the following: there’s a collection of Interledger protocols, one of which is the "Interledger Protocol.”
Wouldn’t it make more sense to start calling the thing defined by RFC-3 something else, like ILPC
, which expanded would read Interledger Protocol Core
or just Interledger Core Protocol
?
(I'm open to the argument that this naming "ship" has already sailed, but figured I'd give it another try)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an outsider coming to this - I agree. "ILP" seems to be the widely used term to reference the entire suite/stack. It's certainly the term used by everyone I know outside the dev circle who discusses, well... ILP. The current situation that one layer of the stack also shares the same name as the whole stack is confusing to newcomers and a hinderance to unambiguous discussion. The ILPC distinction suggested here is a good solution, I would take it further and drop the "protocol". We know it's a protocol already given the suite would be/is referred to as the Interledger Protocol, so we could simply refer to that layer as Interledger Core.
So, the Interledger Protocol (ILP) is the entire stack of protocols, one layer of which is Interledger Core, or ILC.
@sappenin @professorhantzen I added a note that tries to clarify the colloquial use of the term ILP. Does that help? Some of that confusion comes from how closely the architecture (and terminology) mirrors that of the Internet. The Internet Protocol is the part that defines the IP address and packet format, but people often describe the whole stack (and even the Web) as the Internet or using the Internet Protocol / IP. Technically it is correct to call only the part that specifies the address and packet format and the flow the "Interledger Protocol" and the stack is the "Interledger stack" or "Interledger protocol suite", but I wouldn't expect that distinction to make it into normal conversation. Another way to look at it is: if you start taking away layers of the stack and saying "I don't want to use those", at what point is what you've got no longer using the Interledger Protocol? I'd say it's when you're no longer using what's defined in IL-RFC 3. |
@emschwartz That's a helpful distinction. Perhaps consider adding more of your rationale to the doc, like some adaptation of your paragraph above? Might be helpful for future readers to know a bit more about why the colloquialism exists. |
I tried adding another sentence to that intro with that explanation but it felt like too much explanation, given that the intended audience presumably doesn't understand Interledger very well yet. |
3a8eb3d
to
f930ac7
Compare
That's a fair point - perhaps that "more explanation" might make sense in an FAQ or maybe in the glossary that @michielbdejong is proposing in #180. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big improvement over the existing doc. Moving ledger requirements out to its own RFC is a good idea. I noticed a few things that need to be corrected, but I'm happy with the direction of these changes.
|
||
All electronic transfers have to be recorded in stateful systems. Otherwise the same instance of an asset could be sent to two different destinations, essentially duplicating the asset. This is also known as a double-spend. We call these stateful systems *ledgers*. | ||
[diagram] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to replace this with an actual diagram before merging
|
||
 | ||
**Interledger uses *conditional transfers* to secure payments across multiple hops and even through untrusted connectors.** | ||
Senders are guaranteed proof that the receiver got the payment or their money back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without a blank line between, this is interpreted by most Markdown parsers as a hard-wrapped continuation of the previous sentence's paragraph. You should probably set it off with a separate line, and maybe even make it into bullet points.
Also, we can strengthen this sentence:
Senders are guaranteed proof that the receiver got the payment or their money back.
Suggested rephrase:
Senders are guaranteed cryptographic proof that the receiver got the payment or their money back, no matter how many ledgers and connectors are in between.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually intended for that to be a single paragraph
The application layer is the top layer of the Interledger protocol suite. Protocols on this layer are responsible for negotiating the key properties of a payment: | ||
Each local transfer is first *prepared* and then either *executed* or *rejected*. | ||
When a transfer is prepared, the ledger puts the funds of the source account on hold with a *cryptographic condition* and *timeout*. | ||
If the condition is fulfilled before the timeout, the transfer is executed and the funds are transferred. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, this should either be bullet points (numbered list?), a separate paragraph with a blank line between it and the previous one, or actually a continuation of the previous line.
* Source Account | ||
* Destination Account | ||
* Destination Amount | ||
Inspired by the [Lightning Network](http://lightning.network), Interledger uses the digest of the [SHA-256](https://en.wikipedia.org/wiki/SHA-2) hash function as the condition for transfers. The fulfillment is a valid 32-byte preimage for the hash specified when the transfer was prepared. Ledgers are responsible for validating fulfillments. [Transport Layer](#transport-layer) protocols are used by the sender and receiverto generate the condition for a particular payment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: "receiverto"
|
||
A reference implementation of a ledger using 5BLP can be found [here](https://github.com/interledger/five-bells-ledger). | ||
Most implementations of Interledger use a plugin architecture to abstract the differences between different ledgers. For an example of this, see [IL-RFC 4](../0004-ledger-plugin-interface/0004-ledger-plugin-interface), which defines the interface for the Javascript implementation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken link: ../0004-ledger-plugin-interface/0004-ledger-plugin-interface
is missing the .md
on the end
|
||
#### Legacy Protocols (e.g. ACH, ISO 20022) | ||
[Interledger Addresses](../0015-interledger-addresses/0015-interledger-addresses.md) provide a ledger-agnostic way to address ledgers and accounts. Interledger addresses are dot-separated strings that contain prefixes to group ledgers. An example address might look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken link: IL-RFC 15 is named "ILP Addresses", not "Interledger Addresses"
(I think the name ILP is technically accurate here, because the addressing is used within the core Interledger Protocol itself?)
|
||
For example, Bitcoin supports SHA-256 hashlocked escrow transfers which means it can participate in ILP Interledger transactions. Bitcoin's [BIP-65](https://github.com/bitcoin/bips/blob/master/bip-0065.mediawiki) proposal provided the timeouts required for Basic level support. | ||
The [Interledger Protocol (ILP)](../0003-interledger-protocol/0003-interledger-protocol.md) is the core of the Interledger stack and defines a standard address packet format that instruct connectors where to send a payment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of "standard address packet format" I would just say "packet format"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That phrase was meant to read "standard address and packet format"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
RFC 1 missed or did not emphasize a lot of key details of the interledger architecture, while repeating certain content and including too much detail about the ledger requirement. this moves the ledger requirements to a separate RFC and restructures the architecture overview to highlight the key aspects of interledger that newcomers should understand
20f23b2
to
a94024b
Compare
I'm going to merge this PR now. If anyone has more comments we can add further changes to the docs later. cc @justmoon |
RFC 1 missed or did not emphasize a lot of key details of the interledger architecture, while repeating certain content and including too much detail about the ledger requirement. this moves the ledger requirements to a separate RFC and restructures the architecture overview to highlight the key aspects of interledger that newcomers should understand
Based on feedback from @professorhantzen