Skip to main content
12 votes
Accepted

Closing a channel in Lightning Network

The first three scenarios are indeed possible, the last one is identical to the second. This is called a collaborative close. It has the advantage of using a lower on-chain fee since the transactions ...
cdecker's user avatar
  • 9,563
9 votes
Accepted

Why doesn't c-lightning allow you to open multiple channels with the same peer?

This was answered by Christian Decker on Telegram. Just because the specification allows something doesn't mean every implementation has to implement it and support it. In c-lightning's case it is ...
Michael Folkson's user avatar
8 votes

How to convert channel id from c-lightning to lnd?

The specification of the short_channel_id describes the format as follows: The short_channel_id is the unique description of the funding transaction. It is constructed as follows: the most ...
cdecker's user avatar
  • 9,563
8 votes
Accepted

Why is my "spendable_msat" much lower than "msatoshi_to_us"?

You basically answered the question already yourself. Besides the 1% channel reserve you as the funder are responsible for paying onchain fees in case you need to force close the channel by spending ...
Rene Pickhardt's user avatar
7 votes

Running lightning in prune mode

Update(2021): Since version 0.13 pruned nodes are officially supported although they cause performance penalty and higher network usage. It is possible to run Lightning (both LND and c-lightning) with ...
Dmitry Laptev's user avatar
7 votes
Accepted

What are the 3 arguments called in function SHA256?

Let's disect this function call: void sha256(struct sha256 *sha, const void *p, size_t size) First we realize that the return value is void which means the function does not return the sha256 of the ...
Rene Pickhardt's user avatar
7 votes
Accepted

Can a channel be closed while the funding tx is still stuck in the mempool?

Technically you can double spend the output that was used for the funding TX with a higher fee. Then the channel will never be opened. Practically I don't think any of the lightning network ...
Rene Pickhardt's user avatar
7 votes

What are prerequisites and best online resources to learn everything about Lightning Network

When I started to learn about the Lightning Network I started pretty much from 0. In particular I had pretty much no idea how Bitcoin worked. So I will argue it is possible to learn about bitcoin on ...
Rene Pickhardt's user avatar
7 votes
Accepted

Should I keep my Lightning node data around after decomissioning?

My first thought was that from a protocol perspective I don't see why any other node would send coins to your addresses after your node has been decomissioned. However two edge cases come to my mind: ...
Rene Pickhardt's user avatar
7 votes
Accepted

What are 'accounts.sqlite3' and 'emergency.recover' and why might I want to back them up?

The accounts.sqlite3 file is managed by the built-in plugin bkpr (the bookkeeper plugin). It tracks each individual coin movement that was performed while the plugin was running, and will give ...
cdecker's user avatar
  • 9,563
6 votes

Lightning mainnet peer list?

Here's a site with all the nodes on mainnet https://1ml.com
Jared's user avatar
  • 61
6 votes
Accepted

Make payments Lightning without Invoice?

With the current specification it is not possible to make a spontaneous payment to somebody on the network. However, this will likely change very soon, as it is one of the features on the roadmap and ...
cdecker's user avatar
  • 9,563
6 votes
Accepted

What is the difference between listpeers vs listnodes commands?

listpeers listpeers returns data on nodes that you have connected with OR the nodes with which you have an open channel. If you have an open channel with a node, but the connection with that node has ...
Ugam Kamat's user avatar
  • 7,437
6 votes

Can a channel be closed while the funding tx is still stuck in the mempool?

I started out writing this answer while trying to do it myself, but then found out that we don't yet have tools to manually edit partially signed Bitcoin transactions (PSBTs) which is the very last ...
cdecker's user avatar
  • 9,563
5 votes

Why did my lightning node not route payments after I have funded 5 payment channels?

First of all welcome to the lightning network and keep asking excellent questions! the important information is within the result of the listfunds command. For example here: "channel_sat": 500000, "...
Rene Pickhardt's user avatar
5 votes
Accepted

How can I see how many Bitcoins my c-lightning network node has?

Use the RPC-Interface listfunds lightning-cli listfunds which lists all payment channels and UTXO. If you wish to have a more nicely display you can use this small tool: https://github.com/...
Rene Pickhardt's user avatar
5 votes
Accepted

What languages can I write plugins for c-lightning in?

Plugins can be written in any language as long as a client library for that language exists. The command line API and the Plugins communicate with lightningd over a unix domain socket using JSON RPC ...
Rene Pickhardt's user avatar
5 votes
Accepted

invoice amount is 1200000 but I paid 1201035. What is 1035?

As you mentioned your question is almost a duplicate of Why does my c-lightning node pay more than the invoice plus routing fees? But you asked if there is a way of knowing how much you will overpay ...
Rene Pickhardt's user avatar
5 votes
Accepted

How to securely update and verify C-Lightning release?

I have divided this post into three sections: Download, Verification and Installation to make it easier for people needing help with specific sections. The installation steps have been reproduced ...
Ugam Kamat's user avatar
  • 7,437
5 votes

c-lightning node backup-restore

The hsm_secret is used to derive keys for both onchain and offchain (channels commitments) transactions. On chain To retrieve on chain funds you can rescan the block chain for your utxos by using the -...
Antoine Poinsot's user avatar
5 votes

How can I access remote lightningd with pyln-client

c-lightning by itself does not expose it's RPC over the network. This is to avoid having to dictate what kind of authorization and authentication to use in order to provide access control. There are ...
cdecker's user avatar
  • 9,563
5 votes
Accepted

What does `-k` stand for in `lightning-cli`?

This is actually the first thing I got confused with after I installed my a lightning node for the very first time back in 2018. c-lightning ships with two (actually more) programs lightningd ...
Rene Pickhardt's user avatar
4 votes
Accepted

Lightning network: Open a channel with a peer that is not a full node?

Whether you run a full node or a lightweight node is a first layer question. It is a question about how you keep track about what happens on the blockchain. And even though this is important for you, ...
Dalit Sairio's user avatar
4 votes
Accepted

c-lightning & Lightweight nodes (no local bitcoind)

One lightweight alternative that I use quite often when setting up a Lightning node is spruned. The following will get you up and running: Install some dependencies: apt-get install -y git python3 \ ...
cdecker's user avatar
  • 9,563
4 votes

Lightning mainnet peer list?

I am developer of https://lightblock.me It's a tool which lets you search for nodes which you wish to connect to, take the URI of the node you want to connect and use it with "connect" command.
Lightblock's user avatar
4 votes

Is it possible to rebalance channels by sending to yourself (from a channel to an other) in c-lightning? How?

Natively c-lightning does not support paying invoices to yourself. But I have provided a trick described in this video: https://www.youtube.com/watch?v=Dwl-0cY6KkU&t=1s: The trick is to create an ...
Rene Pickhardt's user avatar
4 votes

Why does my c-lightning node pay more than the invoice plus routing fees?

In your c-lightning node you have configured your maximum fee rate which is used by the pay command to do the payment. The BOLT04 describes how overpaying up to twice the amount to obfuscate ...
Rene Pickhardt's user avatar
4 votes
Accepted

lightning-cli listnodes is empty. Am I missing something?

In order for list nodes to provide some output you need to first connect to at least one peer on the network. Because the peer is giving you all the information from the gossip protocol about ...
Rene Pickhardt's user avatar
4 votes
Accepted

Lightning Network : Pay a Bolt11 Invoice in multiple Payments

Currently, no. The receiver will reject an attempt for less than the requested amount and fail with incorrect_or_unknown_payment_details. Each invoice has a payment_hash which a payment corresponds ...
Mark H's user avatar
  • 3,334
4 votes
Accepted

How do I find the nodeid of the node issuing a lightning network invoice?

Lightning invoices are signed by the node issuing the invoice in order to verify the signature we need to know the node id. Thus it is included in the invoice. Lightning nodes provide an API to decode ...
Rene Pickhardt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible