Skip to content

Conversation

@sputn1ck
Copy link
Member

@sputn1ck sputn1ck commented Aug 25, 2023

Prior PR: #632

Skip first 12 commits

This PR focuses on spending the reservations. We add locking and unlocking of reservations as well as musig2 helpers which allow for future spends of the reservations.

The reservation statemachine in this PR changes to:

stateDiagram-v2
[*] --> ReservationInit: OnPrepayInvoice
ReservationConfirmed
ReservationConfirmed --> ReservationTimedOut: OnReservationTimedOut
ReservationConfirmed --> ReservationLocked: OnReservationLocked
ReservationFailed
ReservationInit
ReservationInit --> ReservationWaitForOpening: OnPaymentSent
ReservationInit --> ReservationFailed: OnError
ReservationLocked
ReservationLocked --> ReservationConfirmed: OnReservationUnlocked
ReservationLocked --> ReservationSpendBroadcasted: OnReservationSpendBroadcasted
ReservationOpeningMsgReceived
ReservationOpeningMsgReceived --> ReservationOpeningMsgReceived: OnError
ReservationOpeningMsgReceived --> ReservationWaitForConfirmation: OnOpeningMessageSaved
ReservationSpendBroadcasted
ReservationSpendBroadcasted --> ReservationSpendBroadcasted: OnReservationSpendBroadcasted
ReservationSpendBroadcasted --> ReservationSpendConfirmed: OnReservationSpendConfirmed
ReservationWaitForConfirmation
ReservationWaitForConfirmation --> ReservationConfirmed: OnReservationConfirmed
ReservationWaitForConfirmation --> ReservationTimedOut: OnReservationTimedOut
ReservationWaitForOpening
ReservationWaitForOpening --> ReservationOpeningMsgReceived: OnOpeningMessageReceived
ReservationWaitForOpening --> ReservationFailed: OnInvoiceCanceled
Loading

TODO:

  • Add locking and unlocking actions
  • Listen on spends

Next PR: Two Weeks™

@sputn1ck sputn1ck force-pushed the instantloopout_3 branch 8 times, most recently from 7871c5d to 108d980 Compare September 14, 2023 11:41
@sputn1ck sputn1ck force-pushed the instantloopout_3 branch 2 times, most recently from 43739da to 7666979 Compare October 25, 2023 21:33
@sputn1ck sputn1ck force-pushed the instantloopout_3 branch 4 times, most recently from c2e25d0 to 0f914fc Compare November 28, 2023 17:06
@sputn1ck sputn1ck force-pushed the instantloopout_3 branch 4 times, most recently from 03557e1 to 73e115f Compare December 13, 2023 17:01
This commit adds the reservation state machine and actions to the
reservation package.
This commit adds the reservation manager to the reservation package.
This manager manages the lifecycle
of reservations.
This commit adds the ReservationServer service to the proto definitions.
@sputn1ck sputn1ck closed this Dec 19, 2023
@sputn1ck sputn1ck deleted the instantloopout_3 branch December 19, 2023 11:31
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 this pull request may close these issues.

1 participant