Commit Graph

14893 Commits

Author SHA1 Message Date
ShahanaFarooqui
7f5282aa65 docker: Add missing git dependency for Fedora Dockerfile
Fedora image building by build-release.sh currently throws error ` git: command not found`.

Fixed it by adding git in the Dockerfile and loading the image in the script.

Changelog-None.
2024-05-24 15:07:39 -05:00
ShahanaFarooqui
0a163c456f docker: Adding Docker release action 2024-05-24 14:45:31 -05:00
Alex Myers
c9f7b78473 meta: update python versions to 24.05
Changelog-None
2024-05-23 18:09:03 -05:00
Alex Myers
d9213c305b Meta: update the changelog for 24.05rc1 2024-05-23 18:09:03 -05:00
Se7enZ
21a27cef16 doc: Including docs references for addpsbtoutput where it seems to be missing 2024-05-23 15:55:57 -05:00
Se7enZ
e5a1d9331f msggen: Include AddPsbtOutput to RPC list and meta field map; regenerate libraries 2024-05-23 15:55:57 -05:00
Lagrang3
428b23c975 renepay: relax knowledge mod
Add a payment mod that relaxes the knowledge of the uncertainty network
as a function of time.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-05-23 15:15:57 -05:00
Lagrang3
2664faea38 renepay: put global variables into renepayconfig.h
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-05-23 15:15:57 -05:00
Rusty Russell
6b91497223 common: make gossmap ignore redundant channel_announcements.
This seems to be happening to some people, so don't panic.  Unfortunately we don't have
a good error callback here, so msg to stderr.

Fixes: https://github.com/ElementsProject/lightning/issues/7249
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-23 20:23:36 +02:00
Rusty Russell
744116e501 gossipd: make extra-sure we don't put in redundant channel_announcement messages.
We only write these in two places: one where we get a message from lightningd about
our own channel, and one where we get a reply from lightningd about a txout check.

The former case we explicitly check that we don't already have it in gossmap, so
add checks to the latter case, and give verbose detail if it's found.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-23 20:23:36 +02:00
nicolas.dorier
369c0c1391 Update Dockerfile and build-release.sh to PR7214 2024-05-23 10:30:15 -05:00
nicolas.dorier
738ddc66cc Use cross compile in dockerfile, fix arm32 support 2024-05-23 10:30:15 -05:00
Rusty Russell
877df5afdd lightningd: don't ignore fee limits on mutual close.
LDK will pick the *upper* limit (see: https://github.com/lightningdevkit/rust-lightning/issues/3014)!

It should not do this, but since you can set a manual range for mutual close, it's probably better to disable this option for close, as it's even more dangerous than documented.

Changelog-Changed: config/JSON: --ignore-fee-limits / setchannel ignorefeelimits no longer applies to mutual close.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: https://github.com/ElementsProject/lightning/issues/7242
2024-05-22 08:26:51 -05:00
Rusty Russell
9556fa5210 pytest: test that ignore-fee-limits doesn't apply for mutual close.
Thought it's intuitive, it's not documented to, and LDK's current behavior makes it quite dangerous to do so.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-22 08:26:51 -05:00
Vincenzo Palazzo
fbecefe5ac offer: fix type to the getchaininfo rpc
This is violate what the docs of getchainfo is telling us that the
last_block_height is a u64.

```
2024-05-17T09:53:23.464Z **BROKEN** plugin-offers: Got error reply to getchaininfo: '{\"error\":{\"code\":-1,\"data\":null,\"message\":\"invalid type: string \\\"0\\\", expected u64\"},\"id\":\"init/offers:getchaininfo#1\",\"jsonrpc\":\"2.0\"}\n\n'
2024-05-17T09:53:23.496Z INFO    plugin-offers: Killing plugin: exited before replying to init
2024-05-17T09:53:23.496Z **BROKEN** plugin-offers: Plugin marked as important, shutting down lightningd!
2024-05-17T09:53:23.496Z DEBUG   lightningd: io_break: lightningd_exit
2024-05-17T09:53:23.496Z **BROKEN** plugin-topology: Reading JSON input: Connection reset by peer
2024-05-17T09:53:23.504Z INFO    plugin-topology: Killing plugin: exited before replying to init
2024-05-17T09:53:23.504Z **BROKEN** plugin-topology: Plugin marked as important, shutting down lightningd!
2024-05-17T09:53:23.504Z DEBUG   lightningd: io_break: lightningd_exit
2024-05-17T09:53:23.504Z DEBUG   plugin-bookkeeper: Setting up database at sqlite3://accounts.sqlite3
2024-05-17T09:53:23.504Z DEBUG   connectd: REPLY WIRE_CONNECTD_START_SHUTDOWN_REPLY with 0 fds
2024-05-17T09:53:23.504Z DEBUG   lightningd: io_break: connectd_start_shutdown_reply
```

Fixing the following crash

```
Got error reply to getchaininfo: '{"error":{"code":-1,"data":null,"message":"invalid type: string \"0\", expected u64"},"id":"init/offers:getchaininfo#1","jsonrpc":"2.0"}

'lightningd: lightningd already running? Error locking PID file: Resource temporarily unavailable
```

Fixes: 847208f5d8
Changelog-None: offer: fix type to the getchaininfo rpc
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-05-22 07:46:39 -05:00
Vincenzo Palazzo
4b4516c67c bcli: make last height optional
This is on me, and the last height is optional, and not required,
because sometimes you do not want wait the sync of the blockchain
but just get the information of the current status.

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-05-22 07:46:39 -05:00
ShahanaFarooqui
037d269a58 doc: Updating python grpcio-tool dependency
Issue: rpc documentation on the readme server is not being updated.

It is an extension of PR #7326 to fix runtime error from github actions.

Changelog-None.
2024-05-21 20:10:13 -05:00
Aditya Sharma
7fa2e9bc60 wallet: recoverchannel RPC only stubs a channel if the id is vacant in the DB as well. Closed channels are not loaded inside the peer struct, hence find_channel_by_id fails when the id is occupied by a closed channel. So we need to create a function to directly check if the ID is occupied or not. 2024-05-21 19:21:10 -05:00
ShahanaFarooqui
425b3b02e6 doc: Adding manual trigger event
Issue: rpc documentation on the readme server is not being updated.

Updating the path from `doc/**.md` to `doc/schemas/lightning-*.json` for triggering the action because all `doc/*.7.md` files are fully generated by the `tools/fromschema.py` now.

Added manual trigger event for readme's documentation update.

Changelog-None.
2024-05-21 17:43:09 -05:00
ShahanaFarooqui
8a0a9a48f1 doc: listpeerchannel typo and description fix
Suggested by: @evansmj

In Draft PRs:
7155: doc: Clarify listpeerchannels documentation.
7156: doc: Fix two typos in documentation and schema descriptions
2024-05-21 17:43:09 -05:00
Lagrang3
abfcc9bc5d renepay: clean unit tests
Delete temporary gossmap files after unit tests completion.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-05-20 16:58:49 -05:00
Lagrang3
638fff8526 renepay: fix memleak in CI
Keep a double-entry record of pending routes so that we can flag them as
not memory leaks.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-05-20 16:58:49 -05:00
Lagrang3
4b8d9116de renepay: test channel capacity unavailable
Add a test that checks `get_route` and `uncertainty_update` behaviour's
handling of missing channel capacities.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2024-05-20 16:58:49 -05:00
Alex Myers
d30b1c8dc2 unit-test: update mocks 2024-05-20 16:58:49 -05:00
Niklas Gögge
123166790f common: Fix off-by-one in from_bech32_charset
`bech32_charset_rev` is only 128 bytes in size but the `c < 0 || c > 128` check allows for `c` to be equal to 128 which would be out-of-bounds. Fix this off-by-one bug by changing the check to `c >= 128`.
2024-05-18 10:02:43 +02:00
Rusty Russell
7040d49242 renepay: fix 32-bit compilation.
```
plugins/renepay/mods.c: In function 'payment_continue':
plugins/renepay/mods.c:63:7: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
   63 |       (u64)payment_virtual_program[payment->exec_state++];
      |       ^
```

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-17 14:06:36 -05:00
Rusty Russell
e03f56fe39 bcli: fix compilation on 32-bit platforms.
Reported-by: Shahana Farooqui
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-05-17 14:06:36 -05:00
Alex Myers
8a2d6fa644 doc: update rpc docs before pushing to readme
Now that our rpc documenation is generated from schema, we need to build
the docs before trying to update the rdme contents.  The goal is to fix
the following issue with the rdme-rpc-sync workflow:

Run python .github/scripts/sync-rpc-cmds.py
lightning-addgossip		lightning-addgossip.7.md
Traceback (most recent call last):
  File .github/scripts/sync-rpc-cmds.py, line 92, in <module>
    main()
  File .github/scripts/sync-rpc-cmds.py, line 82, in main
    with open(doc/ + file) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'doc/lightning-addgossip.7.md'
2024-05-17 13:56:18 -05:00
Alex Myers
cbf343269b pytest: use reserve_unused_port even more
Uses the NodeFactory method to call reserve_unused_port
which replaced the ephemeral_port_reserve function. This
frees the reserved ports at teardown.
2024-05-17 13:56:18 -05:00
Vincenzo Palazzo
b5cfd981a1 docs: adds documentation about the log notification
Changelog-None: docs: adds documentation about the log notification
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-05-17 13:03:12 -05:00
Vincenzo Palazzo
ce70167ead core: notify plugins when a log line is emitted.
Currently make a plugin that do reportings of logs on
a services like graphana is not possible. So this commit
include the possibility to write a plugin that do the report
of this analisys.

Changelog-Added: core: notify plugins when a log line is emitted.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2024-05-17 13:03:12 -05:00
daywalker90
5430b65b4c msggen: add checkrune method 2024-05-17 16:30:43 +02:00
daywalker90
b4c061798c msggen: add blacklistrune method 2024-05-17 16:30:43 +02:00
daywalker90
473694c39a msggen: add createrune method 2024-05-17 16:30:43 +02:00
daywalker90
19646f93c6 msggen: add showrunes method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
21446c3401 msggen: add multiwithdraw method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
f83732f990 msggen: add makesecret method
Changelog-None
2024-05-17 16:30:43 +02:00
Christian Decker
36ef3db762 fixup! msggen: add listconfigs method 2024-05-17 16:30:43 +02:00
daywalker90
1dd16f72fb msggen: add listconfigs method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
bd575b51e5 msggen: fix edge cases in rust composite field names 2024-05-17 16:30:43 +02:00
daywalker90
c98185d944 tools: allow spelling of HtlcTlv 2024-05-17 16:30:43 +02:00
daywalker90
6db56180f9 msggen: allow backfilling of already deprecated fields 2024-05-17 16:30:43 +02:00
daywalker90
c9a9d62367 msggen: add listinvoicerequests, disableinvoicerequest, invoicerequest methods
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
6acfca7517 msggen: add routes to decode and decodepay
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
c8d88c9130 msggen: fix invoice request missing exposeprivatechannels
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
bd1123cf32 msggen: add help method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
5510445bbc msggen: add funderupdate method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
5047bc6dd1 msggen: add emergencyrecover, recover, recoverchannel methods
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
16c036eed8 msggen: add dev-forget-channel method
Changelog-None
2024-05-17 16:30:43 +02:00
daywalker90
a9ff3cb039 pytests: use reserve_unused_port() everywhere
Changelog-None
2024-05-16 17:31:02 +02:00