lightninglabs / pool

Lightning Pool: a non-custodial batched uniform clearing-price auction for Lightning Channel Leases (LCL). An LCL packages up inbound channel liquidity (ability to receive funds) as a fixed income asset with a maturity date expressed in blocks.
MIT License
253 stars 47 forks source link

reset/cleanup lnd state when canceled Pool actions occur (open channel etc) #456

Open dstadulis opened 1 year ago

dstadulis commented 1 year ago

Expected behavior If Pool backend cancels a batch (one of the set of trader doesn't perform the batch's instructions), Pool should instruct lnd to return to a state where the node is reset to be able to create a new transaction with their pool funds (say, open a Pool channel immediately).

Actual behavior Pool doesn't instruct lnd to reset state/channels when batches are canceled. Channel opens, and spends will persist in their unexecutable form (Due to a cancel batche) until Pool client receives the next batch-creation instructions from Pool server.

Waiting to reset lnd's state until Pool server instructs the client to perform and time critical action (batch creation) is subpary and likely causes delay and dysfunction in subsequent batch creation

Remediation: Reset/cleanup lnd state when canceled Pool actions occur (open channel etc)