Commit Graph

150 Commits

Author SHA1 Message Date
Rusty Russell c3f33eb6dd listpeerchannels: show gossip updates.
This is redundant if it's a public channel, but vital if it's not.  Publishing unconditionally makes
it easier for gossmap: we create a local modification all the time, even if redundant (and we can
have the actual capacity ceiling accurate in this case, since we know it for local channels).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Changelog-Added: JSON-RPC: `listpeerchannels` now shows gossip update contents (even if channel unannounced).
2023-12-14 09:16:56 +10:30
Christian Decker 94f4d75006 msggen: Add `Wait` method to managed API
Fixes #6792

Changelog-Added: Cln-RPC: Add `wait` system to cln-rpc and cln-grpc.
2023-11-16 09:02:33 +01:00
Christian Decker bdfd2d5fda msggen: Add `FetchInvoice` method to Rust and grpc bindings
Closes #6844

Changelog-Added: Cln-RPC: Add `fetchinvoice` method to cln-rpc and cln-grpc.
2023-11-16 09:02:33 +01:00
niftynei ecb8d9d71f dual-fund: add new open-commit-ready state
From the spec:

	Once peers are ready to exchange commitment signatures, they must remember
	the details of the funding transaction to allow resuming the signatures
	exchange if a disconnection happens.

Basically this means we add channels to the database before we've gotten
commitments for them; it's nice that there's now a state for commitments
recevied but we now save the channel prior to that.

This commit makes it possible to track the pre-commit-rcvd but not quite
open-init state.
2023-11-02 19:32:05 +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 1d8af90b56 listforwards: add created_index and updated_index fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `listforwards` fields `created_index` (old: `id`) and `updated_index`.
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
Rusty Russell 00ac1a9475 listsendpays: add created_index and updated_index fields.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `sendpay`, `listsendpays`, `delpay` new fields `created_index` (old: `id`) and `updated_index`.
2023-10-28 15:48:26 +10:30
Aditya Sharma b0c603581f doc/lightning-decode.7: Update the doc 2023-10-27 16:05:28 +10:30
Chris Guida 88ac2dcb7e add test, update schemas, fix warning_custom_fallbacks 2023-10-26 19:11:17 +10:30
niftynei 411bb2884a fallback: json add fallback cleanup
Expand to handle P2TR addresses, use the common script encoding utility
function instead of reimplementing it.
2023-10-26 19:11:17 +10:30
Peter Neuroth 833b7b4baa grpc: Add datastoreusage command
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-10-26 12:58:04 +10:30
Peter Neuroth 63aaf1fbb7 grpc: Add missing feature attribute
Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2023-10-24 10:24:52 +10:30
Christian Decker dfea5fbe6d grpc: Add WaitBlockHeight method to grpc interface 2023-10-24 10:24:52 +10:30
Christian Decker 394e926cb7 rs: Fix up grpc conversions 2023-10-24 10:24:52 +10:30
Christian Decker 535d3d953d rs: Bump crates cln-rpc and cln-grpc to 0.1.5 and cln-plugin to 0.1.6 2023-10-24 10:24:52 +10:30
Rusty Russell 5b9b056853 doc: introduce new state DUALOPEND_OPEN_COMMITTED.
This is the variant of DUALOPEND_OPEN_INIT which you see once
the channel is in the db: we'll be adding it next, but to reduce
clutter the docs are added as a separate commit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-10-02 11:41:19 +10:30
daywalker90 10eeceabd5 add CHANNELD_AWAITING_SPLICE state to cln-rpc 2023-09-21 18:53:51 +02:00
Christian Decker 990096f904 schema: Fix wrong type of CLTV in route
We were using `number` instead of `u32` which caused it to be
serialized to string with a decimal, which then would be rejected by
lightningd.

Changelog-Fixed: proto: Fixed a wrong number type being used in routes
2023-09-01 07:32:14 +09:30
Christian Decker 8e2e7b1c51 rs: Bump crate versions before publishing
Changelog-None
2023-08-28 11:19:30 +02:00
Christian Decker 9074341ef6 msggen: Add `staticbackup` call to list of managed methods
Changelog-Added: cln-grpc: Added `staticbackup` support to cln-grpc
2023-08-06 12:34:36 +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
Christian Decker 7b8ea7f60a msggen: Add two missing fields to the `listpays` schema
The fields were missing because they weren't annotated with a type and
a description. Adding those fixes them.

Changelog-Fixed: msggen: `listpays` now includes the missing `amount_msat` and `amount_sent_msat` fields
No-schema-diff-check: fields were always there, just undocumented!
2023-07-27 12:40:28 +09:30
ff 6920e36135 added listhtlcs model 2023-07-24 09:07:24 +09:30
Rusty Russell d25a8ca0fd lightningd: expose created_index and updated_index fields.
If you miss a wait event, you can catch up by doing listinvoices and
getting the max of these fields.  It's also a good debugging clue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-23 13:48:37 +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 b529e79621 lightningd: `setchannel` can set `ignorefeelimits`.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `setchannel` adds a new `ignorefeelimits` parameter to allow peer to set arbitrary commitment transaction fees on a per-channel basis.
2023-07-22 13:11:08 +09:30
Rusty Russell 8910529e6a lightningd: expose ignore_fee_limits field in listpeerchannels.
Changelog-Added: JSON-RPC: `listpeerchannels` has a new field `ignore_fee_limits`
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-07-22 13:11:08 +09:30
Greg Sanders 4b70736d13 Support p2tr deposit addresses
Changelog-Added: JSON-RPC: newaddr: p2tr option to create taproot addresses.
Changelog-Changed: Wallet: we now use taproot change addresses.
2023-07-11 11:41:15 +09:30
Christian Decker 53b37ca1c1 cln-rpc: Allow access to deprecated fields in conversions
This silences a compilation warning about accessing a deprecated
field. This was triggering on each build and we'll notice when they go
away, so why upset users with it?
2023-07-10 18:22:11 +02:00
Christian Decker 706b47587f cln-rpc: Remove wildcard import from model
There is a name clash between request and response for the delinvoicestatus
param.
2023-07-10 13:47:38 +09:30
Rusty Russell 0402e645f0 lightningd: add option `opening_anchor_channel` to fundpsbt, utxopsbt.
This is needed when we know we're *opening* an anchor channel, to
override the "do we already have an anchor channel open?" logic.

