{"id":48040819,"url":"https://github.com/bitromortac/lnregtest","last_synced_at":"2026-04-04T14:07:38.849Z","repository":{"id":35086155,"uuid":"204854192","full_name":"bitromortac/lnregtest","owner":"bitromortac","description":"Regtest Lightning Networks for (python) integration testing","archived":false,"fork":false,"pushed_at":"2023-03-03T07:32:40.000Z","size":191,"stargazers_count":17,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-28T11:35:57.120Z","etag":null,"topics":["bitcoind","lightning","lightning-network","lnd","python","simulation"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitromortac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-28T05:22:01.000Z","updated_at":"2025-09-01T06:45:27.000Z","dependencies_parsed_at":"2023-01-15T13:32:41.208Z","dependency_job_id":null,"html_url":"https://github.com/bitromortac/lnregtest","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bitromortac/lnregtest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitromortac%2Flnregtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitromortac%2Flnregtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitromortac%2Flnregtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitromortac%2Flnregtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitromortac","download_url":"https://codeload.github.com/bitromortac/lnregtest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitromortac%2Flnregtest/sbom","scorecard":{"id":240828,"data":{"date":"2025-08-11","repo":{"name":"github.com/bitromortac/lnregtest","commit":"fad3eb07712b6c181d982b0caa14e167f2e83ddf"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":1,"reason":"Found 2/16 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:88: pin your Docker image by updating python:3.10-slim to python:3.10-slim@sha256:5ddcfa793e90bf5a43624c67bbdbe51e94d08c9e662bde61fab18f6eef1f34ca","Warn: pipCommand not pinned by hash: Dockerfile:82","Warn: pipCommand not pinned by hash: contrib/install_electrum.sh:2","Warn: pipCommand not pinned by hash: contrib/install_electrum.sh:9","Warn: pipCommand not pinned by hash: contrib/install_electrum.sh:11","Warn: pipCommand not pinned by hash: contrib/install_electrum.sh:12","Warn: pipCommand not pinned by hash: contrib/install_electrum.sh:24","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T06:39:17.598Z","repository_id":35086155,"created_at":"2025-08-17T06:39:17.599Z","updated_at":"2025-08-17T06:39:17.599Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoind","lightning","lightning-network","lnd","python","simulation"],"created_at":"2026-04-04T14:07:38.241Z","updated_at":"2026-04-04T14:07:38.831Z","avatar_url":"https://github.com/bitromortac.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"lnregtest - Lightning Networks on Bitcoin regtest\n=================================================\n\nImplements functioning lightning networks for (Python) integration testing \noperating on a Bitcoin regtest network by running several lightning node \ninstances.\n\nThe simulated lightning networks can have different shapes as defined\n in the `network_definitions` folder.\n\nAn example of a graph (`star_ring`) with 7 nodes and 12 channels is shown \nhere (for initial channel balance details, have a look at \n`network_definitions/star_ring.py`):\n\n```\nStar-like component with channels (where A is the master node):\nA -\u003e B, A -\u003e C, A -\u003e D, A -\u003e E, A -\u003e F, A -\u003e G,\nRing-like component with channels (which surrounds the master node):\nB -\u003e C, C -\u003e D, D -\u003e E, E -\u003e F, F -\u003e G, G -\u003e B\n```\nThis star and ring-like lightning network can then be used to test interactions\nwith the network from the master node's perspective, like rebalancing channels,\nrouting payments, sending payments and so on.\n\nFeatures\n--------\n* No external python dependencies\n* Arbitrary lightning network graphs with up to number of nodes on the order of\n10 (depends on your resources)\n* LND support\n* Electrum support\n* Lightning graph state comparison\n* Restarting from already created networks\n* Abstraction of random identifiers (public keys, channel ids) to human readable\n  identifiers\n* Library and command-line execution\n* Automatic sanity check of user defined networks\n  \nPlanned features\n----------------\n* Arbitrary lightning daemon binary detection (lnd, clightning, ...)\n* Time-dependent transaction series\n\nCreating your own network topology\n----------------------------------\nNetworks of arbitrary shape can be defined as a python dictionary in the\n`network_definitions` folder. See the examples for a general structure.\n\nThe requirements are:\n* Node A is the master node\n* Nodes are uniquely named by subsequent characters A, B, C, ...\n* Channels are uniquely numbered by integers 1, 2, 3, ...\n* Ports must be set uniquely\n\nTesting other (python) projects\n-----------------------------\nTest examples can be found in the `test` folder and more information on how\nlnregtest is used for lightning network integration testing can be found in \n[TEST](./test/TEST.md).\n\nThis package is also used in production in \n[lndmanage](https://github.com/bitromortac/lndmanage).\n\nSetup\n-----\nThe binaries bitcoind (v22.0), bitcoin-cli, lnd (v0.14), and lncli are expected to be \nfound in `$PATH`, e.g., put these binaries into your ~/bin folder.\n\nYou can use the tool in two different standalone modes:\n\n**Git repository mode**:\n```\n$ git clone https://github.com/bitromortac/lnregtest\n$ cd lnregtest\n```\nRun network:\n```\n$ python3 lnregtest.py -h\n```\n\n**Package mode**:\n```\n$ python3 -m venv venv\n$ source venv/bin/activate\n$ python3 -m pip install lnregtest\n```\nRun network:\n```\n$ lnregtest -h\n```\n\nTest if lnregest works\n-------------------------\nTo run all tests, run `python3 -m unittest discover test` from the root folder.\n\nRunning under Docker\n--------------------\n```\n$ docker build -t lnregtest:local .\n$ docker run --rm -it lnregtest:local python3 -m unittest discover test\n```\n\nTroubleshooting\n---------------\n* `all SubConns are in TransientFailure`:\n  Typically, here it happens that lnd is not given enough time to start. **The \n  simulation of a lightning network is memory and CPU intensive.** Each LN\n  node needs some time to get up and running and consumes resources.\n  Currently, the startup of each lnd node is delayed to distribute CPU load.\n  The settings were tested on a quadcore processor and 8 GB of RAM.\n* bitcoind and lnd processes are not terminated:\n  Sometimes it happens that the processes are not terminated correctly, so\n  before you start new tests, make sure to do so manually.\n\nRelated Projects\n----------------\n* Medium article on how regtest lightning networks can be set up: [bitstein-medium](https://medium.com/@bitstein/setting-up-a-bitcoin-lightning-network-test-environment-ab967167594a)\n* Dockerized lightning networks: [simverse](https://github.com/darwin/simverse)\n* Dockerized version for the medium article: [bitstein-test-env](https://github.com/JeffVandrewJr/bitstein-test-env)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitromortac%2Flnregtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitromortac%2Flnregtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitromortac%2Flnregtest/lists"}