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

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

Closed
Roasbeef opened this issue May 10, 2018 · 3 comments
Labels
beginner Issues suitable for new developers channel management The management of the nodes channels contracts P3 might get fixed, nice to have rpc Related to the RPC interface

Comments

@Roasbeef
Copy link
Member

Roasbeef commented May 10, 2018

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.

@Roasbeef Roasbeef added rpc Related to the RPC interface beginner Issues suitable for new developers channel management The management of the nodes channels contracts labels May 10, 2018
@orbitalturtle
Copy link
Contributor

I'll work on this.

@Roasbeef
Copy link
Member Author

Roasbeef commented May 20, 2018 via email

@Roasbeef
Copy link
Member Author

Resolved w/ #1875.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner Issues suitable for new developers channel management The management of the nodes channels contracts P3 might get fixed, nice to have rpc Related to the RPC interface
Projects
None yet
Development

No branches or pull requests

2 participants