From be175a6ff9686dd5f4e1fa536787911d3d0e47c9 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 31 Aug 2025 19:47:16 +0530 Subject: [PATCH 1/3] chore: remove __init__.py for package extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for python 3.3+ we don’t need an __init__.py at namespace package to allow extensions instead we can just get rid of them --- contrib/pyln-client/pyln/__init__.py | 2 -- contrib/pyln-grpc-proto/pyln/__init__.py | 2 -- contrib/pyln-proto/pyln/__init__.py | 2 -- contrib/pyln-spec/bolt1/pyln/__init__.py | 2 -- contrib/pyln-spec/bolt1/pyln/spec/__init__.py | 2 -- contrib/pyln-spec/bolt2/pyln/__init__.py | 2 -- contrib/pyln-spec/bolt2/pyln/spec/__init__.py | 2 -- contrib/pyln-spec/bolt4/pyln/__init__.py | 2 -- contrib/pyln-spec/bolt4/pyln/spec/__init__.py | 2 -- contrib/pyln-spec/bolt7/pyln/__init__.py | 2 -- contrib/pyln-spec/bolt7/pyln/spec/__init__.py | 2 -- contrib/pyln-testing/pyln/__init__.py | 2 -- 12 files changed, 24 deletions(-) delete mode 100644 contrib/pyln-client/pyln/__init__.py delete mode 100644 contrib/pyln-grpc-proto/pyln/__init__.py delete mode 100644 contrib/pyln-proto/pyln/__init__.py delete mode 100644 contrib/pyln-spec/bolt1/pyln/__init__.py delete mode 100644 contrib/pyln-spec/bolt1/pyln/spec/__init__.py delete mode 100644 contrib/pyln-spec/bolt2/pyln/__init__.py delete mode 100644 contrib/pyln-spec/bolt2/pyln/spec/__init__.py delete mode 100644 contrib/pyln-spec/bolt4/pyln/__init__.py delete mode 100644 contrib/pyln-spec/bolt4/pyln/spec/__init__.py delete mode 100644 contrib/pyln-spec/bolt7/pyln/__init__.py delete mode 100644 contrib/pyln-spec/bolt7/pyln/spec/__init__.py delete mode 100644 contrib/pyln-testing/pyln/__init__.py diff --git a/contrib/pyln-client/pyln/__init__.py b/contrib/pyln-client/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-client/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-grpc-proto/pyln/__init__.py b/contrib/pyln-grpc-proto/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-grpc-proto/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-proto/pyln/__init__.py b/contrib/pyln-proto/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-proto/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt1/pyln/__init__.py b/contrib/pyln-spec/bolt1/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-spec/bolt1/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt1/pyln/spec/__init__.py b/contrib/pyln-spec/bolt1/pyln/spec/__init__.py deleted file mode 100644 index 709a95e45275..000000000000 --- a/contrib/pyln-spec/bolt1/pyln/spec/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# spec is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt2/pyln/__init__.py b/contrib/pyln-spec/bolt2/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-spec/bolt2/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt2/pyln/spec/__init__.py b/contrib/pyln-spec/bolt2/pyln/spec/__init__.py deleted file mode 100644 index 709a95e45275..000000000000 --- a/contrib/pyln-spec/bolt2/pyln/spec/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# spec is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt4/pyln/__init__.py b/contrib/pyln-spec/bolt4/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-spec/bolt4/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt4/pyln/spec/__init__.py b/contrib/pyln-spec/bolt4/pyln/spec/__init__.py deleted file mode 100644 index 709a95e45275..000000000000 --- a/contrib/pyln-spec/bolt4/pyln/spec/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# spec is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt7/pyln/__init__.py b/contrib/pyln-spec/bolt7/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-spec/bolt7/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-spec/bolt7/pyln/spec/__init__.py b/contrib/pyln-spec/bolt7/pyln/spec/__init__.py deleted file mode 100644 index 709a95e45275..000000000000 --- a/contrib/pyln-spec/bolt7/pyln/spec/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# spec is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/contrib/pyln-testing/pyln/__init__.py b/contrib/pyln-testing/pyln/__init__.py deleted file mode 100644 index 3c2b6535d778..000000000000 --- a/contrib/pyln-testing/pyln/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# pyln is a namespace package -__path__ = __import__('pkgutil').extend_path(__path__, __name__) From fd6f92460ad66ecfbadb194d9faa643c3c970aa0 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Sun, 31 Aug 2025 19:49:20 +0530 Subject: [PATCH 2/3] chore: remove uv sources defined at workspace level MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit duplicate definition isn’t required as we already defined them at workspace level sources --- contrib/pyln-client/pyproject.toml | 4 ---- contrib/pyln-spec/bolt1/pyproject.toml | 3 --- contrib/pyln-spec/bolt2/pyproject.toml | 3 --- contrib/pyln-spec/bolt4/pyproject.toml | 3 --- contrib/pyln-spec/bolt7/pyproject.toml | 3 --- contrib/pyln-testing/pyproject.toml | 4 ---- 6 files changed, 20 deletions(-) diff --git a/contrib/pyln-client/pyproject.toml b/contrib/pyln-client/pyproject.toml index 79eccd66ccc3..7d999485c4c8 100644 --- a/contrib/pyln-client/pyproject.toml +++ b/contrib/pyln-client/pyproject.toml @@ -17,7 +17,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-proto = { workspace = true } -pyln-bolt7 = { workspace = true } diff --git a/contrib/pyln-spec/bolt1/pyproject.toml b/contrib/pyln-spec/bolt1/pyproject.toml index a969eeaf24b0..1c4294729b2e 100644 --- a/contrib/pyln-spec/bolt1/pyproject.toml +++ b/contrib/pyln-spec/bolt1/pyproject.toml @@ -20,6 +20,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-proto = { workspace = true } diff --git a/contrib/pyln-spec/bolt2/pyproject.toml b/contrib/pyln-spec/bolt2/pyproject.toml index 7104f985495f..6d25ccbbbd76 100644 --- a/contrib/pyln-spec/bolt2/pyproject.toml +++ b/contrib/pyln-spec/bolt2/pyproject.toml @@ -20,6 +20,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-proto = { workspace = true } diff --git a/contrib/pyln-spec/bolt4/pyproject.toml b/contrib/pyln-spec/bolt4/pyproject.toml index d853a2174942..e6166e433960 100644 --- a/contrib/pyln-spec/bolt4/pyproject.toml +++ b/contrib/pyln-spec/bolt4/pyproject.toml @@ -20,6 +20,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-proto = { workspace = true } diff --git a/contrib/pyln-spec/bolt7/pyproject.toml b/contrib/pyln-spec/bolt7/pyproject.toml index 668d95fc6853..f2137c2d6e18 100644 --- a/contrib/pyln-spec/bolt7/pyproject.toml +++ b/contrib/pyln-spec/bolt7/pyproject.toml @@ -16,6 +16,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-proto = { workspace = true } diff --git a/contrib/pyln-testing/pyproject.toml b/contrib/pyln-testing/pyproject.toml index 506fb7820b2e..6eb80f90a3ef 100644 --- a/contrib/pyln-testing/pyproject.toml +++ b/contrib/pyln-testing/pyproject.toml @@ -31,7 +31,3 @@ packages = ["pyln"] [build-system] requires = ["hatchling>=1.0.0"] build-backend = "hatchling.build" - -[tool.uv.sources] -pyln-client = { workspace = true } -pyln-grpc-proto = { workspace = true } From cf087aa20fa3c287f5f161a7539094d8fe8d9ec7 Mon Sep 17 00:00:00 2001 From: Lakshya Singh Date: Mon, 8 Sep 2025 08:32:03 +0530 Subject: [PATCH 3/3] docs: add frozen for uv sync prevent updates to lock file which might leave working directory dirty resulting in a modded cln version build --- .../getting-started/installation.md | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/doc/getting-started/getting-started/installation.md b/doc/getting-started/getting-started/installation.md index c7199120350e..af842d1bf8ca 100644 --- a/doc/getting-started/getting-started/installation.md +++ b/doc/getting-started/getting-started/installation.md @@ -29,7 +29,7 @@ If you're on a different distribution or OS, you can compile the source by follo # Docker -To install the Docker image for the latest stable release: +To install the Docker image for the latest stable release: ```shell docker pull elementsproject/lightningd:latest @@ -123,8 +123,8 @@ If you want to build the Rust plugins (cln-grpc, clnrest, cln-bip353 and wss-pro sudo apt-get install -y cargo rustfmt protobuf-compiler ``` -> πŸ“˜ -> +> πŸ“˜ +> > If your build fails because of your Rust version, you might want to check out [rustup](https://rustup.rs/) to install a newer version @@ -133,20 +133,20 @@ There are two ways to build core lightning, and this depends on how you want use To build CLN for production: ```shell -uv sync --all-extras --all-groups +uv sync --all-extras --all-groups --frozen ./configure RUST_PROFILE=release uv run make sudo RUST_PROFILE=release make install ``` -> πŸ“˜ -> +> πŸ“˜ +> > If you want to disable Rust because you don’t need it or its plugins (cln-grpc, clnrest, cln-bip353 or wss-proxy), you can use `./configure --disable-rust`. To build CLN for development: ```shell -uv sync --all-extras --all-groups +uv sync --all-extras --all-groups --frozen ./configure uv run make uv run make check VALGRIND=0 @@ -256,15 +256,15 @@ If you want to compile locally and fiddle with compile time options: See `/usr/ports/net-p2p/c-lightning/Makefile` for instructions on how to build from an arbitrary git commit, instead of the latest release tag. -> πŸ“˜ -> +> πŸ“˜ +> > Make sure you've set an utf-8 locale, e.g. `export LC_CTYPE=en_US.UTF-8`, otherwise manpage installation may fail. Running lightning: Configure bitcoind, if not already: add `rpcuser=` and `rpcpassword=` to `/usr/local/etc/bitcoin.conf`, maybe also `testnet=1`. -Configure lightningd: copy `/usr/local/etc/lightningd-bitcoin.conf.sample` to +Configure lightningd: copy `/usr/local/etc/lightningd-bitcoin.conf.sample` to `/usr/local/etc/lightningd-bitcoin.conf` and edit according to your needs. ```shell @@ -379,15 +379,15 @@ git checkout v24.05 Build lightning: ```shell -uv sync --all-extras --all-groups +uv sync --all-extras --all-groups --frozen ./configure uv run make ``` Running lightning: -> πŸ“˜ -> +> πŸ“˜ +> > Edit your `~/Library/Application\ Support/Bitcoin/bitcoin.conf`to include `rpcuser=` and `rpcpassword=` first, you may also need to include `testnet=1`. ```shell @@ -440,7 +440,7 @@ Launch Core Lightning: ## To cross-compile for Android -Make a standalone toolchain as per . +Make a standalone toolchain as per . For Core Lightning you must target an API level of 24 or higher. Depending on your toolchain location and target arch, source env variables such as: @@ -465,8 +465,8 @@ make clean -C ccan/ccan/cdump/tools \ && make CC=clang -C ccan/ccan/cdump/tools ``` -Install the `qemu-user` package. -This will allow you to properly configure the build for the target device environment. +Install the `qemu-user` package. +This will allow you to properly configure the build for the target device environment. Build with: ```shell @@ -493,8 +493,8 @@ export LD=$target_host-ld export STRIP=$target_host-strip ``` -Install the `qemu-user` package. This will allow you to properly configure the -build for the target device environment. +Install the `qemu-user` package. This will allow you to properly configure the +build for the target device environment. Config the arm elf interpreter prefix: ```shell @@ -538,7 +538,7 @@ For all the other Pi devices out there, consider using [Armbian](https://www.arm You can compile in `customize-image.sh` using the instructions for Ubuntu. -A working example that compiles both bitcoind and Core Lightning for Armbian can +A working example that compiles both bitcoind and Core Lightning for Armbian can be found [here](https://github.com/Sjors/armbian-bitcoin-core). ## To compile for Alpine @@ -582,6 +582,6 @@ apk add libgcc libsodium sqlite-libs zlib ## Python plugins -Python plugins will be installed with the `poetry install` step mentioned above fron development setup. +Python plugins will be installed with the `poetry install` step mentioned above fron development setup. Other users will need some Python packages if python plugins are used. Unfortunately there are some Python packages which are not packaged in Ubuntu, and so force installation will be needed (Flag `--user` is recommended which will install them in user's own .local directory, so at least the risk of breaking Python globally can be avoided!).