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

GET channel request spec should specify possible values for "state" enum string #15

Closed
dannydeezy opened this issue Jan 6, 2023 · 7 comments

Comments

@dannydeezy
Copy link
Contributor

In the response of the GET channel request, it is unclear what the possible values for state should be.

I suggest two states:

  • PENDING (channel has been requested but the open has not been initiated yet. it may be none, partially, or fully paid for at this point, which the user can deduce from the amount_paid variable)
  • OPEN_INITIATED (the channel opening transaction has been broadcast. provides no info whether it has confirmed or is active yet)

thoughts?

@dannydeezy
Copy link
Contributor Author

these two states are intentionally broad to limit complexity for implementing state updates on the LSP side

@dannydeezy
Copy link
Contributor Author

but happy to consider more granular states if people want that

@BitcoinErrorLog
Copy link
Collaborator

My instinct is more granular, like PAID, PARTIAL_PMT, REFUNDED, FAILED, RETRYING, or such... but I defer to our actual node admins.

@SeverinAlexB
Copy link
Collaborator

Proposal. Please let me know if you are missing something or you disagree with any states:

State Description
TO_BE_PAID When the order has been created but the user hasn't paid yet.
PENDING Order is paid but the channel has not been opened yet.
OPEN_INITIATED Channel broadcast transaction is in the mempool. 0conf might skip directly to OPENED.
OPENED Channel is open and has the necessary block confirmations.
FAILED Any error. For example, the LSP couldn't connect to the target node.
REFUNDED Payment has been refunded.
OFFER_EXPIRED Order has not been paid and offer has therefore expired.

@dannydeezy
Copy link
Contributor Author

dannydeezy commented Jan 9, 2023

Proposal. Please let me know if you are missing something or you disagree with any states:

State Description
TO_BE_PAID When the order has been created but the user hasn't paid yet.
PENDING Order is paid but the channel has not been opened yet.
OPEN_INITIATED Channel broadcast transaction is in the mempool. 0conf might skip directly to OPENED.
OPENED Channel is open and has the necessary block confirmations.
FAILED Any error. For example, the LSP couldn't connect to the target node.
REFUNDED Payment has been refunded.
OFFER_EXPIRED Order has not been paid and offer has therefore expired.

these look great to me. only nit is I think we could come up with a cleaner name for TO_BE_PAID, maybe CREATED ?

@SeverinAlexB
Copy link
Collaborator

these look great to me. only nit is I think we could come up with a cleaner name for TO_BE_PAID, maybe CREATED ?

Sure, let it be CREATED. Let's shortly discuss this on our next LSP call in case somebody else has an input. Otherwise, I think this can be merged.

@SeverinAlexB
Copy link
Collaborator

#16

@rbndg rbndg closed this as completed Feb 2, 2023
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

No branches or pull requests

4 participants