ElementsProject/lightning

Failing to fundchannel with 'Unacceptable channel constraints: minimum HTLC value is too large: 0'

Closed this issue · 6 comments

hkjn commented

Issue and Steps to Reproduce

Built at d5effc.

I'm attempting to open a new channel to a peer in GOSSIPING state:

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

It's possible that this response is expected based on the behavior of our peer, but since the "too large" message was given along with the value zero I thought I'd report it in case there's some issue here.

Debug logs follow:

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

getinfo output

$ lightning-cli getinfo        
{ "id" : "0264089bc3a4afde671b87740d72e03d899b7f0783fbb756786cb7632b2e1db510", "port" : 9735, "address" :          
        [                                                
                { "type" : "ipv4", "address" : "163.172.162.18", "port" : 9735 } ], "version" : "v0.5.2-2016-11-21-908-gd5effcb9", "blockheight" : 509138, "network" : "bitcoin" }

Seems to be an incompatibility with lnd: fundingmanager.go

Will file a compatibility issue in the integration repo.

Sjors commented

I just got that error as well, trying to open a channel to the new Yalls Mainnet node 03457d3e97da4e6a01739f56c0cd168cb14962b91fb44dc3d647816c70e05e9b93 at 34.200.241.1.

That seems to be the same node that @hkjn reported the error with. From the discussion in the integration repo it seems that they have set the maxValueInFlight to less than 1 satoshi (which gets rounded down to 0)... Seems rather pointless.

hkjn commented

Thanks @cdecker.

So what's happening here is that the other node is requesting a max_htlc_value_in_flight_msat value [1] of < 1 satoshi, and we are failing to agree with them on channel parameters? If that's correct, apart from possibly improving the error message there doesn't seem much we can do about it, even though I agree I don't see the point of configuring a node like that.

Feel free to close this issue unless there's something we can improve here.

[1] https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#the-open_channel-message

@hkjn, yeah, feels a bit unsatisfactory to just close it, but there is little we can do from our side. I think the lnd will add a more helpful error message soon :-)