OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Lnprototest

Lnprototest is a Python 3 test suite and helper set for creating tests of proposed Lightning Network protocol changes and testing existing implementations. It uses pytest and documents a dummy runner and a Core Lightning runner.

Independent OpenViST project profile, based on linked sources.

Lnprototest — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Lnprototest when developing or running Lightning protocol tests, choosing the dummy runner for the simplest test run or Core Lightning when a developer-enabled node environment is available.

Who it is for

  • Developers writing tests for proposed Lightning protocol changes.
  • Teams testing Lightning implementations with the documented runners.
  • Developers exploring test backends for other implementations.

Documented uses

  • Create regression tests for proposed Lightning protocol changes.
  • Run the project’s tests with a dummy runner.
  • Test against Core Lightning using its documented runner.
  • Select and debug tests with pytest options.
Before you choose

Requirements & limits

  • The project is written in Python 3 and uses pytest.
  • The dummy runner is the simplest documented way to run tests.
  • The Core Lightning runner requires bitcoind, a developer-enabled lightningd build, and additional Python requirements.
  • The repository points to its hacking guide for developing tests or new backends.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install dependencies and run the dummy test suite

Set up Lnprototest’s Python dependencies and run its tests with the simplest documented runner.

Before you start

  • Python 3 and pip3
  • The Lnprototest repository

Steps

  1. Install Poetry with the command below.

    Documented command
    pip3 install poetry
  2. Enter the Poetry shell with poetry shell.

  3. Install project dependencies with poetry install.

  4. Run the dummy runner with the command below.

    Documented command
    make check

Expected outcome

The project’s tests run using the dummy runner.

Guide limitations

  • This procedure uses the dummy runner, not a live Lightning implementation.
Source-based practical guide

Run tests against Core Lightning

Configure the documented Core Lightning runner and invoke the test suite.

Before you start

  • bitcoind installed and available on the path
  • lightningd compiled with --enable-developer
  • The Core Lightning Python requirements installed from lnprototest/clightning/requirements.txt
  • The Lightning source directory at ../lightning, or a LIGHTNING_SRC value pointing to its location

Steps

  1. Install the Core Lightning Python requirements with the command below.

    Documented command
    pip3 install -r lnprototest/clightning/requirements.txt
  2. Run the command below, or invoke pytest --runner=lnprototest.clightning.Runner directly.

    Documented command
    make check PYTEST_ARGS='--runner=lnprototest.clightning.Runner'

Expected outcome

The test suite is invoked with the Core Lightning runner.

Guide limitations

  • The documented real-node runner is for Core Lightning.
  • bitcoind and a developer-enabled lightningd build are required.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
rustyrussell/lnprototest · Official homepage title · retained in its source language