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

Take channel reserve into account within pathfinding #3787

Closed
juscamarena opened this issue Dec 4, 2019 · 0 comments · Fixed by #3691
Closed

Take channel reserve into account within pathfinding #3787

juscamarena opened this issue Dec 4, 2019 · 0 comments · Fixed by #3691
Assignees
Labels
bug Unintended code behaviour channels routing

Comments

@juscamarena
Copy link
Contributor

juscamarena commented Dec 4, 2019

Background

Describe your issue here.
Paying a destination until it becomes one sided and dips into channel reserve, LND will continue to try this route even after it errors.

Your environment

  • version of lnd 0.8.0-beta commit=v0.8.0-beta-274-g59c4db7f33e557dcfec7dae8f204294b5a627670-dirty"
  • which operating system (uname -a on *Nix)
  • version of btcd, bitcoind, or other backend
  • any other relevant environment details

Steps to reproduce

Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.

Expected behaviour

Tell us what should happen
LND should avoid the channel when attempting future payments if it dips into channel reserve and attempt other routes.

Actual behaviour

I get hammered with these logs making sending unusable to the destination:

2019-12-04 15:47:28.755 [WRN] HSWC: ChannelLink(579497:1927:1): unable to handle downstream add HTLC: commitment transaction dips peer below chan reserve
2019-12-04 15:47:28.774 [ERR] CRTR: Attempt to send payment 2506cab6ef89726de7342971a56b5f78f986481f534b8b8abd235f5f3f42c299 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc01032f600)({
Signature: (lnwire.Sig) (len=64 cap=64) {
00000000 f7 77 3b ac 51 fd 65 85 20 56 73 71 91 11 d9 52 |.w;.Q.e. Vsq...R|
00000010 eb ee 9f 46 6c c8 d0 7a a0 b9 63 de 45 5a 42 cd |...Fl..z..c.EZB.|
00000020 08 40 a9 c6 8e 47 d3 cb 11 f2 70 2b f8 03 f8 22 |[email protected]+..."|
00000030 40 4a 7e 3e c5 e1 11 9e cf 45 9b a7 7f 51 b6 c4 |@j~>.....E...Q..|
},
ChainHash: (chainhash.Hash) (len=32 cap=32) 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f,
ShortChannelID: (lnwire.ShortChannelID) 579497:1927:1,
Timestamp: (uint32) 1575428703,
MessageFlags: (lnwire.ChanUpdateMsgFlags) 00000001,
ChannelFlags: (lnwire.ChanUpdateChanFlags) 00000000,
TimeLockDelta: (uint16) 40,
HtlcMinimumMsat: (lnwire.MilliSatoshi) 1000 mSAT,
BaseFee: (uint32) 4000,
FeeRate: (uint32) 1000,
HtlcMaximumMsat: (lnwire.MilliSatoshi) 3960000000 mSAT,
ExtraOpaqueData: ([]uint8)
})
)@0
2019-12-04 15:47:28.775 [ERR] CRTR: Channel update of ourselves received
2019-12-04 15:47:28.783 [WRN] CRTR: Routing failure for local channel 637163689887596545 occurred
2019-12-04 15:47:29.520 [WRN] HSWC: ChannelLink(579497:1927:1): unable to handle downstream add HTLC: commitment transaction dips peer below chan reserve
2019-12-04 15:47:29.539 [ERR] CRTR: Attempt to send payment 2506cab6ef89726de7342971a56b5f78f986481f534b8b8abd235f5f3f42c299 failed: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc01032f760)({
Signature: (lnwire.Sig) (len=64 cap=64) {
00000000 f7 77 3b ac 51 fd 65 85 20 56 73 71 91 11 d9 52 |.w;.Q.e. Vsq...R|
00000010 eb ee 9f 46 6c c8 d0 7a a0 b9 63 de 45 5a 42 cd |...Fl..z..c.EZB.|
00000020 08 40 a9 c6 8e 47 d3 cb 11 f2 70 2b f8 03 f8 22 |[email protected]+..."|
00000030 40 4a 7e 3e c5 e1 11 9e cf 45 9b a7 7f 51 b6 c4 |@j~>.....E...Q..|
},
ChainHash: (chainhash.Hash) (len=32 cap=32) 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f,
ShortChannelID: (lnwire.ShortChannelID) 579497:1927:1,
Timestamp: (uint32) 1575428703,
MessageFlags: (lnwire.ChanUpdateMsgFlags) 00000001,
ChannelFlags: (lnwire.ChanUpdateChanFlags) 00000000,
TimeLockDelta: (uint16) 40,
HtlcMinimumMsat: (lnwire.MilliSatoshi) 1000 mSAT,
BaseFee: (uint32) 4000,
FeeRate: (uint32) 1000,
HtlcMaximumMsat: (lnwire.MilliSatoshi) 3960000000 mSAT,
ExtraOpaqueData: ([]uint8)
})
)@0
2019-12-04 15:47:29.539 [ERR] CRTR: Channel update of ourselves received
2019-12-04 15:47:29.547 [WRN] CRTR: Routing failure for local channel 637163689887596545 occurred

I believe @alexbosworth also has this issue.

Closing the channel helps, but not ideal.

@wpaulino wpaulino changed the title Fix Pathfinding thinking it has money but the channel peer thinks the payment would go too low below the reserve and then there is an infinite loop Take channel reserve into account within pathfinding Dec 4, 2019
@wpaulino wpaulino added bug Unintended code behaviour channels routing labels Dec 4, 2019
@halseth halseth assigned halseth and unassigned joostjager Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended code behaviour channels routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants