core-lightning/lightningd
Rusty Russell 54bcb10227 lightningd: fix bolt11 parsing in preapproveinvocie, sendonion, listsendpays and renepay
Since bolt11_decode now insists that any `lightning:` prefix be removed, we need
to make sure to use param_invstring not param_string for all bolt11 parameters:

```
2023-08-07T05:55:32.515Z **BROKEN** lightningd: FATAL SIGNAL 6 (version v23.08rc1-21-g0bf5ee6)
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: common/daemon.c:38 (send_backtrace) 0x55dd94934154
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: common/daemon.c:75 (crashdump) 0x55dd949342e6
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 ((null)) 0x7f5cf5a3bcef
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:44 (__pthread_kill_implementation) 0x7f5cf5a9226b
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:78 (__pthread_kill_internal) 0x7f5cf5a9226b
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./nptl/pthread_kill.c:89 (__GI___pthread_kill) 0x7f5cf5a9226b
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ../sysdeps/posix/raise.c:26 (__GI_raise) 0x7f5cf5a3bc45
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./stdlib/abort.c:79 (__GI_abort) 0x7f5cf5a227fb
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./assert/assert.c:92 (__assert_fail_base) 0x7f5cf5a2271a
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: ./assert/assert.c:101 (__GI___assert_fail) 0x7f5cf5a33595
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: common/bolt11.c:734 (bolt11_decode_nosig) 0x55dd94929967
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: common/bolt11.c:953 (bolt11_decode) 0x55dd9492a44f
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: lightningd/pay.c:1730 (json_listsendpays) 0x55dd948d7d72
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:658 (command_exec) 0x55dd948b525b
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:786 (rpc_command_hook_final) 0x55dd948b5876
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: lightningd/plugin_hook.c:285 (plugin_hook_call_) 0x55dd948f6446
2023-08-07T05:55:32.515Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:874 (plugin_hook_call_rpc_command) 0x55dd948b5c77
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:984 (parse_request) 0x55dd948b6234
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: lightningd/jsonrpc.c:1090 (read_json) 0x55dd948b670f
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:59 (next_plan) 0x55dd94ac9bf4
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:407 (do_plan) 0x55dd94aca823
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ccan/ccan/io/io.c:417 (io_ready) 0x55dd94aca865
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ccan/ccan/io/poll.c:453 (io_loop) 0x55dd94accbff
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: lightningd/io_loop_with_timers.c:22 (io_loop_with_timers) 0x55dd948b33c4
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: lightningd/lightningd.c:1332 (main) 0x55dd948ba429
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ../sysdeps/nptl/libc_start_call_main.h:58 (__libc_start_call_main) 0x7f5cf5a2350f
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: ../csu/libc-start.c:381 (__libc_start_main_impl) 0x7f5cf5a235c8
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0x55dd94881e74
2023-08-07T05:55:32.516Z **BROKEN** lightningd: backtrace: (null):0 ((null)) 0xffffffffffffffff
```

