Skip to content

Channel queries: failure to decode empty array of timestamps #3425

@sstone

Description

@sstone

Issue and Steps to Reproduce

c-lighting fails to decode a reply_channel_range message that includes an optional timestamps TLV with an encoding type set to ZLIB and an empty encoded data buffer, and returns a connection-level error, failing all channels! reason=reply_channel_range 0 timestamps when 0 scids? error, most probably because it tries to decompress an empty or NULL buffer

Imho an empty encoded buffer should decode to an empty list, even if its encoding is set to ZLIB, and I've opened a PR to clarify this (see lightning/bolts#729)

getinfo output

{
   "id": "03daa35dc54f90a5fc7f726d58ad0890281843ce99c9a1680a4065138848a5d1e1",
   "alias": "IRATESPAWN-v0.8.0-60-ge1ef902",
   "color": "03daa3",
   "num_peers": 0,
   "num_pending_channels": 0,
   "num_active_channels": 0,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
      {
         "type": "ipv4",
         "address": "127.0.0.1",
         "port": 19736
      }
   ],
   "version": "v0.8.0-60-ge1ef902",
   "blockheight": 1662433,
   "network": "testnet",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/home/fabrice/.lightning/testnet"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions