Commit Graph

324 Commits

Author SHA1 Message Date
Rusty Russell
e8fd235d4e common: move gossip_store_wire.csv into common/ from gossipd/
It's used by common/gossip_store.c, which is used by many things other than
gossipd.  This file belongs in common.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-02-16 17:23:33 +10:30
Rusty Russell
592f8586f4 lightningd: remove decodepay.
Changelog-Removed: JSON-RPC: `decodepay` (use `decode`), deprecated v24.11.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-01-20 19:32:42 +10:30
Christian Decker
5c9d3884bb Add Python API documentation generation with pdoc3
This commit adds automated Python API documentation generation for all
workspace packages using pdoc3:

- Add contrib/api/generate-python-docs.py script to generate docs
- Add Makefile targets: python-docs and python-docs-clean
- Add GitHub Actions workflow for nightly documentation generation
- Documents 5 packages: pyln.client, pyln.proto, pyln.grpc, pyln.testing, pyln.spec.bolt7
- Creates beautiful index page with cards linking to each package
- Stores generated docs as artifacts with 90-day retention
- Add pdoc3 and markdown to dev dependencies

Bug fix:
- Fix pyln-client version.py: __all__ must contain strings, not class objects
  This was causing "TypeError: attribute name must be string, not 'type'" in pdoc3

Documentation is generated to docs/python/ which is excluded from version control.
Run 'make python-docs' to generate locally, or download from nightly workflow artifacts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 16:37:02 +01:00
Madeline Paech
ed439772a8 release branch for 25.12 release 2025-12-04 10:44:56 +10:30
Rusty Russell
e02f76bdd8 CHANGELOG: update for 25.12rc3
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-29 10:32:47 +10:30
Madeline Paech
c59d9beab3 second release candidate for 25.12 2025-11-28 10:48:43 +10:30
Madeline Paech
5166fd55bb release candidate PR for 25.12 with Shahana's Makefile update
Changelog-None
2025-11-24 02:50:41 +00:00
Madeline Paech
f16b198cdc change log for 25.12rc1 2025-11-21 14:32:47 +10:30
Rusty Russell
81f0d0540b pyln-client: support hook filters.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: pyln-client: optional filters can be given when hooks are registered (for supported hooks)
2025-11-20 16:30:50 +10:30
Rusty Russell
2520bd5b90 pytest: test withhold parameter to fundchannel_complete.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-11-19 07:23:39 +10:30
ShahanaFarooqui
d723337af3 meta: Update version 25.09.3 and CHANGELOG
Changelog-None.
2025-11-10 15:08:08 +10:30
Madeline Vibes
766db61370 Meta: Adding changelog and version update for 25.09.1 2025-10-21 08:17:35 +05:30
Lakshya Singh
2879ef121e chore: remove uv sources defined at workspace level
duplicate definition isn’t required as we already defined them at 
workspace level sources
2025-10-10 15:47:39 +10:30
Lakshya Singh
d05a8ee70b chore: remove __init__.py for package extension
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
2025-10-10 15:47:39 +10:30
Rusty Russell
e7ea57e130 BOLT12: Remove start_any_period from recurrence_base.
Offer_absolute_expiry should be used if you want to require starting at the start.

Changelog-EXPERIMENTAL: Protocol: BOLT 12 recurrence `start_any_period` removed, use expiry if you need to restrict when they can start using the offer.
2025-10-01 15:31:30 +09:30
Rusty Russell
0e4b6ca109 gossip_store: wait for completed bit on reading.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 13:29:33 +09:30
Rusty Russell
74090b0a47 pyln-client: update the gossmaps in test data to have the GOSSIP_STORE_COMPLETED_BIT set.
Simply ran them through devtools/convert-gossmap, thought for gossip_store-part2 it
had to be appended to gossip_store-part1, converted, then cut off again.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 13:29:33 +09:30
Rusty Russell
f1a8cfcfe8 pyln-client: update ancient gossmap in test_gossmap tests.
It was still using private channel announcements, which were removed
in v13.
2025-10-01 13:29:33 +09:30
Rusty Russell
9fb8870f92 gossip: add COMPLETED bit to mark records which are complete.
This should detect partial writes more robustly, since we make a
separate pwrite() call to update this flag after the record is written.

Previously we were playing a bit loose with synchronization assumptions,
which seemed to work on Linux ext4, but not so well elsewhere.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-10-01 13:29:33 +09:30
Christian Decker
7a7a48c34d chore: Update python dependencies
I got a bit annoyed by all the "your protobuf gencode is too old"
warnings in downstream packages, so I spent a bit of time updating any
stale dependency and now we're back allowing packages up to the latest
release. That should maximize the compatibility, and allow downstream
packages to chose their own versions, as long as they are
compatible (semantic versioning).
2025-10-01 11:41:06 +09:30
Matt Whitlock
7e9729b264 pyln-client: don't leak dirfd after connecting Unix socket
This file descriptor leak was causing test failures due to exceeding the
limit on open file descriptors. Note that the leak only occurred if the
RPC socket path was longer than can fit in a struct sockaddr_un.

Changelog-Fixed: pyln-client no longer leaks a file descriptor when connecting to an RPC socket with a long path name.
2025-09-15 11:19:17 +09:30
Madeline Paech
d7d0e3222b update the versions for 25.09 2025-09-01 13:13:38 +09:30
madelinevibes
81838fabf9 updates for rc4: name changes and uv 2025-08-28 15:59:52 +09:30
madelinevibes
c25f0fafff small changes of any reference to rc2 to rc3 2025-08-27 15:29:16 +09:30
madelinevibes
fcd92febad change version 25.09rc2 for release
replace rc1
2025-08-21 16:12:27 +09:30
Sangbida Chaudhuri
da7d3057ed Run version script for rc1.
Run version script
2025-08-19 16:46:29 +09:30
Rusty Russell
69a8ccc31c pyln-client: create modern-style notifications if caller doesn't.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-08-18 10:01:07 +09:30
Rusty Russell
fc5edea999 pyln-client: adapt for modern plugin notifications.
For older lightningd, we copy field into the raw dict, for newer we recreate the old
"payload" member.

We do fix up the custom_notification test which set params to a string instead of a dict:
that's just weird!

We also change the hacky parsing to proper dict extraction.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: pyln-client: plugin notifications parameters now exposed directly, not wrapped in `params` object.
2025-08-18 10:01:07 +09:30
Lakshya Singh
a0fe0174dc chore: update docs for uv
update commands and usage for uv
2025-08-11 11:06:22 +09:30
Lakshya Singh
89eaf5b517 feat: replace poetry with uv in Makefiles
Extract package versions from pyproject.toml directly
instead of using poetry commands. Use `uv run` to execute flake8,
pytest and other Python tools consistently.

Add new make commands for uv builds
2025-08-11 11:06:22 +09:30
Lakshya Singh
6088a0e49a feat: add __init__.py in packages
allows for namespace sharing in a virtual environment otherwise gets overriden by pyln-proto-grpc's pyln folder
2025-08-11 11:06:22 +09:30
Lakshya Singh
c56464ca08 refactor: pyproject.toml poetry to uv + hatch
make use of standard keys for project and dependeny specification

- provide sources to run uv build so that it can refer local packages
- using hatchling for build as is stock build option
- use optional-dependencies.dev for dev-dependencies
- add hatch targets for packages and includes where unclear

Changelog-Update: use uv with hatchling instead of poetry
2025-08-11 11:06:22 +09:30
Alex Myers
2b8b709bfd meta: update changelog for v25.05
Changelog-None
2025-06-16 13:10:33 -05:00
daywalker90
40d319b7be python: raise minimum supported python version to 3.9
Changelog-None
2025-06-12 13:51:18 +02:00
Alex Myers
8d6ae149ff release: update version for 25.05rc1
Changelog-None
2025-05-19 14:12:55 -05:00
21M4TW
3da1bdb368 pyln-client: Adding disableoffer, enableoffer, fetchinvoice, listoffers and offer commands
Changelog-None.
2025-05-02 13:57:04 -07:00
Rusty Russell
1dee02c5e3 pyln-client: reimplement NodeVersion, simply.
This broke my build machine, because lightningd --version was malformed
(I had no tags somehow in that branch).

I dived into the code to figure out what was wrong, and I was horrified.

1. STOP.  Never write this much code.
2. You just need a NodeVersion class.  That's it.  No others.
3. Don't throw away the entire first part if it starts with 'v'.  Just remove the v.
4. Handle untagged versions cleanly.
5. Always fail on invalid strings in the constructor, NOT on the first time you
   use it.

I have rewritten it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-05-02 13:48:02 -07:00
Alex Myers
a4e0091565 poetry: update all pyproject.toml files for poetry 2.0.1
and run poetry lock

Changelog-None
2025-05-02 13:39:33 -07:00
Rusty Russell
8974375de8 lightningd: add short_channel_id option to listpeerchannels.
Requested-by: @whitslack
Closes: https://github.com/ElementsProject/lightning/issues/8233
Changelog-Added: JSON-RPC: `listpeerchannels` now has a `short_channel_id` parameter for just listing a specific channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2025-04-28 14:13:12 +09:30
Lakshya Singh
e4a16800ab fix: workaround for macOS AF_UNIX path error
@pytest.mark.openchannel('v1')
    @pytest.mark.openchannel('v2')
    def test_pay(node_factory):
>       l1, l2 = node_factory.line_graph(2)
...
FAILED tests/test_pay.py::test_pay - OSError: AF_UNIX path too long

Changelog-None: symlink the socket to a tempfile which has a shorter path

Signed-off-by: Lakshya Singh <lakshay.singh1108@gmail.com>
2025-04-21 11:45:15 +02:00
Alex Myers
427c4c5ce0 meta: update changelog for 25.02
Changelog-None
2025-03-04 20:58:46 -06:00
Alex Myers
3f81dc0221 meta: update CHANGELOG for 25.02rc3
Changelog-None
2025-02-27 15:14:41 -06:00
Alex Myers
6368aa953f meta: update changelog for v25.02rc2
Changelog-None
2025-02-26 15:49:21 -06:00
Alex Myers
e96af42947 meta: update changelog for 25.02
Changelog-None
2025-02-24 16:06:41 -06:00
Alex Myers
a79dd4ae5f pyln-client: test dev version
Changelog-Changed: pyln-testing is now compatible with older versions of Core Lightning.
2025-02-20 19:40:07 -06:00
Erik De Smedt
98ac15249e NodeVersion: Fix comparision in CI
When tests CI on occur the version number has the following shape "1a86e50-modded".
We will always assume this is the latest version to make the version
checks pass
2025-02-20 19:40:07 -06:00
Erik De Smedt
50c9dc3095 pyln-testing: Fix compatiblity with old versions 2025-02-20 19:40:07 -06:00
Erik De Smedt
8e16cb1a16 Support to query version in pyln-client
Introduce a `NodeVersion`-class into `pyln.client`.
This can be used to test if `lighningd` supports the required
functionality
2025-02-20 19:40:07 -06:00
Nishant Bansal
f524f1172f pyln-client: use \n as line separator in lightning-cli help
Changelog-Changed: Interpret \n as the line separator in plugins to enhance the readability of lightning-cli help.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
[ Modified to use \n not | --RR ]
2025-02-20 14:37:28 +10:30
Nishant Bansal
eafb6d8c63 pyln-client: remove unused doc variable from plugin.
The `doc` variable was being initialised and processed but not used anywhere.
Changelog-None

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-02-20 14:37:28 +10:30