{ "info": { "author": "bitromortac", "author_email": "bitromortac@protonmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "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 -> B, A -> C, A -> D, A -> E, A -> F, A -> G,\nRing-like component with channels (which surrounds the master node):\nB -> C, C -> D, D -> E, E -> F, F -> G, G -> 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* 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\nPlanned features\n----------------\n* Arbitrary lightning daemon binary detection (lnd, clightning, ...)\n* Time-dependent transaction series\n* Automatic sanity check of user defined networks\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-----\n**In order to have a complete immediate graph view, we need to compile LND\nin a special way by setting `defaultTrickleDelay = 1` in `config.go`.**\n\nThe binaries bitcoind, bitcoin-cli, lnd, and lncli are expected to be found in \n`$PATH`.\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\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 If you experience startup problems, increase `LOAD_BALANCING_LND_STARTUP_TIME_SEC` \n in `lib.common`. 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\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bitromortac/lnregtest", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lnregtest", "package_url": "https://pypi.org/project/lnregtest/", "platform": "", "project_url": "https://pypi.org/project/lnregtest/", "project_urls": { "Homepage": "https://github.com/bitromortac/lnregtest" }, "release_url": "https://pypi.org/project/lnregtest/0.1.2/", "requires_dist": [ "wheel" ], "requires_python": "", "summary": "Bitcoin regtest Lightning Network for integration testing.", "version": "0.1.2" }, "last_serial": 5904868, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ee7128d288467f76fe75ed2171269dda", "sha256": "4b8a6932343ae9e2131df717bb95f38c02bde105ba2988bde74e0fd16c491ca1" }, "downloads": -1, "filename": "lnregtest-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ee7128d288467f76fe75ed2171269dda", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16840, "upload_time": "2019-08-28T05:48:14", "url": "https://files.pythonhosted.org/packages/f4/42/c32553509e4e85ef910037eb2048ebea00973b347328cb884adcc64ede7b/lnregtest-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d7f4c089008f343295fba2bd6fd053e", "sha256": "c01275db3a923ac530d75b13e6be21a19f386aef101b2d1b59e3237083545684" }, "downloads": -1, "filename": "lnregtest-0.1.tar.gz", "has_sig": false, "md5_digest": "3d7f4c089008f343295fba2bd6fd053e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15032, "upload_time": "2019-08-28T05:48:17", "url": "https://files.pythonhosted.org/packages/26/59/dfb543b30230614c0142e7dcd847bafd53d831fe00a0565295ec60c4de94/lnregtest-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c28520034e989b72686af79d9b28ca5a", "sha256": "bd77278b14fb218c36268e6c1796847df2bcd525e8ef98b28d097f3a10eb44bb" }, "downloads": -1, "filename": "lnregtest-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c28520034e989b72686af79d9b28ca5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17193, "upload_time": "2019-09-07T06:56:52", "url": "https://files.pythonhosted.org/packages/89/cd/7cd0c9375b9c34f6c8a3f7b1591aca1ce1b695ee8cc8cd5cab29ee1e7f9c/lnregtest-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bad4be1985d023a72abfaafad7cc6f19", "sha256": "b8951da6c7360895f8f95bc3ff9d65cd98427ae1ee54433720d8e623e7b8b33a" }, "downloads": -1, "filename": "lnregtest-0.1.1.tar.gz", "has_sig": false, "md5_digest": "bad4be1985d023a72abfaafad7cc6f19", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15459, "upload_time": "2019-09-07T06:56:55", "url": "https://files.pythonhosted.org/packages/02/14/efd7da447900671eadf39ee2fe7d30072b91e2dbf9ebc689f54cfd8c0308/lnregtest-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "00f3daf677f7497c241cd3170ce70228", "sha256": "e5277b027accde28066d2636e8e7b9cd61d084bef8de7f0d1fd795bda79a20af" }, "downloads": -1, "filename": "lnregtest-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "00f3daf677f7497c241cd3170ce70228", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18195, "upload_time": "2019-09-30T05:08:24", "url": "https://files.pythonhosted.org/packages/33/3f/4844ca8db9d0eebe01529c83c659699817e521c1259ae7479e9f158144b3/lnregtest-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4eabb5e780ddb2bab724ae8bd04a70d8", "sha256": "6085a9892e08ee3018a08e495d7c2b7f65c5852e5d09d52b1827aefc990988a9" }, "downloads": -1, "filename": "lnregtest-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4eabb5e780ddb2bab724ae8bd04a70d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16375, "upload_time": "2019-09-30T05:08:29", "url": "https://files.pythonhosted.org/packages/c0/e6/107f2cfd6d3b6a3f829b211fc4b8ead1ce9cf6505042d318d3924bfefb8d/lnregtest-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "00f3daf677f7497c241cd3170ce70228", "sha256": "e5277b027accde28066d2636e8e7b9cd61d084bef8de7f0d1fd795bda79a20af" }, "downloads": -1, "filename": "lnregtest-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "00f3daf677f7497c241cd3170ce70228", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18195, "upload_time": "2019-09-30T05:08:24", "url": "https://files.pythonhosted.org/packages/33/3f/4844ca8db9d0eebe01529c83c659699817e521c1259ae7479e9f158144b3/lnregtest-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4eabb5e780ddb2bab724ae8bd04a70d8", "sha256": "6085a9892e08ee3018a08e495d7c2b7f65c5852e5d09d52b1827aefc990988a9" }, "downloads": -1, "filename": "lnregtest-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4eabb5e780ddb2bab724ae8bd04a70d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16375, "upload_time": "2019-09-30T05:08:29", "url": "https://files.pythonhosted.org/packages/c0/e6/107f2cfd6d3b6a3f829b211fc4b8ead1ce9cf6505042d318d3924bfefb8d/lnregtest-0.1.2.tar.gz" } ] }