Skip to content
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

RFC-9: Combine Query and Quoting phases #49

Closed
justmoon opened this issue Jul 13, 2016 · 4 comments · Fixed by #75
Closed

RFC-9: Combine Query and Quoting phases #49

justmoon opened this issue Jul 13, 2016 · 4 comments · Fixed by #75

Comments

@justmoon
Copy link
Member

The query phase should just include all information needed to locally calculate the behavior/cost for different amounts, to avoid a separate quoting call.

@adrianhopebailie
Copy link
Collaborator

Do we need a quoting phase at all?

How a node (sending client or connector) decides what it thinks the cost will be to send a payment to an address is not tightly coupled to the actual sending of the payment.

The node makes some decision about how much to transfer on one of it's connected ledgers when it passes that ledger a new ILP payment, how it comes to that decision isn't actually part of the protocol.

I'd propose that we mention quoting as an orthogonal process that helps the node decide how much it must transfer but not make it an explicit phase in the protocol

@justmoon
Copy link
Member Author

Do we need a quoting phase at all?

No, this issue proposes removing it.

@emschwartz
Copy link
Member

As mentioned in #65 I'm not sure whether we should combine Query + Quote or Query + Setup.

The Query step goes to the receiver while the Quote goes to the connector. How could the receiver know the full path from the sender?

@adrianhopebailie
Copy link
Collaborator

I don't think quoting should be specified as part of any of the other protocols at all. Quoting is orthogonal to everything else in ITP and SPSP. It's a step in the overall process but not and end-to-end protocol.

The fact that SPSP tries to handle both fixed sender and fixed receiver pricing complicates things because it means we have to fit quoting in the middle sometimes but can do it after the SPSP steps other times.

Maybe we should break out and define the steps more clearly so we can be clear what steps a particular protocol handles?

This would also allow us to define SPSP in terms of these steps and how the order changes if the sender or receiver price is fixed.

  1. Account Discovery : What we call "query" now should be "address discovery" (i.e. discovering the ILP address of the receiver) because calling it query assumes that info will always be fetched from the receiver via a query (true for SPSP but not for all setup protocols).
  2. Destination Amount Discovery: This can either be done via quoting or it is known up front. It could also be provided by the receiver in response to a query where the identifier is for an invoice not an account.
  3. Condition and Timeout Discovery: Constructing the condition and determining the timeout. In ITP this is done by the receiver and sent back to the sender to use but it could also be provided in an invoice (declarative) or provided by some other system.
  4. Verification: The process of preparing the payment may involve getting other information such as receiver names, public keys, images etc to verify the receiver.
  5. Quoting: Determining the amount to send locally to initiate and end-to-end transfer to the receiver.

Which steps are required and in what order is all specific to the use case. SPSP should define how each of these are done for a well-defined set of use cases and then we should define other protocols for other use cases.

emschwartz added a commit that referenced this issue Aug 9, 2016
resolves #65
SPSP now consists of a single receiver endpoint that you can query using HTTP GET or set up a payment with using HTTP POST
discovery phase is now optional and in an appendix
use ILP addresses
use ITP (resolves #57)
remove quoting phase (resolves #49)
@emschwartz emschwartz mentioned this issue Aug 9, 2016
emschwartz added a commit that referenced this issue Aug 16, 2016
resolves #65
SPSP now consists of a single receiver endpoint that you can query using HTTP GET or set up a payment with using HTTP POST
discovery phase is now optional and in an appendix
use ILP addresses
use ITP (resolves #57)
remove quoting phase (resolves #49)
emschwartz added a commit that referenced this issue Aug 17, 2016
resolves #65
SPSP now consists of a single receiver endpoint that you can query using HTTP GET or set up a payment with using HTTP POST
discovery phase is now optional and in an appendix
use ILP addresses
use ITP (resolves #57)
remove quoting phase (resolves #49)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants