{"action":"created","issue":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/812","repository_url":"https://api.github.com/repos/lightningnetwork/lnd","labels_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/812/comments","events_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/812/events","html_url":"https://github.com/lightningnetwork/lnd/issues/812","id":304091696,"number":812,"title":"sendcoins generated a transaction which did not show up in the network","user":{"login":"alevchuk","id":64738,"avatar_url":"https://avatars3.githubusercontent.com/u/64738?v=4","gravatar_id":"","url":"https://api.github.com/users/alevchuk","html_url":"https://github.com/alevchuk","followers_url":"https://api.github.com/users/alevchuk/followers","following_url":"https://api.github.com/users/alevchuk/following{/other_user}","gists_url":"https://api.github.com/users/alevchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alevchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevchuk/subscriptions","organizations_url":"https://api.github.com/users/alevchuk/orgs","repos_url":"https://api.github.com/users/alevchuk/repos","events_url":"https://api.github.com/users/alevchuk/events{/privacy}","received_events_url":"https://api.github.com/users/alevchuk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-10T18:15:21Z","updated_at":"2018-03-10T20:59:24Z","closed_at":null,"author_association":"NONE","body":"## What broke\r\n`lncli sendcoins` generated a transaction, yet it did to show up in the blockchain explorer or the external wallet\r\n\r\n## Theory\r\nA possible explanation is that `lncli sendcoins` seems to be able to generate transactions that will be rejected by the network\r\n\r\n## Environment\r\nTestnet, Autopilot, 30 channels, running LND 83b779dcdf535be5004c4254b805f797aa5b1d0c (Feb 23) \r\n\r\n##  Context (what happened?)\r\n\r\nTo do LND upgrade:\r\n1. I turned off Autopilot\r\n2. Closed all the channels (a few had to --force)\r\n3. After about 1 hour all channels were still closed, and it looked like all funds were in the wallet (yet, I failed to grab the output of `lncli walletbalance` at that time)\r\n\r\nIt's usually difficult to see how much funds I have total among the wallet and the channels. Yet it looked like I had 2.3 tBTC available to transfer out. I tried moving out 2.3 tBTC as follows, and the command \"succeed\":\r\n```\r\n$ lncli sendcoins --addr tb1q<...> 230000000  --sat_per_byte 40\r\n{\r\n    \"txid\": \"b0a732349958b2a771562fd25f05492fa3e6bcaa4af082daadb1aaf89e0641ee\"\r\n}\r\n```\r\n\r\nA day later, transaction is still not visible in testnet, and in the balances looks like I only have 1.6 tBTC:\r\n```\r\n$ lncli channelbalance\r\n{\r\n    \"balance\": \"0\"\r\n}\r\n\r\n$ lncli walletbalance\r\n{\r\n    \"total_balance\": \"1637104\",\r\n    \"confirmed_balance\": \"1080833\",\r\n    \"unconfirmed_balance\": \"556271\"\r\n}\r\n```\r\n\r\n##  Did this ever work?\r\n\r\n### When funds are available\r\nYes. I used `lncli sendcoins` many times to do LND upgrades. The transaction would show up in the external wallet almost instantly (5 seconds) and then would get confirmed easily with `--sat_per_byte 40`. Yet, this time the transaction did not even show up.\r\n\r\n### When funds are not available\r\nYes. Many times when I specify the amount that was too large, `lncli sendcoins` would always tell me that not enough funds are available, and not generate a transaction.\r\n\r\n##  Proposal (what I'd expect to happen)\r\n\r\nSince funds may not be truly available until all the Timelock contracts are fulfilled, I expect that  `lncli sendcoins` would report that funds are not yet available and not generate a transaction."},"comment":{"url":"https://api.github.com/repos/lightningnetwork/lnd/issues/comments/372066243","html_url":"https://github.com/lightningnetwork/lnd/issues/812#issuecomment-372066243","issue_url":"https://api.github.com/repos/lightningnetwork/lnd/issues/812","id":372066243,"user":{"login":"alevchuk","id":64738,"avatar_url":"https://avatars3.githubusercontent.com/u/64738?v=4","gravatar_id":"","url":"https://api.github.com/users/alevchuk","html_url":"https://github.com/alevchuk","followers_url":"https://api.github.com/users/alevchuk/followers","following_url":"https://api.github.com/users/alevchuk/following{/other_user}","gists_url":"https://api.github.com/users/alevchuk/gists{/gist_id}","starred_url":"https://api.github.com/users/alevchuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevchuk/subscriptions","organizations_url":"https://api.github.com/users/alevchuk/orgs","repos_url":"https://api.github.com/users/alevchuk/repos","events_url":"https://api.github.com/users/alevchuk/events{/privacy}","received_events_url":"https://api.github.com/users/alevchuk/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T20:59:24Z","updated_at":"2018-03-10T20:59:24Z","author_association":"NONE","body":"Funds showed up. Some channels so showed up even though I did not re-enable Autopilot.\r\nCan't send coins:\r\n\r\n```\r\ndate && ls -l /home/ligtning/src/go/bin/l* &&  \\\r\n  lncli channelbalance && lncli walletbalance && \\\r\n  lncli sendcoins --addr tb1q<...> --amt 231000000  --sat_per_byte 40 && echo OK\r\n\r\nSat Mar 10 12:55:33 PST 2018\r\n-rwxrwxr-x 1 ligtning ligtning 13994237 Mar  9 22:29 /home/ligtning/src/go/bin/lncli\r\n-rwxrwxr-x 1 ligtning ligtning 29579443 Mar  9 22:29 /home/ligtning/src/go/bin/lnd\r\n{\r\n    \"balance\": \"251637244\"\r\n}\r\n{\r\n    \"total_balance\": \"231638017\",\r\n    \"confirmed_balance\": \"231638017\",\r\n    \"unconfirmed_balance\": \"0\"\r\n}\r\n[lncli] rpc error: code = Unknown desc = -22: TX rejected: output da9aa63c434fc8c4acc57563a46ef24e2ec06f415300c3b4a73306099c7235c5:1 already spent by transaction b0a732349958b2a771562fd25f05492fa3e6bcaa4af082daadb1aaf89e0641ee in the memory pool\r\n```\r\n\r\nfee downgrade did not re-pro:\r\n```\r\n2018-03-10 12:55:33.355 [INF] RPCS: [sendcoins] addr=tb1q<...>, amt=2.31 BTC, sat/byte=40\r\n2018-03-10 12:55:33.368 [INF] LNWL: Inserting unconfirmed transaction de38f552f11028dff0d5e4853f4ffc908beebebf8cde161e5b1090a0020c9107\r\n````"}}
{"actor":{"display_login":"alevchuk"}}