Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 07, 2018, 09:38:36 PM Last edit: October 07, 2018, 09:52:26 PM by Zand_ |
|
Looks like there is still an issue with the macaroon files/path Use the following commands. sudo mkdir /home/bitcoin/.lnd/data/chain/bitcoin/mainnet sudo cp /home/bitcoin/.lnd/data/chain/bitcoin/testnet/admin.macaroon /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/ Are you sure that your LND instance runs on the testnet? @DOWN: Fixed Nice that did the trick! Made my first successful payment on the testnet! Thank you! Weird thing is my wallet balance hasn't changed after purchasing 3 Starblock coffees. Also there is a pretty significant delay when making the payment, thought it was supposed to be lightning fast (or maybe it's just the limited processing power of the Pi)
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 07, 2018, 10:02:58 PM Last edit: October 07, 2018, 10:13:52 PM by BitCryptex |
|
Thank you! Weird thing is my wallet balance hasn't changed after purchasing 3 Starblock coffees. Also there is a bit of a delay when making the payment, thought it was supposed to be lightning fast Bitcoin Lightning Network transaction speed depends on the number of nodes that take part in the payment routing. LND might prefer to take a cheaper route over a shorter one. If you open a channel directly to Starblock then your payment will be confirmed instantly without any fees. Wallet balance is not the same as channel balance. You have to use the following command to check the state of your channels.
|
|
|
|
Carlton Banks
Legendary
Offline
Activity: 3430
Merit: 3074
|
|
October 07, 2018, 10:04:25 PM |
|
Nice that did the trick! Made my first successful payment on the testnet! Thank you! Good to hear Weird thing is my wallet balance hasn't changed after purchasing 3 Starblock coffees. Maybe a software bug? Reading up on lnd might help Also there is a pretty significant delay when making the payment, thought it was supposed to be lightning fast (or maybe it's just the limited processing power of the Pi) Possibly the Pi. How long was the delay? And when you did 'lncli openchannel', was that to the starblocks node directly? If not, that may be one reason for the delay (BitCryptex is saying the same basic thing a different way). One way it could slow right down is if the payment path failed multiple times, that would be pretty bad luck for a first attempt.
|
Vires in numeris
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 08, 2018, 03:24:28 PM |
|
Nice that did the trick! Made my first successful payment on the testnet! Thank you! Good to hear Weird thing is my wallet balance hasn't changed after purchasing 3 Starblock coffees. Maybe a software bug? Reading up on lnd might help Also there is a pretty significant delay when making the payment, thought it was supposed to be lightning fast (or maybe it's just the limited processing power of the Pi) Possibly the Pi. How long was the delay? And when you did 'lncli openchannel', was that to the starblocks node directly? If not, that may be one reason for the delay (BitCryptex is saying the same basic thing a different way). One way it could slow right down is if the payment path failed multiple times, that would be pretty bad luck for a first attempt. It took about 20 seconds per transaction on Starblocks but was near instant when I bought an article off Yalls.org. It's possible I'm not connected directly with the Starblocks channel, will have to double check when I get home. Very happy that I finally have the testnet up and running, thank you again for all the help! Going to move onto mainnet tonight so I can buy this Blockstream sticker. Then it will all have been worth it https://store.blockstream.com/product/lightning-sticker/
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 09, 2018, 12:41:03 AM |
|
How would I find my testnet node on a Lightning Network explorer like in the link below? https://explorer.acinq.co/
|
|
|
|
bob123
Legendary
Offline
Activity: 1624
Merit: 2481
|
|
October 09, 2018, 07:41:36 AM |
|
From their site: If you can't find your node, please make sure that your node or one of its peers has a connection or a channel opened to one of the nodes in the network.
So first make sure you are connected to at least one of these nodes. Afterwards you can use the serach bar at the upper right to find your node either using your public key or IP address.
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 09, 2018, 01:27:53 PM |
|
From their site: If you can't find your node, please make sure that your node or one of its peers has a connection or a channel opened to one of the nodes in the network.
So first make sure you are connected to at least one of these nodes. Afterwards you can use the serach bar at the upper right to find your node either using your public key or IP address. I can find my node on the 1ML testnet explorer but not on the acqing explorer. Link to my node on 1ML is below, I definitely have channels open with nodes listed on acqing https://1ml.com/testnet/node/038c7b93518f30975d046a98dd1b369219abc77a17f804ee728402c9e0f3d65657Also, how do I assign an alias to my node? That might make it easier to find.
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 09, 2018, 01:46:27 PM Last edit: October 09, 2018, 08:57:23 PM by BitCryptex |
|
Also, how do I assign an alias to my node? That might make it easier to find.
You have to edit the configuration file using nano and restart your node to apply changes. "Alias" setting should be somewhere in the middle of the file and as far as I remember, it should not exceed 32 characters. sudo nano /home/bitcoin/.lnd/lnd.conf sudo systemctl restart lnd ACINQ explorer is a bit outdated so I wouldn't be surprised if it was their fault. 1ML.com is often used by us, especially on the mainnet. If I were you, I would ignore that issue. Please note that 1ML.com might not update your node information instantly. On the left side of the page there should be "Last updated".
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 13, 2018, 01:32:23 AM |
|
So I was able to get testnet fully operation and have started the migration process to mainnet. For some reason I'm having a hard time unlocking my LND wallet. Under "Mainnet > Restart bitcoind & lnd for mainnet" it has us create a new LND wallet using same password as testnet. Followed these steps without any issues but for some reason when I restart and unlock my wallet, I get the following error message
[lncli] rpc error: code = Unknown desc = wallet not found
Any ideas?
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 13, 2018, 09:51:24 AM |
|
Any ideas?
You wallet might have been created in the testnet directory. Try copying wallet.db using the following command sudo cp /home/bitcoin/.lnd/data/chain/bitcoin/testnet/wallet.db /home/bitcoin/.lnd/data/chain/bitcoin/mainnet
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 13, 2018, 03:05:58 PM |
|
Any ideas?
You wallet might have been created in the testnet directory. Try copying wallet.db using the following command sudo cp /home/bitcoin/.lnd/data/chain/bitcoin/testnet/wallet.db /home/bitcoin/.lnd/data/chain/bitcoin/mainnet Gave that a try and got the following error message when I tried to unlock afterwards [lncli] rpc error: code = PermissionDenied desc = open /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db: permission denied
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 13, 2018, 04:09:01 PM |
|
Gave that a try and got the following error message when I tried to unlock afterwards
It seems to be a small permission problem. These two commands should fix it. sudo chown bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db The documentation seems to be a bit outdated.
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 13, 2018, 04:39:37 PM |
|
Gave that a try and got the following error message when I tried to unlock afterwards
It seems to be a small permission problem. These two commands should fix it. sudo chown bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db The documentation seems to be a bit outdated. Ok well that sorta seemed to work but brings me back to square one. I'm able to successfully unlock the wallet but when I monitor the LND startup process with the "sudo journalctl -f -u lnd" command, the following message pops up After waiting a minute or two, this message eventually comes up
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 13, 2018, 04:58:23 PM |
|
Oh. I forgot that I asked you to create mainnet folder using sudo. User bitcoin probably did not have permission to create wallet.db file. The testnet one is obviously incompatible. sudo rm /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db sudo chown -hR bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet Now you can try creating a new wallet again.
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 13, 2018, 05:13:47 PM Last edit: October 13, 2018, 06:42:16 PM by Zand_ |
|
Oh. I forgot that I asked you to create mainnet folder using sudo. User bitcoin probably did not have permission to create wallet.db file. The testnet one is obviously incompatible. sudo rm /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/wallet.db sudo chown -hR bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet Now you can try creating a new wallet again. That did the trick, thank you!! Please provide your node info, would like to throw a lightning tip your way once my LND gets caught up with the mainnet blockchain Edit: I spoke too soon, my LND is caught up but I can't generate a new wallet address. When I do "lncli newaddress np2wkh" I get the following error message [lncli] rpc error: code = Unknown desc = cannot retrieve macaroon: cannot get macaroon: root key with id 0 doesn't exist
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
October 13, 2018, 07:11:23 PM Last edit: October 13, 2018, 07:22:08 PM by BitCryptex |
|
Edit: I spoke too soon, my LND is caught up but I can't generate a new wallet address. When I do "lncli newaddress np2wkh" I get the following error message
[lncli] rpc error: code = Unknown desc = cannot retrieve macaroon: cannot get macaroon: root key with id 0 doesn't exist
It still looks like a permission problem to me. Let's try two different things and see which one will work. sudo chown bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon Check if this has fixed your problem. LND restart might (but should not) be needed. If it doesn't work, try deleting admin.macaroon (it will probably result in another error which you faced earlier). sudo rm /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon EDIT: The second solution (deleting admin.macaroon) might work since you have switched from the testnet to the mainnet. LND should generate a new permission file compatible with the mainnet. Also, we assigned the "-hR" parameter to the chown earlier so it should have affected admin.macaroon as well.
|
|
|
|
Zand_ (OP)
Member
Offline
Activity: 112
Merit: 17
|
|
October 14, 2018, 02:57:22 PM Last edit: October 14, 2018, 04:32:56 PM by Zand_ |
|
Edit: I spoke too soon, my LND is caught up but I can't generate a new wallet address. When I do "lncli newaddress np2wkh" I get the following error message
[lncli] rpc error: code = Unknown desc = cannot retrieve macaroon: cannot get macaroon: root key with id 0 doesn't exist
It still looks like a permission problem to me. Let's try two different things and see which one will work. sudo chown bitcoin /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon sudo chmod 700 /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon Check if this has fixed your problem. LND restart might (but should not) be needed. If it doesn't work, try deleting admin.macaroon (it will probably result in another error which you faced earlier). sudo rm /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon EDIT: The second solution (deleting admin.macaroon) might work since you have switched from the testnet to the mainnet. LND should generate a new permission file compatible with the mainnet. Also, we assigned the "-hR" parameter to the chown earlier so it should have affected admin.macaroon as well. Awesome, I got it working! Funding wallet now! Feel free to provide your node info, would like to repay you for all the help (same goes for Carlton) Update: Thank you guys!
|
|
|
|
wetherweasel
Newbie
Offline
Activity: 4
Merit: 0
|
|
December 22, 2018, 10:40:13 PM Last edit: December 22, 2018, 10:57:42 PM by wetherweasel |
|
Hi there, not sure if this is the right thread but I dont know where else to put it rn. I followed this instruction and got it somehow running on testnet. Now I funded my LN Wallet with 0.001 BTC bitcoin@xxx:~ $ bitcoin-cli sendtoaddress 2N5gfEWg4nMU1DS4uLRwqwCQfG8Yym3Jf7m 0.001
Checked immediately after it looked like this (Which made sense to me): bitcoin@xxx:~ $ lncli --network=testnet walletbalance { "total_balance": "100000", "confirmed_balance": "0", "unconfirmed_balance": "100000" Now the sourcery when tx where confirmed (which doesnt make any sense to me): bitcoin@xxx:~ $ lncli --network=testnet walletbalance { "total_balance": "39823", "confirmed_balance": "39823", "unconfirmed_balance": "0" It’s getting even weirder: When I check the transaction on Blockexplorer it tells me that my channel is funded with 0.0006 / 60000 sat It sums up to the total amount minus 177sat fee (even though it was announced with 166). But I totally do not get it. Can someone provide help? Thanks a lot!
|
|
|
|
Rath_
aka BitCryptex
Legendary
Offline
Activity: 1876
Merit: 3132
|
|
December 22, 2018, 11:06:10 PM |
|
When I check the transaction on Blockexplorer it tells me that my channel is funded with 0.0006 / 60000 sat It sums up to the total amount minus 177sat fee (even though it was announced with 166). But I totally do not get it. If you executed only these three commands then you didn't open any channel. You have just funded on-chain wallet of your Lightning Network node. In order to open a channel, you have to execute the following commands: lncli connect <PUBKEY>@<HOST>:<PORT>lncli openchannel --node_key=<ID_PUBKEY> --local_amt=<AMOUNT>Could you share your txid with us? Since you are working on the testnet, it won't have any impact on your privacy.
|
|
|
|
wetherweasel
Newbie
Offline
Activity: 4
Merit: 0
|
|
December 22, 2018, 11:17:35 PM Last edit: December 24, 2018, 08:22:50 AM by wetherweasel |
|
thanks for lightning fast reply! since i am not even sure what a transaction-id is but here is the link https://testnet.smartbit.com.au/tx/ee1755b974cbc8dfb8b673336973f0b0306cb34f6a10d49a82a1abc6076b59aeIf you executed only these three commands then you didn't open any channel. You have just funded on-chain wallet of your Lightning Network node. In order to open a channel, you have to execute the following commands:
I was thinking that there was some kind of autopilot thingy but maybe only for opening/searching channels? sorry. completely new to all of this magic. —
|
|
|
|
|