Commit graph

14624 commits

Author SHA1 Message Date
daywalker90
14fea4b72b msggen: add missing bkpr-* methods
Changelog-None
2024-04-25 13:21:25 +02:00
daywalker90
3189ff6a6d msggen: add getlog method
Changelog-None
2024-04-25 13:21:25 +02:00
ShahanaFarooqui
cf5e8822b9 plugin/clnrest: Adding new config param as clnrest-swagger-root
- Updated config params and plugin
- Updated documentation

Changelog-Added: Added a new configuration for clnrest plugin to change the default Swagger UI path from `/` to custom url.
2024-04-25 13:21:25 +02:00
ShahanaFarooqui
95a92b6e4b plugin/clnrest: Adding new config param as clnrest-swagger-root
- Updated config params and plugin
- Updated documentation

Changelog-Added: Added a new configuration for clnrest plugin to change the default Swagger UI path from `/` to custom url.
2024-04-24 11:13:27 -05:00
daywalker90
7317bb174f msggen: add delforward method
Changelog-None
2024-04-24 11:47:22 +02:00
daywalker90
1a2a9b0bae poetry: add pyln-grpc-proto dependency
Changelog-None
2024-04-24 11:42:32 +02:00
Peter Neuroth
9ae5c04583 bcli: change iteration order on peerlist
It is simpler to just iterate through the peerlist backwards.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
8894455c02 ci: Update elementsd version used for tests
Using `getblockfrompeer` requires a version equal or above 23.0.0

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
6e3ea36976 tests: add tests for getblockfrompeer
Changelog-Changed: Plugins: bcli: Add a path that tries to fetch blocks
from a peer if we can not find them locally.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
e7861e836c bcli: add version check
`getblockfrompeer` was introduced in v23.0.0, we want to skip this path
if the version of bitcoind used is below that.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
6a9c1e6320 bcli: try to fetch block from peer if unknown
In the case that we have peers left in the peers array and that we could
not find the block yet, we ask the next peer for the desired block.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
08f5e17237 bcli: add peers array to the stash
We introduce the peers array that contains the known set of connected
peers for future reference in case that we couldn't find the block we
are looking for.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
9baa65a738 bcli: move getblock call to a separate function
We move the `geblock` call into a separate function. This allows us to
call if from various places in the future.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
Peter Neuroth
e06c3245f5 bcli: allow non 0 exit status for getblock call
This allows us to intercept getblock on a non 0 exit when the block was
not found. We fill this with something meaningull in future commits.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
2024-04-24 05:50:54 +09:30
daywalker90
448f4c0cfb msggen: add low level fundchannel methods
Changelog-None
2024-04-23 18:43:03 +02:00
daywalker90
c80a70de25 msggen: add methods autoclean-once and autoclean-status, fix bkpr-listincome
Changelog-None
2024-04-23 17:47:56 +02:00
daywalker90
e418d0c08c msggen: rust fix for methods containing '-' 2024-04-23 17:47:56 +02:00
daywalker90
2d0778ec38 msggen: add delpay method 2024-04-22 13:28:58 +02:00
ShahanaFarooqui
c8337aaf7f plugin/wss-proxy: Documentation
Changelog-Added: Add WSS Proxy server with `wss-bind-addr` and `wss-certs` configurations.
2024-04-22 09:12:09 +09:30
ShahanaFarooqui
6b837ec024 plugin/wss-proxy: Testing WSS connection 2024-04-22 09:12:09 +09:30
ShahanaFarooqui
720af34d43 plugins/wss-proxy: Plugin included in core lightning 2024-04-22 09:12:09 +09:30
ShahanaFarooqui
c0d59fe4cc plugins/wss-proxy: Adding WSS Proxy plugin 2024-04-22 09:12:09 +09:30
daywalker90
fe180e189c msggen: add low level openchannel methods
Changelog-None
2024-04-22 09:04:43 +09:30
daywalker90
70faab55e4 msggen: fix for methods that contain '_' in their name 2024-04-22 09:04:43 +09:30
Rusty Russell
a55c0d005d spelling: its listinvoices and listinvoicerequests
Not singular (though we used to have a listinvoice, removed in v0.6.1).

Reported-by: "Plant" via email
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-20 10:49:50 -04:00
Rusty Russell
cd7175be88 lightningd: use return value of peer_start_channeld()
It tells us if it's failed, so we should use that rather than
reporting failure twice.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-20 16:36:57 +09:30
Rusty Russell
86c29b6acc lightningd: trivial cleanup: use tmpctx.
No need to explicitly free this var, we can use tmpctx.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-20 16:36:57 +09:30
Rusty Russell
901342b50d pyln-testing: require explicit pattern for BROKEN messages.
Rather than `allow_broken_log`, we have `broken_log` which is a regex
indicating what log lines are expected.  This tightens our tests
significantly, as it will catch *unexpected* brokenness.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-20 16:36:57 +09:30
daywalker90
ada4de1588 msggen: fix walk through nested json schemas
Changelog-None
2024-04-18 18:16:30 +02:00
daywalker90
507c2de9c1 newaddr: various fixes for msggen and docs
Changelog-None
2024-04-17 14:47:52 +02:00
daywalker90
9ad5c6bc75 msggen: use field numbers from .msggen.json for rust model if available 2024-04-17 14:47:52 +02:00
daywalker90
58b78d2b32 schema: add multifundchannel generation
Changelog-None
2024-04-17 13:06:02 +02:00
daywalker90
4d306e2691 mssgen: preserve existing camel cases
an edge case like MultifundchannelChannel_idsChannel_type
was previously converted to MultifundchannelChannelIdschannelType
instead of the correct MultifundchannelChannelIdsChannelType
2024-04-17 13:06:02 +02:00
Rusty Russell
c4edec8e22 plugins/clnrest: simple wrapper to handle missing python3.
Apparently NixOS didn't have Python (sometimes!) so let's not assume.
By reusing the JSON "parsing" code from cowsay, we can self-disable
to handle this case.

