{"action":"created","issue":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1599","repository_url":"https://api.github.com/repos/lightningnetwork/lnd","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1599/labels{/name}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1599/comments","events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1599/events","html_url":"https://github.com/lightningnetwork/lnd/issues/1599","id":343329571,"node_id":"MDU6SXNzdWUzNDMzMjk1NzE=","number":1599,"title":"temporary_channel_failure messages wrong","user":{"login":"robtex","id":5145437,"node_id":"MDQ6VXNlcjUxNDU0Mzc=","avatar_url":"https://avatars2.githubusercontent.com/u/5145437?v=4","gravatar_id":"","url":"https://api.github.com/users/robtex","html_url":"https://github.com/robtex","followers_url":"https://api.github.com/users/robtex/followers","following_url":"https://api.github.com/users/robtex/following{/other_user}","gists_url":"https://api.github.com/users/robtex/gists{/gist_id}","starred_url":"https://api.github.com/users/robtex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robtex/subscriptions","organizations_url":"https://api.github.com/users/robtex/orgs","repos_url":"https://api.github.com/users/robtex/repos","events_url":"https://api.github.com/users/robtex/events{/privacy}","received_events_url":"https://api.github.com/users/robtex/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-07-21T14:16:43Z","updated_at":"2018-07-24T10:52:32Z","closed_at":"2018-07-23T23:33:36Z","author_association":"NONE","body":"\"unable to route payment\" messages usually looks like this:\r\n```\r\nunable to route payment to destination: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc426c713b0)({\r\n Signature: (lnwire.Sig) (len=64 cap=64) {\r\n  00000000  34 16 83 fb aa 67 a7 05  13 f1 85 a8 e5 8a 88 5c  |4....g.........\\|\r\n  00000010  38 f6 51 38 20 af 78 51  a3 c2 57 94 c7 56 20 46  |8.Q8 .xQ..W..V F|\r\n  00000020  5b c0 07 2d a7 5c 3e b2  bc 7a ce d1 c7 06 0c c5  |[..-.\\>..z......|\r\n  00000030  6a 16 59 ff 59 2e 51 23  14 cd 12 c3 a6 3b ff cd  |j.Y.Y.Q#.....;..|\r\n },\r\n ChainHash: (chainhash.Hash) (len=32 cap=32) 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f,\r\n ShortChannelID: (lnwire.ShortChannelID) 524753:1823:0,\r\n Timestamp: (uint32) 1532149421,\r\n Flags: (lnwire.ChanUpdateFlag) 0,\r\n TimeLockDelta: (uint16) 144,\r\n HtlcMinimumMsat: (lnwire.MilliSatoshi) 0 mSAT,\r\n BaseFee: (uint32) 1000,\r\n FeeRate: (uint32) 1\r\n})\r\n)\r\n```\r\nwith correct chainhash and otherwise sane data .\r\n\r\nbut sometimes they look like this. \r\nit seems the entire message is skewed by 2 bytes, and the first two bytes look like a length specification and are always 01 02\r\n```\r\nunable to route payment to destination: TemporaryChannelFailure(update=(*lnwire.ChannelUpdate)(0xc43701cab0)({\r\n Signature: (lnwire.Sig) (len=64 cap=64) {\r\n  00000000  01 02 9f 8a 5b a1 4f 54  e8 3b 79 4e 18 12 03 a8  |....[.OT.;yN....|\r\n  00000010  e5 ab fc 97 39 6f 8d bf  f5 b3 0f 99 2d b0 03 a6  |....9o......-...|\r\n  00000020  34 f9 03 2f 7c 25 71 20  f6 12 cf 39 1f 4a 0c f3  |4../|%q ...9.J..|\r\n  00000030  7a 28 e7 85 b2 b5 0c 19  24 5a 85 77 45 f3 3d 32  |z(......$Z.wE.=2|\r\n },\r\n ChainHash: (chainhash.Hash) (len=32 cap=32) 00000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26faadb,\r\n ShortChannelID: (lnwire.ShortChannelID) 8:1422336:1659,\r\n Timestamp: (uint32) 23379,\r\n Flags: (lnwire.ChanUpdateFlag) 6389,\r\n TimeLockDelta: (uint16) 0,\r\n HtlcMinimumMsat: (lnwire.MilliSatoshi) 3940649673949184 mSAT,\r\n BaseFee: (uint32) 0,\r\n FeeRate: (uint32) 65536000\r\n})\r\n)\r\n```\r\n\r\nit seems the messages that look like this are sent from c-lightning nodes.\r\n\r\naccording to the rfc it looks like there *should* be a length specification in those messages\r\n```type: UPDATE|7 (temporary_channel_failure)\r\ndata:\r\n[2:len]\r\n[len:channel_update]\r\n```\r\n\r\nthus i suspect lnd is doing it wrong both when crafting these messages and when parsing them.\r\napart from cosmetic issues, this also affects channel pruning in both lnd other implementations. \r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments/407364776","html_url":"https://github.com/lightningnetwork/lnd/issues/1599#issuecomment-407364776","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/1599","id":407364776,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzM2NDc3Ng==","user":{"login":"cdecker","id":120117,"node_id":"MDQ6VXNlcjEyMDExNw==","avatar_url":"https://avatars2.githubusercontent.com/u/120117?v=4","gravatar_id":"","url":"https://api.github.com/users/cdecker","html_url":"https://github.com/cdecker","followers_url":"https://api.github.com/users/cdecker/followers","following_url":"https://api.github.com/users/cdecker/following{/other_user}","gists_url":"https://api.github.com/users/cdecker/gists{/gist_id}","starred_url":"https://api.github.com/users/cdecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdecker/subscriptions","organizations_url":"https://api.github.com/users/cdecker/orgs","repos_url":"https://api.github.com/users/cdecker/repos","events_url":"https://api.github.com/users/cdecker/events{/privacy}","received_events_url":"https://api.github.com/users/cdecker/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T10:52:32Z","updated_at":"2018-07-24T10:52:32Z","author_association":"CONTRIBUTOR","body":"Like I said yesterday, I prefer adding some workaround that prefixes the type if it is not present in the short-term, if it allows us to achieve a better consistency in the long-term."}}
{"actor":{"display_login":"cdecker"}}