-
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
multi: configurable remote chan reserve #6956
multi: configurable remote chan reserve #6956
Conversation
5831b99
to
ccf0dbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice and clean PR.
ccf0dbc
to
85879e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for review @guggero 🚗 updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
@sputn1ck: review reminder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the changes, when using a lower than accepted remote reserve sats, my funds where locked until I restarted lnd. Is that expected? The other peer is using the tagged release 0.15.1-beta
./lncli-debug -n regtest listunspent
{
"utxos": [
{
"address_type": 4,
"address": "bcrt1p7r5fzhfvaa03zghds7cedkzw3zzssr9ctvy6mcjcrpkkm74fkj6sfdvf2x",
"amount_sat": 1000000,
"pk_script": "5120f0e8915d2cef5f1122ed87b196d84e8885080cb85b09ade258186d6dfaa9b4b5",
"outpoint": "3264a46325894726614c097f1cd6300b1f388a95c9e5849c4a4559026d17112b:0",
"confirmations": 3
}
]
}
./lncli-debug -n regtest openchannel --remote_reserve_sats=100 02d0830a548c670525ae0f17c8c2f2d9a3f0c520da0cc75591394198092e46ce1a 50000
[lncli] rpc error: code = Unknown desc = channel reserve of 100 sat is too small, min is 354 sat
./lncli-debug -n regtest listunspent
{
"utxos": []
}
2a76a68
to
0c0d3de
Compare
ahhhh you are completely right @sputn1ck! Thanks for catching this. Have updated it so that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new changes fixed the reservation issue, however now I don't see any response when calling
./lncli-debug -n regtest openchannel --remote_reserve_sats=100 02d0830a548c670525ae0f17c8c2f2d9a3f0c520da0cc75591394198092e46ce1a 50000
In this commit, the sanity checks in the CommitConstraints method is moved out into a helper function called VerifyConstraints. This is done so that the sanity checks can be performed more easily else where in the code base. The new helper method is then called in the handleInitFundingMsg method of the funding manager before the OpenChannelMessage is sent.
In this commit, the channel reserve of an initiated channel is made to be optionally configurable.
0c0d3de
to
eeed3e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, tACK LGTM 🚀
In this PR, the remote channel reserve amount is made to be configurable.
Up until now, it has always just been 1% of the channel capacity.
This is just an updated of this pr. The original author has been preserved as
commit author where it applies.
Fixes #1083
Related #800