11 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 ...
user avatar
  • 8,814
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 ...
user avatar
8 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 ...
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 ...
user avatar
6 votes

Lightning mainnet peer list?

Here's a site with all the nodes on mainnet https://1ml.com
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 ...
user avatar
  • 8,814
6 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 ...
user avatar
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 ...
user avatar
  • 8,814
6 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 ...
user avatar
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, "...
user avatar
5 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 ...
user avatar
  • 8,814
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 ...
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 ...
user avatar
5 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 ...
user avatar
  • 6,978
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 -...
user avatar
5 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 ...
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 ...
user avatar
  • 8,814
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 ...
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 \ ...
user avatar
  • 8,814
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.
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 ...
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 ...
user avatar
  • 3,239
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 ...
user avatar
4 votes
Accepted

Can I send/receive payments but prevent forwarding payments in Lightning Network?

Yes, there are basically two ways to avoid becoming a forwarding node: Do not announce your channels, and keep them private Reject any incoming HTLC that is not destined for you The first is ...
user avatar
  • 8,814
4 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 ...
user avatar
  • 6,978
4 votes
Accepted

Is there a lightningd equivalent to bitcoind's -walletnotify or -blocknotify?

You can trigger a shell script with them, and more. This is related to the plugin functionalities provided by lightningd and not bitcoind. lightningd allows you to run plugins to deeply modify its ...
user avatar
4 votes
Accepted

Different fee rate units - sat/vB, sat perkw, sat perkb

No, one vbyte [vB] is equal to four weightunits [wu]. The people working on C-Lightning use "sipa" interchangeably for a weightunit. 1,000 sat/kvB = 1 sat/vB 1 sat/vB = 0.25 sat/wu 0.25 sat/...
user avatar
  • 64.5k
4 votes
Accepted

What is special about blocks 540574 and 564180?

There is nothing special about those two blocks, aside from containing a funding transaction that c-lightning would like to verify (causing it to look the block up) and it being pruned in your ...
user avatar
  • 8,814
4 votes

Should you be able to run a mainnet c-lightning node in parallel with a signet c-lightning node? What about an alternative Lightning implementation?

This was answered by individuals on IRC. It is perfectly fine to run any number of c-lightning nodes for any combination of networks as long as you keep home directories (--lightning-dir) and (--bind-...
user avatar
4 votes

How do I move my c-lightning node to a different machine without closing my channels?

This question was answered by Christian Decker on IRC. Yes, it's a bit tricky, because you never want to start the old copy once you started the new one, but absolutely doable. 1) stop the old node, ...
user avatar

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