Commit Graph

242 Commits

Author SHA1 Message Date
saisuraj27 34aaa9c7ba Fixed indentation errors. 2024-02-08 12:37:34 +01:00
saisuraj27 a35006e701 Fixed raising TypeError instead of ValueError when there is an invalid type. 2024-02-08 12:37:34 +01:00
Graham Krizek f5ddb89d83 Add a method to the pyln-client for using the sendcustommsg api 2024-02-07 13:17:30 +01:00
Rusty Russell 104d6a9c78 gossip_store: remove infratructure and bits for marking ratelimited entries.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-02-04 09:24:44 +10:30
Rusty Russell 07cd4a809b gossipd: remove spam handling.
We weakened this progressively over time, and gossip v1.5 makes spam
impossible by protocol, so we can wait until then.

Removing this code simplifies things a great deal!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: Protocol: we no longer ratelimit gossip messages by channel, making our code far simpler.
2024-02-04 09:24:44 +10:30
Rusty Russell e7ceffd565 gossipd: remove zombie handling.
We never enabled it, because we seemed to be eliminating valid
channels.  We discard zombie-marked records on loading.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-02-04 09:24:44 +10:30
Rusty Russell 3c2a57598f spenderp: add channel_type parameter to fundchannel / multifundchannel.
And add a request schema for multifundchannel.

Changelog-Added: JSON-RPC: `fundchannel` and `multifundchannel` now take an optional `channel_type` parameter.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-29 13:40:34 +10:30
Rusty Russell e749aebbff fundchannel_start / openchannel_init: add a channel_type parameter to force channel type.
And add request schemas for openchannel_init and fundchannel_start.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundchannel_start` and `openchannel_init` now take an optional `channel_type` parameter.
2024-01-29 13:40:34 +10:30
Rusty Russell 5a6c529c69 pyln.plugin: Allow deprecated to be a string.
Type-checking in Python is so loose you could already do this, but this updates the
mypy type annotations.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Rusty Russell 222ca17333 pyln-client: remove long-obsolete support for msatoshi arg.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-01-26 10:30:22 +10:30
Rusty Russell 09c1cfde39 pyln-client: don't automatically turn JSON into Millisatoshi class.
Now _msat fields are all integers (last conversion 23.08) we can simply
leave them alone, rather than trying to convert them.

And for turning Millisatoshi into JSON, we simply globally replace the
default encoding function to try ".to_json()" on items, which allows
anything to be marshalled.

The global replacement was interfering with other uses of JSON, such
as the clnrest plugin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: pyln-client: no longer autoconverts _msat field to Millisatoshi class (leaves as ints).
2023-12-16 10:22:01 +01:00
Erik De Smedt 557b5fee46 Allow dynamic option in python plugin 2023-12-14 16:48:02 +01:00
Peter Neuroth 02ca226f88 CHANGELOG.md: Update for 23.11rc1
Update changelog, pyln versions, clnrest version and poetry.lock.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-11-03 14:49:12 +01:00
Rusty Russell 1d677bcba7 addpsbtoutput: allow command to specify output address.
Default is still to generate it.

Changelog-None: Introduced this release anyway.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-11-01 14:11:28 +10:30
Rusty Russell f2162bf202 lightningd: add ordering and pagination to listforwards.
Changelog-Added: JSON-RPC: `listforwards` new parameters `index`, `start` and `limit`.
2023-10-28 15:48:26 +10:30
Rusty Russell c70a326f1f lightningd: add ordering and pagination to listsendpays.
Changelog-Added: JSON-RPC: `listsendpays` new parameters `index`, `start` and `limit`.
2023-10-28 15:48:26 +10:30
Peter Neuroth d032a17f75 pyln: Add datastoreusage command
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-10-26 12:58:04 +10:30
Rusty Russell dfe207d503 pytest: test for accepting even unknown messages.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-24 11:50:57 +10:30
Dusty Daemon bc9333ac1e addpsbtoutput: New onchain command for PSBT output
Also added splice_out tests that use the new PSBT command.

ChangeLog-Added: New `addpsbtoutput` command for creating a PSBT that can receive funds to the on-chain wallet.
2023-10-03 10:12:39 +02:00
Rusty Russell f725edad62 plugins: remove #if DEVELOPER.
And rename dev-only-option `use_shadow` to `dev_use_shadow`.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-09-21 20:08:24 +09:30
Dusty Daemon c50e93d9fb splice: Move splice to experimental feature bit
This was recommended by @t-bast: if the final spec commits to something
compatible, we can simply advertize and accept both features, but if it
does change in incompatible ways we won't cause problems for nodes
who implement the official spec.

(I split this, so first, we remove the OPT_SPLICE entirely, to make
sure we caught them all. --RR)

Suggested-by: @t-bast
Changelog-None
2023-08-10 15:52:53 +09:30
Rusty Russell 0c20cc70ab pyln-client, pyln-proto, pyln-testing: update to new versions.
I actually did this manually to send 23.08 to Pypi a few days ago, as it's
required for clnrest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-08-03 09:05:59 +09:30
Dusty Daemon 4628e3ace8 channeld: Code to implement splicing
Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing.

Implement the channeld splicing protocol leveraging the interactivetx protocol.

Implement lightningd’s channel_control to support channeld in its splicing efforts.

Changelog-Added: Added the features to enable splicing & resizing of active channels.
2023-07-31 21:00:22 +09:30
Rusty Russell 284262d006 listinvoices: add limit param.
Changelog-Added: JSON-RPC: `listinvoices` has `limit` parameter for listing control.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +09:30
Rusty Russell 16c133746b listinvoices: add index and start params.
Now we have defined ordering, we can add a start param.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listinvoices` has `index` and `start` parameters for listing control.
2023-07-23 13:48:37 +09:30
Rusty Russell 7372b518ef pytest: test for setchannel's new ignorefeelimits.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-22 13:11:08 +09:30
Shahana Farooqui c0bb7f0721 lightningd: updating python v3.7 to v3.8 2023-07-20 11:44:46 +09:30
Rusty Russell 279b3aa7e8 pyln: add ability to subscribe to all notifications.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-13 18:59:37 +09:30
Rusty Russell 2109f0b0ea pyln-client: make point release to prepare for next release.
People running master notice that calling listconfigs fails, because
we don't handle objects called xxx_msat correctly (see
d348554ff4).  This makes it painful
to test, until we release a pyln-client version.

Fortunately, the three changes in master are all fully backwards compatible,
so we can simply cut a release now and upload to pipy.org.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-10 18:22:43 +02:00
Shahana Farooqui 4e5e38f4b0 tests: notification response fixes
tests: notification response fixes
2023-07-10 14:51:11 +09:30
Christian Decker 9f1e1ada2a py: Update dependencies and relax constraints
We were being very restrictive when describing the dependencies, so let's
relax them a bit.
2023-06-18 11:00:32 +09:30
Rusty Russell 0df97547dd lightningd: don't simply ignore defaults on flags, deprecate.
Changelog-Deprecated: Plugins: `default` no longer accepted on `flag` type parameters (it was silently ignored, so just don't set it).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-03 10:50:29 +09:30
Rusty Russell d348554ff4 pyln-client: don't try to convert objects to Millisatoshi.
The new listconfigs fields will be objects, and this messes us up!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-03 10:50:29 +09:30
Rusty Russell 45e16180bc lightningd: remove deprecated `null` for missing plugin options.
We leave the code in contrib/pyln-client/pyln/client/lightning.py to handle
msat null fields for now, though, for a bit more compatibility.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-03 10:50:29 +09:30
Shahana Farooqui d1cf88c62e meta: update changelog and pyln version for 23.05 release
Changelog-None
2023-05-10 09:50:38 -07:00
Shahana Farooqui 4f258a9354 meta: Add changelog for 23.05rc4 2023-05-09 14:04:14 -07:00
Shahana Farooqui ea23122880 meta: Add changelog for 23.05rc3 2023-05-05 10:20:27 -07:00
Shahana 21cc16fb5b meta: Add changelog for 23.05rc2 2023-04-26 15:46:02 -07:00
Shahana Farooqui 15795c969a meta: Add changelog for 23.05rc1
Typo correction

Updated delpay changelog
2023-04-15 12:33:06 -07:00
Chris Guida 1507e87197 fix helloworld.py example in README for pyln-client 2023-04-05 15:28:32 +09:30
Michael Schmoock 04ea37d88f pygossmap: rename GossipStoreHeader to GossipStoreMsgHeader
Changelog-Added: pyln-client: Improvements on the gossmap implementation
2023-04-05 06:13:08 +09:30
Michael Schmoock 6e46a63c57 pygossmap: adds statistic and filter module
Includes a lot of useful filters and statistical methods.

To see a gossip_store summary:
```
s = GossmapStats(g)
s.print_stats()
```
2023-04-05 06:13:08 +09:30
Michael Schmoock f1b6047d69 pygossmap: store features for nodes and channels
also makes them acessible using bitmask functions
2023-04-05 06:13:08 +09:30
Michael Schmoock 3130f4ec27 pygossmap: read .disabled from channel_flags 2023-04-05 06:13:08 +09:30
Michael Schmoock 6a16a31a98 pygossmap: parse node addresses and other data 2023-04-05 06:13:08 +09:30
Michael Schmoock 9409f2f1ea pygossmap: adds get_neighbors and get_neighbors_hc flodding method 2023-04-05 06:13:08 +09:30
Michael Schmoock 5a9a3d83c9 pygossmap: adds get_halfchannel 2023-04-05 06:13:08 +09:30
Michael Schmoock d50722d26b pygossmap: adds a more complete mesh testcase 2023-04-05 06:13:08 +09:30
Michael Schmoock eb9cb5ef31 pygossmap: adds missing __str__, __eq__ and __hash__
Also caches certain __hash__ and __str__ operations,
This way graph operations can be done quicker.
2023-04-05 06:13:08 +09:30
Michael Schmoock be60f2ac33 pygossmap: adds GossmapHalfchannel to module exports 2023-04-05 06:13:08 +09:30