Ethereum: Lightning Launch in Plum Mode

Running Lightning in Pruning Mode with LND: A Guide

As a Lightning Network (LN) user running on a full node, you are probably aware of the limitations that traditional Bitcoin-based nodes bring. One of these limitations is pruning, which significantly reduces the complexity and cost associated with transaction validation. In this article, you will learn how to run Lightning in pruning mode using the LND implementation.

What is pruning mode?

Pruning mode, also called “pruning,” is a technique used to reduce the amount of data that needs to be stored on a node to make it more efficient and cost-effective. Pruning transactions allows nodes to omit redundant or unnecessary data such as transaction identifiers, block hashes, and fees. This approach allows for faster validation times, lower maintenance costs, and improved security.

LND Pruning Mode

LND is a popular Lightning Network implementation that supports pruning mode out of the box. In fact, LND was designed with pruning in mind from the start. To run LND in pruning mode, follow these steps:

  • Update your node – Make sure you are running the latest version of LND. You can check for updates by visiting the [LND GitHub page]( and following the instructions to update the node software.
  • Create a new wallet: When installing LND, create a new wallet with the “–prune” flag. This will allow you to specify pruning mode when creating your wallet.

Usage example

Below is an example of creating a new wallet with LND in pruning mode:

“Bash

lnd –wallet-dir ./lightning-wallet-prune –prune 1000000 –prune-type=block –prune-fee 2.5

In this command:

  • “–wallet-dir” specifies the directory where you want to create your wallet.
  • “–prune” enables pruning mode and sets a maximum number of transactions to store (in this case 1 million).
  • “–prune-type=block” specifies that only block-level data should be pruned.
  • “–prune-fee” is the fee in satoshis per transaction that LND charges when validating transactions.

Pruning with a Full Node

To prune all Lightning channels on your full node, you can use the following command:

“Bash

lnd –wallet-dir ./lightning-wallet-prune –prune 1000000 –prune-type=channel

This command will remove all channel-level data from your entire node.

Conclusion

Running Lightning in pruning mode with LND is a powerful way to optimize your network’s performance and reduce costs. By following these steps, you can easily enable pruning mode when creating new wallets or modifying existing ones. Remember to read the [LND documentation]( for more information on LND-specific commands and options.

Tips and Variations

  • To prune data from a specific wallet directory, use the “–wallet-dir” option with the prune flag.
  • You can also set a custom prune threshold using the “–prune-threshold” option. For example: “lnd –wallet-dir ./lightning-wallet-prune –prune 50000 –prune-type=channel”.
  • To disable prune for specific transactions, use the “–tx-included” flag with the prune type. For example: “lnd –wallet-dir ./lightning-wallet-prune –prune 1000000 –tx-included block”.

By following these guidelines and experimenting with different options, you can efficiently run Lightning in your LND deployment and benefit from improved network performance.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart