Pay a lightning invoice over goTenna mesh network
Terms:
-
MESH -- the off-grid machine. Has a copy of C-Lightning installed, a Blockstream satellite connection for blockchain backend, and will relay C-Lightning messages for a single channel, over mesh network.
-
GATEWAY -- has a connection to goTenna mesh network and also internet. Does not require any C-Lightning or Bitcoin blockchain capability but will act as a relay/proxy for MESH.
-
REMOTE -- the remote channel counterpaty for the lightning channel MESH has open, not GATEWAY! Has C-Lightning running only.
Optional but recommended C-Lightning config
options:
# listen but don't announce
bind-addr=0.0.0.0:9733
# disable dns lookup of peers
disable-dns
# see wire messages
log-level=io
-
C-Lightning setup:
-
REMOTE must be at commit v0.7.3rc2
-
MESH works best with additional patches, found in this fork: v0.7.3rc2_mesh
git clone https://github.com/willcl-ark/lightningtenna.git git checkout v0.7.3rc2_mesh
-
-
Both instances of C-Lightning should be configured using "--enable-developer" flag in order to permit the "lightning-cli dev-suppress-gossip" command:
./configure --enable-developer
-
Make C-Lightning
make
-
Before first start, modify the values in example_config.ini as appropriate.
-
MESH should ideally have a single peer and single channel open in C-Lightning.
-
On MESH, ensure C-Lightning is not running.
-
On REMOTE start C-Lightning. Issue RPC command:
lightning-cli dev-suppress-gossip
-
On MESH, start the python mesh client:
python lightningtenna.py --mesh
, follow the prompts, then power on goTenna (a) and await connection messages. -
On GATEWAY (can be same machine for testing) start the gateway client
python lightningtenna.py --gatway
, power on goTenna (b) and await connection messages. -
On MESH start C-Lightning.
-
Watch them communicate via mesh network proxy.
-
Pay an invoice. If testing, you can use
python testpay.py
to grab a testnet blockstream satellite invoice and try to pay it using Lighting-rpc.