-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
local/remote balances and channel phases clarification #4067
Comments
rpc additions
Starting with the easy to address issues, it should be simple enough to add fields to the rpc messages, I'll will add them 👍 channel classification
waiting_close_channels`: contains channels that have had their close initiated, but the close tx has not confirmed on chain, so this is as expected.
We consider cooperatively closed channels with one confirmation as closed (as of #1248), so we do not expect cooperatively closed channels to show up in accounting issues
Unfortunately this isn't the case, because when a channel is force closed it may still have some active htlcs on the commitment. This means that these htlcs will be separate outputs in the commitment tx that goes on chain, and need to be factored in when trying to fully account for your capacity. I'm working on some changes to make this information more accessible.
I managed to replicate this for 0.9.1
When we list waiting close channels, we have the full |
rpc additionsGreat, thank you! channel classificationI cannot reproduce a case in which the channel appears in I confirm that after mining a block the channel appears in accounting issuesOk, thank you again! |
Getting back to this, @zoedberg what do you need fees for in this case? In
|
Background
Hi,
I'm having a hard time getting local and remote balances of channels.
Environment
lnd
:v0.9.1-beta
Linux host 4.19.0-0.bpo.5-amd64 #1 SMP Debian 4.19.37-4~bpo9+1 (2019-06-19) x86_64 GNU/Linux
bitcoind
:0.18.1
(regtest)Steps to reproduce
Briefly:
Expected behaviour
The sum of these balances to always be equal to the capacity of the channel,
therefore including reserves and commit fees.
Actual behaviour
From the
Channel
message I'm able to recover this information by addingthe
commit_fee
to the balance of theinitiator
(local if true, remote otherwise).From the
PendingOpenChannel
message I'm unable to recover this information.The parameter
commit_fee
is available but I don't have theinitiator
.From the
ClosedChannel
message I'm unable to recover this information.The issue here is different, I'm unable to receive information at all.
Channels closed mutually appear in
waiting_close_channels
and disappear aftera block is mined (doesn't matter who initiated closing), never showing up in
pending_closing_channels
.From the
ForceClosedChannel
message, assuming the sum of local and remote balances equates the capacity, I could subtract local balance from capacity (remote balance seems to be always 0 in this case), but I'm not sure the resulting amount is correct.Moreover it seems that only channels force-closed by us move from
waiting_close_channels
topending_force_closing_channels
(the others disappear).From the
WaitingCloseChannel
message I'm unable to recover this information.I miss both the
commit_fee
and theinitiator
parameters.The text was updated successfully, but these errors were encountered: