Skip to content

rpc+contractcourt: merge the contractResolver state into the pendingchannels RPC response  #1227

@Roasbeef

Description

@Roasbeef

Currently, the pendingchannels RPC will only display information drawn from the utxoNursery for pending force close channels. However, for a channel that was forced closed with active HTLCs, the HTLC outputs won't be sent to the nursery until they're fully mature. As a result, atm, there's a gap where all information isn't displayed on the RPC layer. This should be reconciled by having the pendingchannels RPC query the chainArbitrator to obtain information regarding all active contractResolvers for a particular channel point.

There are currently four types of contractResolvers: timeout, success, timeout contest, and success contest. The first two are terminal states and will result in outputs being swept on chain by the utxoNursery or the resolver directly. The latter two, are indeterminate states. In this state we're either waiting for an HTLC to timeout, a pre-image to be discovered off-chain, or a pre-image to be discovered on-chain. During this period of time (before expiry or sweeping), there's no information available on the RPC layer concerning these HTLCs. In order to reconcile this, we'll need to extend the pendingchannels RPC call to also pull in information concerning these HTLCs.

One possible path would be to extend the HTLC with a new enum showing the current status of the HTLC itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3might get fixed, nice to havebeginnerIssues suitable for new developerschannel managementThe management of the nodes channelscontractsrpcRelated to the RPC interface

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions