cdecker/lightning-integration

Unacceptable channel constraints: minimum HTLC value is too large: 0

Closed this issue ยท 6 comments

That is a rather strange error message that lnd returns when c-lightning tries to fund a channel.

$ lightning-cli fundchannel 03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93 150000                                                                                                        
{ "code" : -1, "message" : "Error packet: channel 3852d5a338142eb8418f2d6ca8c5eaf94dd29734d202a503df6bbb1a02f29526: Unacceptable channel constraints: minimum HTLC value is too large: 0" }                                            

Logs:

2018-02-14T10:27:45.292Z lightning_gossipd(5408): req: type WIRE_GOSSIPCTL_RELEASE_PEER len 35
2018-02-14T10:27:45.293Z lightning_gossipd(5408): REPLY WIRE_GOSSIPCTL_RELEASE_PEER_REPLY with 2 fds
2018-02-14T10:27:45.295Z lightningd(5400): peer 03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93: State changed from UNINITIALIZED to OPENINGD
2018-02-14T10:27:45.303Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): pid 22153, msgfd 24
2018-02-14T10:27:45.882Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): First per_commit_point = 030b645ef6a2af5634e7af033b7373669406b1f709b61d4b65d2e29792ee1b5aba
2018-02-14T10:27:45.883Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): peer_out WIRE_OPEN_CHANNEL
2018-02-14T10:27:45.987Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): peer_in WIRE_ERROR
2018-02-14T10:27:45.987Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): UPDATE WIRE_OPENING_NEGOTIATION_FAILED
2018-02-14T10:27:45.988Z lightningd(5400): lightning_openingd(03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93): UPDATE WIRE_OPENING_NEGOTIATION_FAILED
2018-02-14T10:27:45.988Z lightningd(5400): peer 03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93: Opening negotiation failed: Error packet: channel 3ccdb8b4030af33a0cf887786d15776a57fb15290cd26b07195975949c81321e$
2018-02-14T10:27:45.989Z lightningd(5400):jcon fd 14: Failing: Error packet: channel 3ccdb8b4030af33a0cf887786d15776a57fb15290cd26b07195975949c81321e: Unacceptable channel constraints: minimum HTLC value is too large: 0
2018-02-14T10:27:46.005Z lightning_gossipd(5408): req: type WIRE_GOSSIPCTL_HAND_BACK_PEER len 189
2018-02-14T10:27:46.006Z lightning_gossipd(5408): hand_back_peer 03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93: now local again

Is lnd using signed numbers for their minimal HTLC value, and someone set -1?

Parent-Issue: ElementsProject/lightning#997
Reported-By: @hkjn

Hmm, yeh we do use an int64 for the min HTLC value. Are y'all setting the min HTLC to some maximum value? Is there any way to print out the accept_channel parameters y'all sent?

The check that's failing is: https://github.com/lightningnetwork/lnd/blob/master/lnwallet/reservation.go#L307

So we're asserting that the min HTLC isn't greater than the max value in-flight, however, the line converts to BTC in the error message, so if the minHTLC sent is below a satoshi, then that won't be shown in the error message.

Ok, so the error message is sensible, except for the rounding. But would that failure mean that the maxValueInFlight was set to be less than 1 satoshi? That's a rather weird configuration, someone doing IoT payments already? ๐Ÿ˜‰

Should be fixed soon in lnd: lightningnetwork/lnd#779

Thanks for this report!

Thanks @Roasbeef ๐Ÿ‘