interledger-deprecated / tutorials

Interledger tutorials
17 stars 9 forks source link

fix: rename payment method identifier to interledger-hkdf #31

Closed michielbdejong closed 6 years ago

michielbdejong commented 6 years ago

The rationale behind this PR is that psk with all its complexity is not necessary for repeated payments; all you need is hkdf. At the end of this tutorial, psk is still used, because it's required by koa-ilp and by superagent-ilp.

michielbdejong commented 6 years ago

Related to https://github.com/interledger/rfcs/issues/335

justmoon commented 6 years ago

What's "interledger-hkdf"? We shouldn't have a different set of protocols for the tutorial. The tutorial should explain the actual protocols. If you think interledger-hkdf is actually a superior alternative to psk, let's make it an RFC. Even then, imho, the tutorials should explain the most popular protocols. Right now that seems to be PSK for better or for worse.

michielbdejong commented 6 years ago

We shouldn't have a different set of protocols for the tutorial

Very true! But we've been having some trouble to determine "different from what?" :)

http-ilp is a bit of a mess at the moment, I tried to reach more consensus in https://github.com/interledger/rfcs/issues/329 and had discussions about this with Adrian, Evan, Ben, and Dennis, but some of that only lead to more different options. One good thing it did lead to was fix: breaking change to PSK spec, to match what ilp-kit does. But still, we have four different candidates for http-ilp:

  1. your original version (now abandoned)
  2. the version with the double shared secrets and psk-based hkdf which you and Ben implemented in the recent demos
  3. the simple (one-shot) version without hkdf which Adrian used in the Letter Shop tutorial
  4. the simplified version I described here, as an intermediate step from Adrian's http-ilp description to Ben's http-ilp description.

And that's not even counting Adrian's proposal to use JWE, the internet draft about it, or the discussion about how to deal with streaming payments (stream the content or do a double round-trip for each chunk).

I discussed the situation with @emschwartz on Friday, and we left it at the plan that when @sharafian is back from Japan, I'll ping him so he and I can reach a first consensus, and then basically we can try to build that consensus out to the rest of the Interledger community.

sharafian commented 6 years ago

@michielbdejong We've settled on an http-ilp format, right? Does that mean we don't need this PR anymore?

michielbdejong commented 6 years ago

I think the version that's currently described in rfcs is now pretty close to what's implemented in koa-ilp and superagent-ilp, and also I think it's now compatible with Adrians' internet draft, so that's good progress. But I'm not sure whether that specific version should be the main one. It solves a specific case where you want to use psk to repeatedly fund a prepaid balance, and consume this balance in separate http requests where each request uses up a portion of the balance. It has a special two-way secret so that this prepaid balance can be accessible from multiple devices the user may own. If you don't use up the prepaid balance at that specific web shop, then there's no way to get it back (you would probably have to contact that shop's billing department by email), Also, it's tightly coupled to version 1 of psk.

But there are different things people may want to do:

michielbdejong commented 6 years ago

Postponed until after interledgerjs/ilp-plugin-lightning#3

michielbdejong commented 6 years ago

Deprecated