Reported-by: Shahana Farooqui <shahana.farooqui@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Plugins: `clnrest` now correctly self-disables if Python not present at all.
2024-04-12 10:32:32 +02:00
Rusty Russell
7d8c723018 libplugin: cleanly separate apply and unapplying payment route.
They're close, but different.  In particular:
- Removal can't fail.
- Removal is much simpler.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-04 10:31:27 +02:00
ShahanaFarooqui
aff8f0ff5e doc: Updated dev command warning
Changelog-Changed: Documentation: Merged `example_json_request` and `example_json_response` in a single `json_examples` array to maintain the request and its corresponding response together.
2024-04-04 13:16:27 +10:30
ShahanaFarooqui
9e782f491b doc: updated schemas for json_examples 2024-04-04 13:16:27 +10:30
fanquake
dbcef94d8e ci: use Bitcoin Core 26.1
Changelog-None
2024-04-04 12:53:44 +10:30
Jesse de Wit
09d6bb9aed tests: add test_pay_avoid_low_fee_chan
Tests whether we're able to route around a low-fee channel in the graph. We
should be able to find the more expensive route if the cheaper route is
depleted.
2024-04-04 12:49:57 +10:30
Jesse de Wit
3b139277f5 pay: fix removal of channel hint estimated capacity
Changelog-Fixed: Plugins: pay now correctly estimates channel capacity
after payment failure, fixing some retry cases.

The `estimated_capacity` was properly substracted from the channel
hint, but adding the amount back did not work. The amount was added back
and then immediately substracted again. This caused the
`estimated_capacity` to ever decrease. This commit makes sure re-adding
the amount to the `estimated_capacity` works as expected.
2024-04-04 12:49:57 +10:30
Lagrang3
bb31856b80 remove is_local variable from listpeerchannels cb
is_local, ie. "is this side of the channel ours?" is not needed since we
can determine that predicate by evaluating
`scidd->dir == node_id_idx(self, peer)`
2024-04-03 10:07:13 +10:30
Lagrang3
22a70339de renepay: limit arc capacities by htlc_max
In the Min. Cost Flow solver we put a constraint on arcs capacities,
such that the total flow that can be allocated through a channel does
not exceed htlc_max. This solves two previous problem of the htlc_max
constraint at the MCF level.
2024-04-03 10:07:13 +10:30
Lagrang3
56ac5eebef add more fields to gossmods_listpeerchannels
Add spendable/receivable and is_local fields to the callback function
used in gossmods_from_listpeerchannels. This allows to do more fine
grained use of the listpeerchannels call.
The first use case is renepay, for which we need to ignore the htlc_max
of the local channels only.
2024-04-03 10:07:13 +10:30
Rusty Russell
5b76c2fbfa lightningd: fix memleak where we didn't free plugin_hook_request when it was finished.
Covered up by notleak() :(

Changelog-Fixed: lightingd: slow memory leak when using plugin hooks fixed (introduced in v23.11)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-03 08:48:46 +10:30
Rusty Russell
9a4be1a4ac lightningd: don't allow mindepth != 0 if they specify channel_type zeroconf.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: JSON-RPC: `fundchannel_start` now disallows a non-zero `mindepth` parameter if you ask for a zeroconf `channel_type`.
2024-04-01 13:20:53 +02:00
Rusty Russell
06136ed3e3 fundchannel_start: delay, don't refuse, if node not synced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-01 13:20:53 +02:00
Rusty Russell
f3cedb9aa7 pytest: rename lightning nodes to reduce confusion.
I was trying to debug test_zeroconf_open and getting very confused.
The reason: l0 is lightning-1, l1 is lightning-2, etc!  And there are
two other tests where an l0 has been added at the front: fix them all
to avoid future confusion!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-01 13:20:53 +02:00
Rusty Russell
2a92ccf9f2 openchannel_bump: delay, don't refuse, if node not synced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-01 13:20:53 +02:00
Rusty Russell
b9b86ca526 openchannel: delay, don't refuse, if node not synced.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-01 13:20:53 +02:00
Rusty Russell
239f1a6ee6 lightningd: debug log when we send a notification to a command.
For testing.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-04-01 13:20:53 +02:00