Fixes: #6524
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-None: broken in master since last release.
2023-08-07 18:46:48 +09:30
..
test lightningd: pass signed tx through to close callback. 2023-08-02 07:09:28 +09:30
.gitignore Ignore all the deamon inside the git history 2021-10-28 15:51:38 +02:00
anchorspend.c Support p2tr deposit addresses 2023-07-11 11:41:15 +09:30
anchorspend.h lightningd: code to spend anchor outputs if we want to boost commitment tx. 2023-06-29 11:28:47 -04:00
bitcoind.c trace: Instrument topology functions 2023-07-28 09:21:42 +09:30
bitcoind.h lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
chaintopology.c trace: Instrument topology functions 2023-07-28 09:21:42 +09:30
chaintopology.h lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
channel.c channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
channel.h channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
channel_control.c inflights: use ctx for making new ones 2023-07-31 21:00:22 +09:30
channel_control.h lightningd: setchannel can set ignorefeelimits. 2023-07-22 13:11:08 +09:30
channel_state.h splicing: Add channel state AWAITING_SPLICE 2023-07-31 21:00:22 +09:30
closed_channel.c lightningd: add listclosedchannels command. 2023-03-25 15:28:02 +10:30
closed_channel.h lightningd: add listclosedchannels command. 2023-03-25 15:28:02 +10:30
closing_control.c lightningd: pass signed tx through to close callback. 2023-08-02 07:09:28 +09:30
closing_control.h lightningd: pass signed tx through to close callback. 2023-08-02 07:09:28 +09:30
coin_mvts.c lightningd: use hash map for peers instead of linked list. 2023-01-21 08:05:31 -06:00
coin_mvts.h coin_mvt: tiny, dont import lightningd header 2022-02-07 13:02:09 +10:30
configs.c lightningd: remove deprecated_apis global, put into lightningd. 2023-07-09 16:49:48 +09:30
connect_control.c lightningd: remove deprecated_apis global, put into lightningd. 2023-07-09 16:49:48 +09:30
connect_control.h lightningd: tell connectd we're shutting down. 2023-02-05 20:40:47 +01:00
datastore.c lightningd: simplify datastore internal db API. 2023-07-25 14:47:12 +09:30
dual_open_control.c channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
dual_open_control.h dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
feerate.c lightningd: remove deprecated_apis global, put into lightningd. 2023-07-09 16:49:48 +09:30
feerate.h lightningd: clean up feerate handling, deprecate old terms. 2023-04-10 07:31:12 +09:30
gossip_control.c gossipd: tell lightningd about all our previous channel_updates at startup. 2023-07-29 09:44:20 +09:30
gossip_control.h gossipd: batch outpoints spent, add block height. 2022-09-24 15:22:27 +09:30
hsm_control.c channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
hsm_control.h lightningd: create small hsm_sync_req() helper for hsm queries. 2023-04-10 17:26:47 +09:30
htlc_end.c lightningd: don't crash if peer manages to spend onchain HTLC after we've abandoned upstream. 2023-07-28 10:18:32 +09:30
htlc_end.h channeld: don't calculate blinding shared secret, let lightningd do it. 2022-10-26 11:29:06 +10:30
htlc_set.c invoice: return error string from invoice_check_payment. 2023-07-26 06:55:48 +09:30
htlc_set.h Makefile: use completely separate spec-derived files for EXPERIMENTAL_FEATURES 2020-09-08 09:42:00 +09:30
invoice.c lightningd: fix bolt11 parsing in preapproveinvocie, sendonion, listsendpays and renepay 2023-08-07 18:46:48 +09:30
invoice.h invoice: return error string from invoice_check_payment. 2023-07-26 06:55:48 +09:30
io_loop_with_timers.c database: pull out database code into a new module 2022-03-05 15:03:34 +10:30
io_loop_with_timers.h lightningd/io_loop_with_timers.c: Move mainloop to its own source file, have chaintopology use it. 2019-05-31 17:57:10 +02:00
jsonrpc.c trace: First draft of API 2023-07-28 09:21:42 +09:30
jsonrpc.h lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
lightningd.c channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
lightningd.h channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
log.c lightningd: don't return to a default filter level if there are no per-file filters. 2023-08-06 14:37:49 +09:30
log.h lightningd: have opt_log_level take the log_book. 2023-07-19 19:13:57 +09:30
log_status.c lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
log_status.h lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
Makefile lightningd/common: Added --recover flag to populate HSM_secret with appropriate secret through a valid codex32 secret. 2023-07-31 11:29:59 +09:30
memdump.c lightningd: fix parent reporting for memleaks. 2023-04-10 17:26:47 +09:30
memdump.h lightningd: simplify memleak code. 2022-03-10 09:40:09 +10:30
notification.c plugins: fix shutdown notification to contain object. 2023-07-13 18:59:37 +09:30
notification.h jsonrpc: make error codes an enum. 2022-09-19 10:18:55 +09:30
offer.c lightningd: create small hsm_sync_req() helper for hsm queries. 2023-04-10 17:26:47 +09:30
onchain_control.c dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
onchain_control.h onchaind: remove 'is_replay' logic 2021-12-28 04:42:42 +10:30
onion_message.c common: update to latest onion-message spec. 2023-01-30 13:24:29 +10:30
onion_message.h common: remove support for pre v0.10.2 onionmessages. 2021-12-01 05:44:28 +10:30
opening_common.c dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
opening_common.h dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
opening_control.c lightningd: don't override fee limits in feerate_min/max, do so in callers. 2023-07-22 13:11:08 +09:30
opening_control.h lightningd: prepare internal json routines for listpeerchannels. 2023-01-13 10:42:42 +10:30
options.c splicing: Remove dependency on experimental_dual_fund 2023-08-06 12:19:42 +09:30
options.h lightningd: move listconfigs into configs.c 2023-06-20 20:08:25 +09:30
pay.c lightningd: fix bolt11 parsing in preapproveinvocie, sendonion, listsendpays and renepay 2023-08-07 18:46:48 +09:30
pay.h pay: generalize payment_succeeded(). 2023-07-26 06:55:48 +09:30
peer_control.c lightningd: pass signed tx through to close callback. 2023-08-02 07:09:28 +09:30
peer_control.h channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
peer_fd.c subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_fd.h subdaemons: remove gossipd fd from per-peer daemons. 2022-02-08 11:15:52 +10:30
peer_htlcs.c lightningd: close connection when HTLC addition times out. 2023-08-07 18:45:29 +09:30
peer_htlcs.h lightningd: fix valgrind reported leak when we exit early. 2023-01-17 14:13:45 +10:30
ping.c common: clean up json routine locations. 2022-07-15 12:24:00 -05:00
plugin.c renepay: allow it to die gracefully without crashing lightningd. 2023-08-07 17:13:29 +09:30
plugin.h lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
plugin_control.c lightningd: wire plugin command JSON id through to plugin commands. 2022-09-16 12:31:45 +09:30
plugin_control.h plugins: add command field to subcommand output. 2021-06-25 09:49:33 +09:30
plugin_hook.c common/utils: add tal_strdup_or_null helper. 2023-07-26 06:55:48 +09:30
plugin_hook.h plugin: wire JSON id for commands which caused hooks to fire. 2022-09-16 12:31:45 +09:30
routehint.c channeld: Code to implement splicing 2023-07-31 21:00:22 +09:30
routehint.h invoice: overhaul routehints to use topology.listincoming, cleanup. 2021-06-16 10:29:17 +09:30
runes.c lightningd: initialize runes way earlier, and add rune_is_ours helper. 2023-07-25 14:47:12 +09:30
runes.h lightningd: initialize runes way earlier, and add rune_is_ours helper. 2023-07-25 14:47:12 +09:30
signmessage.c lightningd: create small hsm_sync_req() helper for hsm queries. 2023-04-10 17:26:47 +09:30
subd.c dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
subd.h dual-fund: keep track of aborted requests, seamlessly restart daemon 2023-07-30 15:20:04 +09:30
wait.c wait: new command to wait on indexes. 2023-07-23 13:48:37 +09:30
wait.h wait: new command to wait on indexes. 2023-07-23 13:48:37 +09:30
watch.c lightningd/log: clean up nomenclature. 2023-07-19 19:13:57 +09:30
watch.h Remove names of parameters of callbacks which confuse gcc. 2022-08-31 12:18:28 +03:00