lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Bad query_short_channel_ids encoding

Open mocacinno opened this issue 8 years ago • 3 comments

Issue and Steps to Reproduce

I have this issue with both latest release (v0.6) as with pulling the latest commits from git and building c-lightning.

Started lightningd on the main net, as parameters gave the bitcoin-datadir, an alias, the network (bitcoin), log-level (debug), my address (ipv4 address of my server), a log-file and --daemon

Tried to open a channel to this running daemon using the latest eclair version on android (7).

From the log of my clightning: 2018-07-12T06:56:16.960Z lightning_gossipd(32220): peer 02201279ededa7128ab9d205d5a1af7335c65bf10f7e0f53244917d6040a03631e now remote 2018-07-12T06:56:16.960Z lightning_gossipd(32220): UPDATE WIRE_GOSSIP_PEER_CONNECTED 2018-07-12T06:56:16.960Z lightning_gossipd(32220): UPDATE WIRE_GOSSIP_PEER_CONNECTED 2018-07-12T06:56:16.961Z lightning_gossipd(32220): Handing back peer 02201279ededa7128ab9d205d5a1af7335c65bf10f7e0f53244917d6040a03631e to master 2018-07-12T06:56:16.961Z lightning_gossipd(32220): hand_back_peer 02201279ededa7128ab9d205d5a1af7335c65bf10f7e0f53244917d6040a03631e: now local again 2018-07-12T06:56:16.995Z lightning_gossipd(32220): short_ids compress 0 returned -5: not compresssing 2018-07-12T06:56:17.088Z lightning_gossipd(32220): unzlib: error -3 2018-07-12T06:56:17.088Z lightning_gossipd(32220): peer 02201279ededa7128ab9d205d5a1af7335c65bf10f7e0f53244917d6040a03631e: Bad query_short_channel_ids encoding 011f8b080000000000000003000000000000000000 2018-07-12T06:56:17.088Z lightning_gossipd(32220): peer_out WIRE_ERROR 2018-07-12T06:56:17.088Z lightning_gossipd(32220): 02201279ededa7128ab9d205d5a1af7335c65bf10f7e0f53244917d6040a03631e: we sent them a fatal error, closing

Error message shown on my eclair wallet: Failed to open channel: peer sent error: 'Bad query_short_channel_ids encoding 011f8b080000000000000003000000000000000000'

I also started a second lightning node on the same machine (different user), listening on 127.0.0.1, and used it to connect to my "main" node, this worked directly (did not try to open a channel tough... We're on the main net).

I also run a node on the testnet on a different server, have the same setup running, and i'm able to open channels from my eclair testnet wallet to my lightning node on the testnet without a hitch.

getinfo output

{ "id": "03df930c0d6530cd32392ff17942d2df85df3ae4fc0a4a9aeb485317a593fd4dcf", "port": 9735, "address": [ { "type": "ipv4", "address": "xxx", "port": 9735 } ], "binding": [ { "type": "ipv4", "address": "xxx", "port": 9735 } ], "version": "v0.6", "blockheight": 531574, "network": "bitcoin" }

mocacinno avatar Jul 12 '18 07:07 mocacinno

In the meantime, i completely rebuilt bitcoin core (dev branch) and c-lightning (dev branch), sync'ed the blockchain... moved my .lightning folder to a backup space, generated a new secret,... Everything fresh. Still exactly the same error... So i guess the issue is reproducible, even with the latest versions of core and c-lightning when trying to open a channel from eclair mainnet wallet on android 7.

mocacinno avatar Jul 20 '18 05:07 mocacinno

Eclair was mistakenly encoding using gzip encoding instead of zlib. I think they've fixed it now...

rustyrussell avatar Jul 30 '18 04:07 rustyrussell

@rustyrussel : that seemed to do the trick... The eclair version in the play store was 0.3.0, so i built the latest version from source and now everything works perfectly. Turned out i posted an issue in the wrong git, should have opened this issue at the eclair repo. Sorry!

mocacinno avatar Jul 31 '18 07:07 mocacinno