Replies: 1 comment 2 replies
-
|
Super helpful guide. I've been exploring a bit how to get the first chunk of the directions up and running in Polar (https://lightningpolar.com/), to make it a bit easier to set up a testing environment. If anyone finds this useful... Feel free to use the following zip in Polar to auto-set up a bitcoind backend with some blocks mined and two CLN nodes: onion-message-testing.polar.zip In Polar just click "import network" and drag the above zip file inside, and start the network. (This feature is like my favorite thing ever as of... today) Couldn't get the custom version of lnd node that we need for this project running in Polar for some reason, but maybe I'll do some debugging and add that in later. For now for the lnd node -- hook up the lnd node you run above to the bitcoind |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Testing LNDK locally for development requires a fair amount of setup. This discussion outlines possilbe ways of testing new features locally, with a specific focus on onion messaging related features. Ths guide assumes that you have
bitcoindrunning in regtest mode and have setup LND and LND as described in README.1. Setup CLN Nodes
Run two CLN nodes (see Getting Started guide) in developer mode (
./configure --enable-developer). The bare minimum command set you can work with is:Note:
--dev-fast-gossipand--experimental-offersare important.You can create the following aliases for convenience:
alias cl="./cli/lightning-cli --network=regtest --lightning-dir=~/.lightning"alias cl1="./cli/lightning-cli --network=regtest --lightning-dir=~/.lightning1"2. Open public channels between
CL -- LNDandCL1 -- LND, for each CL node:cl getinfo-> provides pubkey inidand host/port inaddresslncli openchannel --node_key={id} --connect=locahost:{port} --local_amt=20000Remember to mine 6 blocks to confirm channel!
To verify that the channels are open:
cl listincominglncli listchannels3. Fetch an offer invoice to test Onion Messaging
cl offer 100 test->bolt12:lno...cl1 fetchinvoice lno....This should send an onion message from
CL1 --> LND --> CLto fetch the invoice, then a return onion message fromCL --> LND --> CL1to return it.You should be able to see logs in
LNDKindicating that a message has been forwarded, and LND will logCustom message received peer={peer} type=513andSending <unknown>(type=513) to {peer}.Beta Was this translation helpful? Give feedback.
All reactions