-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Technical Preview 2 #2
Comments
Toubleshooting1. Cannot find package when running
|
Macaroons are flexible authorization credentials. You can read more here -
Example of remote call
Response
Toubleshooting:
Error message:
There is public url and Macaroons are required. Check
Start the lnd again, if the files are still missing - the wallet was created with |
Make you reachable from othersAdd the following items to the config file under
|
Caveat
Technical Preview 2 is our second preview version and is not fully functional, but is useful to demonstrate the progress of development.
Changelog
lncli queryroutes
issueStatus of this version
Code base: https://github.com/BTCGPU/lnd
Implementation Checklist
Have some fun
If you can set up a BTG LN node successfully, please connect to me:
0260af55e51ebb4def6298fd26eba1101e4ede0b54ca76d268f2c5dd30f3d5faa9@45.56.84.44:9735
. I will pay you a virtual coffee by testnet btg.Instructions (BTG testnet only)
This guide will help you compile your own LND for BTG and send / receive Lightning payments between LND nodes. Note that this guide is for testnet only. We use Ubuntu as the example environment.
Step 1: Run BTG core node on testnet
master
branch. Make sure zmq support is enabled.$HOME/.bitcoingold/bitcoingold.conf
. This is the default config file path for Linux builds. Please adjust if you are running on a different OS.bgoldd
daemon and fully sync to the testnet. You can check https://test-explorer.bitcoingold.org to ensure the node is at the right block height.Step 2: Install LND
Generally the instructions are similar to the official LND installation guide (link), but you need to use our repo
BTCGPU/lnd
instead of the original one.golang-1.10-go
:apt
failed to find the package, tryapt update
$HOME/gocode
(as an example) for source management and add the path to $PATH. If you put them in your.bashrc
they'll always be ready for you:cannot find package "golang.org/x/sys/cpu"
, please check the Troubleshooting Section.lnd
andlncli
.Step 3: Configure LND
After installing LND, we connect LND to the BTG core client
bgoldd
. Note that LND will try to read the rpc credentials and zmq ports from the default core node configuration at$HOME/.bitcoingold/bitcoingold.conf
.$HOME/.lnd/lnd.conf
bgoldd
daemon on testnet and wait it to be fully synced.lnd
and it should show similar text as below:Step 4: Play with LND
The technical preview 1 has the functionality to run the tutorial:
https://dev.lightning.community/tutorial/01-lncli/index.html
We use
lncli
to controllnd
.Prepare the wallet
lnd
, runlncli create
to create a new wallet with your password.lnd
. This time runlncli unlock
with your password to activate the daemon.lncli newaddress np2wkh
to generate a wallet address and send some coins to the address for testing. The testnet faucet can be used to get testnet coins. (Note: a segwit address is needed for establishing LN channel.)lncli walletbalance
.Connect to another node
lncli getinfo
. You can get basic information and your identity pubkey from the result.Note that when connecting two nodes, the one who accepts the connection should have its port (9735 by default) public accessible. To connect to a peer, you need to know its identity pubkey.
When the connection is established, you can check the connected peers by
lncli listpeers
:Caveat: Please be aware that a
bgoldd
instance cannot be shared with more than onelnd
if you are doing experiment locally. Sharing the node may result in unexpected behavior.Open channels
lncli openchannel --node_key <target_pubkey> --local_amt <local_amount> --push_amt 0 --block 1
.Output:
lncli pendingchannels
lncli listchannels
:lncli walletbalance
Request money by invoice
lncli addinvoice --amt 1234 --memo "pay me a virtual coffee"
pay_req
to the payer. The payer should first check the invoice:lncli decodepayreq <pay_req>
lncli payinvoice --pay_req lntbtg5u1pdnlkpvpp5h5852qdg27t6sq3le4pu7576q4kl8panlwrrsyj3l5ulmrcnrdjqdq4wpshjgrdv5s8qmr9v9ek2cqzysw2xd8rmsxzwxn6n0xpc4ck97l6y09hrmkxf7g88x6n60l8ppgmtsx806t7c6sufuqgvxe492hn7c8flr5uk2z2dlzj385xzgza25mrqqdehuuj
That's it! The instant transaction is done.
Multi-hop payment
lncli queryroutes <identity_pubkey> --amt <amount_in_sat>
(known issue: "lncli queryroutes" crash #4)Close channel
The text was updated successfully, but these errors were encountered: