Commit Graph

1272 Commits

Author SHA1 Message Date
Rusty Russell
d8ca9baa3b askrene: add support for disabled channels in layers.
Based-on-the-patch-by: Lagrang3 <lagrang3@protonmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-04 11:27:53 +09:30
ShahanaFarooqui
e36b68ab48 gpg: New public key
Changelog-None.
2024-09-24 21:00:25 -07:00
Jesse de Wit
2798b4b7be cln-grpc: add anchors/even to primitives
The `anchors/even` channel type was missing from the grpc bindings.
It is now the default channel type, so `fundchannel` over grpc fails
with:

```
Failed to deserialize response : unknown variant `anchors/even`,
expected one of `static_remotekey/even`, `anchor_outputs/even`,
`anchors_zero_fee_htlc_tx/even`, `scid_alias/even`, `zeroconf/even`
```

Changelog-Changed: Channel type `anchors/even` was added
to the grpc bindings.
2024-09-20 17:01:04 -07:00
Rusty Russell
e90be8d957 pyln-testing: add gossip_store_file arg to get_node()
This makes it much easier to use generated gossip_store files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-09-19 12:16:53 +09:30
laanwj
c8660c85ba schemas: "description" field in "wait(any)invoice" is optional since BOLT12
For BOLT12 invoices, the "description" is field missing in the invoice
responses. Update the schemas accordingly:

- `doc/schemas/lightning-waitanyinvoice.json`
- `doc/schemas/lightning-waitinvoice.json`

Also commit the generated msggen, cln-grpc, cln-rpc and pyln-grpc-proto files.

Changelog-Fixed: schemas: Make description in `Wait(any)invoiceResponse` optional to handle BOLT12
2024-09-16 16:03:07 +09:30
Jesse de Wit
15eb1e6ff5 cln-tracer: readme usage clarifications 2024-09-05 15:49:03 -07:00
Rusty Russell
46fe1d34e6 pyln-client: try to bump version
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-09-03 23:24:12 -07:00
Rusty Russell
dc32e2c0dc pyln-client: don't refer to now-non-existent long_desc member.
This breaks reckless:

```
[2024-09-01 12:24:14,755] DEBUG:       doc = method.long_desc if method.long_desc is not None else "No documentation found"\n[2024-09-01 12:24:14,755] DEBUG:                                 ^^^^^^^^^^^^^^^^\n[2024-09-01 12:24:14,755] DEBUG:   AttributeError: \'Method\' object has no attribute \'long_desc\'\n[2024-09-01 12:24:14,755] ERROR: plugin testing failed\n[2024-09-01 12:24:14,770] WARNING: testplugpass: installation aborted\n'
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-09-03 23:24:12 -07:00
ShahanaFarooqui
5ec5580a58 meta: update changelog for v24.08
Changelog-None
2024-08-28 21:49:21 -07:00
ShahanaFarooqui
c9552e4228 meta: Update changelog for 24.08rc3
Release candidate 3 for v24.08
2024-08-26 11:53:42 -07:00
Rusty Russell
7fb7234da1 askrene: change finalcltv to final_cltv, and return it in response.
You need to know it to make an onion, and in theory if we decided to
fuzz it could be different for different paths.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-19 10:12:51 -07:00
ShahanaFarooqui
52f9678deb meta: Update changelog for 24.08rc2
Release candidate 2 for v24.08
2024-08-15 21:20:35 -07:00
ShahanaFarooqui
be5ad3d7a9 docker: Docker file fixes for reproducible builds
- Added missing mako and grpcio-tools for ubuntu distro Docker files

- Fixed incorrect bitcoincore link

Changelog-Fixed: Fedora, focal, jammy & noble's failing reproducible builds are fixed now.
2024-08-15 16:47:45 +09:30
Rusty Russell
395781f204 pyln-testing: fix catching of memleak/broken errors at exit.
Commit 901342b50d ("pyln-testing: require
explicit pattern for BROKEN messages.") changed to a manual scan of
logs rather than using is_in_log, so it needs to manually refresh,
otherwise we miss final log messages.

This causes us to often miss memleak messages, which are printed
only in the exit path!

Reported-by: Lagrang3
Fixes: https://github.com/ElementsProject/lightning/issues/7565
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-15 16:38:12 +09:30
ShahanaFarooqui
fb3579c1a4 meta: Update changelog for 24.08rc1
Release candidate 1 for v24.08
2024-08-13 08:32:23 -07:00
Lagrang3
9afc10bf99 renepay: add cli option exclude
msggen cannot handle the complex type in renepay-exclude,
therefore I added a rule override for it, just like pay-exclude.

```
msggen cln-grpc/proto/node.proto
Traceback (most recent call last):
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/__main__.py", line 131, in <module>
    main()
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/__main__.py", line 115, in main
    run()
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/__main__.py", line 72, in run
    service = load_jsonrpc_service(
              ^^^^^^^^^^^^^^^^^^^^^
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/utils/utils.py", line 241, in load_jsonrpc_service
    methods = [load_jsonrpc_method(name) for name in grpc_method_names]
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/utils/utils.py", line 209, in load_jsonrpc_method
    request = CompositeField.from_js(schema["methods"][rpc_name]['request'], path=name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/model.py", line 297, in from_js
    field = ArrayField.from_js(fpath, ftype)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/model.py", line 464, in from_js
    itemtype = UnionField.from_js(child_js, path)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rusty/devel/cvs/lightning/contrib/msggen/msggen/model.py", line 393, in from_js
    itemtype = PrimitiveField(
               ^^^^^^^^^^^^^^^
TypeError: PrimitiveField.__init__() missing 2 required positional arguments: 'added' and 'deprecated'
```

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Changelog-EXPERIMENTAL: renepay: add cli option "exclude" to manually disable channels and nodes.
2024-08-12 22:44:58 -07:00
Alex Myers
ab7a63ec99 reckless-rpc: add documentation 2024-08-12 18:10:45 -07:00
Lagrang3
4ac85b2cd1 askrene: inform-channel fixes argument order
The documentation and the implementation of inform-channel have
different orders for the arguments minimum_msat and maximum_msat.
We change the order in the documentation to match that of the
implementation: minimum_msat comes before maximum_msat.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-08-12 14:17:22 -07:00
michael1011
d32433a553 bkpr: add payment_id parameter to listaccountevents to filter events.
When you have *lots* of events in your bkpr database looking up a
specific event via calling bkpr-listaccountevents and using jq or
grep to filter gets very slow (and wasteful of CPU and disk resources).
This commit adds the paremeter payment_id to the call to filter for a
specific payment id via a where clause in the request to the database of bkpr.

Changelog-Added: Plugins: Add payment_id parameter to bkpr-listaccountevents to filter events.
2024-08-12 10:22:55 -07:00
Rusty Russell
975dd76086 lightningd: create new return code for enableoffer.
Suggested-by: https://github.com/Lagrang3
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-11 11:27:10 +09:30
Vincenzo Palazzo
1e1edfd073 offer: allow re-enabling a previously disabled offer
Sometimes, for various reasons, a user disables an offer
and then wants to re-enable it. This should be allowed because,
from the CLN point of view, it is just an internal state.

If a user has constraints on the description of the invoice
because they are using services that link some sort of user ID
to an offer, it is important for the user to be able to re-enable the
offer, not create a new one. Creating a new offer would
require a different description.

Link: https://github.com/ElementsProject/lightning/issues/7360
Co-Developed-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-08-11 11:27:10 +09:30
ShahanaFarooqui
f92a4ccea5 doc: Updated json examples in schema files 2024-08-09 23:56:45 -07:00
ShahanaFarooqui
fe7981bda2 pyln-testing: Increasing bitcoin rpc threads from default 4 to 20
Bitcoind's web server has a default of 4 threads, with queue depth 16 and it fails rather than queue beyond that.

Increasing thread count to 20 for running >10 lightning test nodes simultaneously.
2024-08-09 23:56:45 -07:00
ShahanaFarooqui
1ec508eb54 doc: Fixing schema definition
- `Notes` is not a required field in renepaystatus response
2024-08-09 23:56:45 -07:00
Rusty Russell
4d593463fa doc: document askrene.
It's experimental, so API may change, but it definitely does need explanation!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-07 20:35:30 +09:30
ShahanaFarooqui
a82f1feb3a pyln-client: Deprecate category, description and long description from method
Category, description and long description from `json_command` and `plugin_command` have been removed in favour of getting them from json schema.  Reference PR: Add categories in RPC documentation #7485

Deprecating them in pyln-client as well. They will remove completely in future releases.

Changelog-Deprecated: pyln-client: category, description and long descriptions for RPC commands are deprecated now.
2024-08-07 10:19:55 +09:30
Rusty Russell
bf549130d6 global: update BOLT12 quotes.
This is a final sweep to match the current BOLT12 text:

	1563d13999d342680140c693de0b9d65aa522372 ("More bolt12 test vectors.")

Only two code changes, to change the order of checks to match the bolt,
and to give a warning on decode if a path is empty.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-01 12:31:48 +09:30
Rusty Russell
f2a7b19281 plugins/offers: handle invreq_paths in invoice_requests, set them if necessary.
Changelog-EXPERIMENTAL: offers: `invoicerequest` will set a blinded path if we're an unannounced node.
Changelog-EXPERIMENTAL: offers: `sendinvoice` will use a blinded path in an invoice_request, if specified.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-01 12:31:48 +09:30
Rusty Russell
0f0a0cf153 doc: mark schema offer_node_id and warning_missing_offer_node_id deprecated.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-01 12:31:48 +09:30
Rusty Russell
925e90ee8b wire: rename "offer_node_id" to "offer_issuer_id" to match latest BOLT.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-08-01 12:31:48 +09:30
Pavol Rusnak
5c494488e7 pyln-proto: update cryptography to v42
Changelog-None
2024-07-31 16:34:55 +02:00
ShahanaFarooqui
b485a026f7 rpc: Removing description from json_command struct 2024-07-31 14:42:58 +09:30
ShahanaFarooqui
89c182e2be rpc: Removing category and verbose from json_command struct 2024-07-31 14:42:58 +09:30
ShahanaFarooqui
58e3ea574c docs: Adding readonly category for all get & list commands except listdatastore 2024-07-31 14:42:58 +09:30
Rusty Russell
7735eb6767 doc: allow "offer_description" to be missing in decode.
This is now allowed to be omitted.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-23 09:54:47 +09:30
Rusty Russell
0a1aa972d8 msggen: fix deprecated from "False" to "None".
Turns out we set this to False instead of None, so new field get "deprecated": False.
When we actually deprecate one, we get the following error:

	ValueError: Field Decode.offer_node_id changed `deprecated` annotation: v24.08 vs False

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-23 09:54:47 +09:30
Joseph Goulden
89ede8a208 plugins/sql: allow datetime functions
Changelog-Changed: Plugins:  now allows date and time sqlite functions.
2024-07-19 15:40:06 +09:30
ShahanaFarooqui
6bfa303a4a doc: Tiny corrections in documentation
Changelog-None.
2024-07-17 22:35:37 -07:00
Rusty Russell
3c04b6f8d3 lightningd: remove expermential "sendonionmessage" function.
It was only ever expermental, so I don't feel bad about just removing it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Removed: JSON-RPC: `sendonionmessage` (was experimental only, use `injectonionmessage`)
2024-07-18 10:53:55 +09:30
Dusty Daemon
21bc89f189 splice: Add funding outnum
Fixes #7005

Changelog-Changed: Added outnum of new funding output to splice_signed RPC command
2024-07-15 13:31:01 -05:00
Rusty Russell
418887b24a doc: fix up added versions for notification schemas.
The *schemas* were added in v24.05, but the actual fields are much older.  Unfortunately,
fixing this required a manual edit of the .msggen.json file, as msggen won't let the
added version change (for good reason).

Versions when these notifications were originally added:
connect: v0.6.3
channel_opened: v0.7.2.1:
channel_state_changed: v0.9.1
channel_open_failed: v0.9.3
block_added: v22.11
custommsg: v24.02

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-12 17:30:14 -07:00
Vincenzo Palazzo
05f5976a9c bolt12: partial support for minimal offer
Making sure that we are able to fetch the invoice
from an offer without description

E           pyln.client.lightning.RpcError: RPC call failed: method:
offer, payload: {'amount': '2msat'}, error: {'code': -32602, 'message':
'bolt12: Offer does not contain a description: invalid token
\'"lno1qgsqvgnwgcg35z6ee2h3yczraddm72xrfua9uve2rlrm9deu7xyfzrcgqyppvggz953rvg9rtxj8lalh43z8epwydjfrmffn3y3p5qz5cywpu09rr4vs"\''}

Link: https://github.com/ElementsProject/lightning/issues/7405
Link: https://github.com/ElementsProject/lightning/issues/7404
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-07-11 14:51:56 +09:30
Rusty Russell
7f71e6353a doc: fix schema for listconfigs.
We never call `listconfigs` in our tests with `experimental-offers` enabled,
so we didn't notice that the schema is wrong: it does not expect the
"plugin" field in 'fetchinvoice-noconnect'.

The next patch folds the fetchinvoice plugin into the offers plugin,
which is enabled even if `experimental-offers` isn't (for `decode`),
so we notice it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-07-09 15:09:29 +02:00
jackstar12
feaac0eb4f msggen: add missing-grpc command 2024-07-06 09:05:08 +09:30
ShahanaFarooqui
7783658489 ci: Unify bitcoin versions for whole project
- Updated all Bitcoin version 27.1
- Updated all Elements versions 23.2.1

Changelog-Changed: Updated Bitcoin to v27.1 and Elements to v23.2.1
2024-07-02 11:41:36 +09:30
daywalker90
c251686c6c pyln-proto: update coincurve to v20
Changelog-None
2024-06-28 10:46:14 +09:30
ShahanaFarooqui
51e46339a7 docs: notifications schema update
Changelog-None.
2024-06-26 21:06:16 -07:00
ShahanaFarooqui
b803609247 docs: Removed example usage
Example usage has been either merged with examples or usage keys. This heading was not required separately.

This PR edits & rearranges Examples, Example Notifications and Example Usage data.

Changelog-None.
2024-06-22 17:02:33 +02:00
ShahanaFarooqui
e94b793f05 docs: Example notifications heading
- Added missing Example Notifications Heading
- Renamed `example_json_notifications` to `example_notifications`
- Moved `example_notifications` to the end of the page
2024-06-22 17:02:33 +02:00
ShahanaFarooqui
976c0c90bc docs: Changes examples format
- Changed ALL `doc/schemas/lightning-*.json` file's `json_example` to `examples`
- Change the heading from example to examples
- Bring shell command before the json command
- Move Example to the end of the page
- Remove horizontal line from Example
2024-06-22 17:02:33 +02:00