-
Notifications
You must be signed in to change notification settings - Fork 111
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
docs(0023): unconditional transfer type for ilp4 #360
Conversation
3bd9274
to
fec57c6
Compare
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.
LGTM, but let's not merge until everything actually uses this.
Wouldn't it be more common for the party who does the on-ledger or on-paychan payment, to send a BTP message saying "My BTP balance just went up because I paid you on-ledger, look here are the details" instead of what currently seems to be a call type to notify your peer that "Your BTP balance just went up because you paid me on-ledger, look here are the details" |
@sharafian see also #347 (comment) The term "Transfer" implies that when you use this call type, your BTP balance will go down. The way I understood |
sendMoney makes your balance go down, because you're sending money to your peer. A BTP connection/relationship no longer has a balance, but the |
If you have one call registry where |
How about 'Settle' instead of 'Transfer'? |
Transfer and Prepare aren't in the same call registry though. From the plugin's point of view, sendData just sends data. The |
I wouldn't be hugely opposed to Settle instead of Transfer, but having to refactor around naming is always a little annoying. |
They are, call types 3 and 7, see https://github.com/interledger/rfcs/pull/360/files#diff-2c87a4d4e57dd9430f40e0fe2b4d295aR114 |
|
Wouldn't it be an |
Ah ok, then
I think a good way to explain the new situation is to avoid the term 'balance', and say the If you use BTP as just a trustline, then the I think keeping the current BTP interpretation (where a Prepare+Fulfill decreases your balance instead of increasing your unsecuredAmount) would be much easier. We could just add a |
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.
before merging this, we should discuss another option which @emschwartz came up with, which would be to just send paychan claim updates in Message calls (maybe using a protocolName that's not 'ilp'
, to distinguish it from Message calls that correspond to plugin.sendData
calls).
I think that would make more sense, because there's no longer a balance to keep track of at the ledger layer, so no need for a separate Transfer call type at the BTP level.
And then we would be left with just an application-agnostic bilateral message/response/error protocol which is only called a 'transfer protocol' for historical reasons; if we would name it now, we would probably call it 'Bilateral Message Protocol' instead.
I would propose we keep putting the payment channel claim updates in Transfer calls for the 18Q1 version, since that's what we've already been implementing, and I want to put this live on the testnet today. Then we can always move them to Message calls in the 18Q2 version. |
Maybe the real benefit of the Transfer type is so that we can clearly distinguish between the |
The protocolName would be 'ilp' for sendData, and something else (e.g. 'paychan') for sendMoney. |
So the only difference when using the |
Currently, it's used as an extra check to see if the balance is in dispute (the |
What happens if they are out of sync? Would it just log a warning to the console? Doesn't seem like there's much you would actually do about that |
Yeah, it just logs a warning to make you aware of it |
@sharafian I'm merging this so I can continue #383 on top of it, see further discussion there. |
Adds unconditional transfer type to accommodate #359 . Related to interledgerjs/btp-packet#18 .