I am running lightning with the LND implementation and a full node. Nevertheless, I heard that it is possible to use Lighting in pruned mode.

How is this possible?

  1. I read in the LND install documentation that you need the -txindex flag:

In order to run lnd with a bitcoind back-end, the bitcoind instance must be configured with --txindex just like btcd above.

  1. In the Wikipage of Bitcoin it says for pruned mode:

This mode is incompatible with -txindex

I also read here and here the same arguments.

Is this outdated or is it not possible to use prune mode in lightning?


You are correct in that you cannot run a LND node with a pruned bitcoind server.

Pruning isn't compatible with transaction indexing because the index would point to transactions which have been pruned (no longer in store).

Each lightning node requires transaction indexing, because it will be looking for specific txid's on-chain throughout the lifetime of the payment channel.

Broadcast and confirmation of:

  • Funding transaction
  • Commitment transactions in a unilateral close
  • Closing transaction

The only way to determine whether any of the transactions above have been confirmed, is to query an up-to-date transaction index of the strong chain, which is not possible with a pruned node.

Lightning nodes also subscribe to the ZeroMQ subscription service of the bitcoind node, but this only tells the node about newly broadcast transactions accepted by in the mempool, not whether they have been confirmed yet.

  • I've not tried it, but what happens when I start a lightning node in pruned mode in practice? – dvg Jan 13 at 18:36
  • The lightning node will not be able to query bitcoind for transactions (by txid). – James C. Jan 13 at 19:38
  • When would I get aware of this? – dvg Jan 13 at 19:54
  • I dont know, the lnd node will through an error, I dont know exactly how the error msg will look like. – James C. Jan 13 at 20:13
  • Ok, thx for response! – dvg Jan 13 at 20:41

It is possible to run Lightning (both LND and c-lightning) with bitcoind pruned mode.

There is a lot of conflicting information online, because it became possible only recently in Bitcoin Core 0.16.0. The change that enabled txid lookups in pruned mode is BIP159.

There are already packages turning the pruned mode on when disk space is limited: Lightning Power Node Launcher (works with LND) and BTCPayServer docker (works with c-lightnig).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.