Also, document the nonwrapped arg added in v23.02.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `fundpsbt` and `utxopsbt` new parameter `opening_anchor_channel` so lightningd knowns it needs emergency reserve for anchors.
2023-06-29 11:28:47 -04:00
Rusty Russell e45bf14300 lightningd: use lowball feerate for commit_tx on anchor channels.
Since we can CPFP, we don't have to track the feerate as closely.  But
it still needs to get in the mempool, so we use 10 sat/byte, or the
100 block estimate if that is higher.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: JSON-RPC: `feerates` has new fields `unilateral_anchor_close` to show the feerate used for anchor channels (currently experimental), and `unilateral_close_nonanchor_satoshis`.
Changelog-Changed: JSON-RPC: `feerates` `unilateral_close_satoshis` now assumes anchor channels if enabled (currently experimental).
2023-06-29 11:28:47 -04:00
Christian Decker 6507d34b50 cln-grpc: Add some missing states to HtlcState 2023-06-23 14:38:23 +09:30
Rusty Russell 69fc9c28bc Makefile: correctly erase generated contrib/pyln-testing/pyln/testing/ in distclean, and rebuild by default.
And add contrib/pyln-testing/pyln/testing/grpc2py.py since we didn't previously know
how to build it!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-23 13:58:31 +09:30
Matt Whitlock 8d737cc4bf Makefile: use grouped targets for recipes with multiple fixed outputs
See the section headed "Rules with Grouped Targets" on the Texinfo page
`(make)Multiple Targets`.

Without this fix, Make does not know that these recipes unconditionally
make *all* of their named targets regardless of which target triggers
their execution, and Make will blissfully execute multiple instances of
any such recipe in parallel, not only wasting CPU cycles but potentially
producing incorrect results if the recipe is not atomic in its effects
on the file system.  With this fix, Make understands that it need only
execute such a recipe once to make all of its targets.

In pursuit of the above, move and combine two redundant msggen recipes
into the top-level Makefile, and populate its grouped targets from the
subordinate Makefiles.

Changelog-None
2023-06-23 13:58:31 +09:30
Christian Decker 8c02d9587d msggen: Extend support range to v0.10.1 and mark address, added in v23.02 2023-06-13 11:28:35 +09:30
Christian Decker 00ffb39ed6 rs: Guard the cln-rpc dependency behind "server" feature in cln-grpc
The `cln-grpc` crate really has a dual purpose: server and
client. Having the server feature be included by default means that we
are pulling in `cln-rpc` which is a Unix only crate, because of the
use of UDS to talk to CLN. We want to use `cln-grpc` on clients too,
and those might not be Unix variants, hence they'd fail when compiling
`cln-rpc`. This PR guards the Unix-related parts behind the `server`
feature flag.
2023-06-01 13:41:21 +09:30
Rusty Russell a6772e9dec common: add new internal type for websockets.
Now it's not a public type, we need a way to refer to it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30
Rusty Russell 3f35d48fe4 common: remove websocket type from wireaddr.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-06-01 09:28:39 +09:30
Christian Decker 5ed6f618b3 rust: Bump the versions of cln-rpc, cln-grpc, cln-plugin and grpc-plugin
We haven't uploaded the new v23.05 version just yet, and this includes
a couple of bugfixes that happened since too.
2023-05-30 10:06:10 +09:30
Christian Decker c029de7d56 msggen: Add preapproveinvoice and preapprovekeysend to msggen 2023-05-29 14:50:13 +09:30
Rusty Russell b8aa3a579e listtransactions: remove annotations, which were only in EXPERIMENTAL_FEATURES.
I don't know if anyone was using them, they seem half-hearted.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2023-05-23 09:34:08 +09:30
daywalker90 e2535e73bc fix commas to semicolons 2023-05-20 13:17:36 +02:00
daywalker90 0ea7cb2484 add missing htlc states from incoming htlcs 2023-05-20 13:17:36 +02:00
Christian Decker acc3bb2276 msggen: Switch signatures to string instead of bytes 2023-05-05 09:24:07 -07:00
Christian Decker fc26675336 msggen: Add DecodePay to the mappings
Changelog-Added: grpc: Added mapping for `listpeerchannels`, `listclosedchannels`, `decode` and `decodepay` RPC method
2023-05-05 11:54:41 +09:30
Christian Decker 0031f1160b msggen: Map arrays of hashes and add HtlcState enum 2023-05-05 11:54:41 +09:30
Christian Decker b41cb2f005 cln-grpc: Rename the ChannelSide variants
IN/OUT => LOCAL/REMOTE
2023-05-05 11:54:41 +09:30