Commit graph

2102 commits

Author SHA1 Message Date
Matt Morehouse
f2a0fb2c5c common: saturate marginal_feerate() instead of overflowing
Some checks are pending
Continuous Integration / First Integration Tests (2/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (3/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (4/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (5/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (6/6) (push) Blocked by required conditions
Continuous Integration / Test CLN dual-fund Full Integration (push) Blocked by required conditions
Continuous Integration / Test CLN liquid Full Integration (push) Blocked by required conditions
Continuous Integration / Test CLN postgres Full Integration (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (1/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (10/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (11/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (12/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (2/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (3/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (4/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (5/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (6/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (7/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (8/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (9/12) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (1/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (2/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (3/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (4/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (5/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (6/6) (push) Blocked by required conditions
Continuous Integration / Update examples in doc schemas (push) Blocked by required conditions
Continuous Integration / Test minimum supported BTC v25.0 with clang (push) Blocked by required conditions
Continuous Integration / CI completion (push) Blocked by required conditions
Release Rust 🦀 / release_rust (push) Waiting to run
marginal_feerate() computed current_feerate * 1.1 as a double and
converted the result back to u32.  Since current_feerate is chosen by
the peer in open_channel or update_fee, they could choose an absurdly
high value that overflows u32 after the computation.  UBSan reports:

    common/fee_states.c:179:10: runtime error: 4.72446e+09 is outside the range of representable values of type 'unsigned int'
    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior common/fee_states.c:179:10

Do the arithmetic with u64 and saturate at UINT32_MAX to avoid the
undefined behavior.

Found by fuzzing with smite.

Changelog-Fixed: JSON-RPC: `listpeerchannels` no longer derives `receivable_msat` from an overflowed fee estimate when the peer sets an absurd `feerate_per_kw`.
2026-08-19 13:07:49 +02:00
Andezion
dc814ebaab configvar: don't crash on stale configvars in finalize_overrides
Some checks are pending
Continuous Integration / First Integration Tests (2/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (3/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (4/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (5/6) (push) Blocked by required conditions
Continuous Integration / First Integration Tests (6/6) (push) Blocked by required conditions
Continuous Integration / Test CLN dual-fund Full Integration (push) Blocked by required conditions
Continuous Integration / Test CLN liquid Full Integration (push) Blocked by required conditions
Continuous Integration / Test CLN postgres Full Integration (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (1/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (10/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (11/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (12/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (2/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (3/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (4/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (5/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (6/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (7/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (8/12) (push) Blocked by required conditions
Continuous Integration / Valgrind Test CLN (9/12) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (1/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (2/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (3/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (4/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (5/6) (push) Blocked by required conditions
Continuous Integration / ASan/UBSan (6/6) (push) Blocked by required conditions
Continuous Integration / Update examples in doc schemas (push) Blocked by required conditions
Continuous Integration / Test minimum supported BTC v25.0 with clang (push) Blocked by required conditions
Continuous Integration / CI completion (push) Blocked by required conditions
Release Rust 🦀 / release_rust (push) Waiting to run
Changelog-Fixed: plugins: fix crash when starting a plugin with start parameters after a previously-configured plugin option disabled itself
2026-08-17 10:09:24 +02:00
Rusty Russell
b0a7a6a92b askrene: give clearer error codes.
Add PAY_INSUFFICIENT_FUNDS and PAY_ROUTE_NOT_FOUND, and give nice
detailed errors for those.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `getroutes` can now return PAY_INSUFFICIENT_FUNDS (215) and PAY_DESTINATION_INSUFFICIENT_CAPACITY (220) error codes.
2026-08-04 18:51:43 -03:00
Lagrang3
3700f4b852 common: add helper to remove a range of elements
from a tal array.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-08-04 18:51:43 -03:00
Rusty Russell
e0f86c17c6 common: hoist amount+currency parsing into common code.
Currently used for offers, we will use it for repeatpay too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-08-04 18:51:43 -03:00
Lagrang3
dddb455d09 Add unit tests for str_to_u64
Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
2026-08-04 18:51:43 -03:00
Rusty Russell
529ae2b7b1 common: implement str_to_u64, make json_to_u64 use it.
The prior implementation could read past the end of the buffer (we actually
pad our JSON so this isn't harmful, but still).  Fix up json_to_s64 and
json_to_double too, but since they're not used as often, just copy the
string there.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-04 18:51:43 -03:00
Rusty Russell
581bbb1fb8 common: hoist hash_str helper into its own header.
We have three uses already, about to add a fourth.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-08-04 18:51:43 -03:00
Rusty Russell
a70ae963bf lightningd: internal cleanups since all non-command JSON IDs are strings.
In particular, "struct jsonrpc_request"'s id is always a string.
cmd->id isn't, though.

We can also remove the now-unused json_get_id.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-08-04 18:51:43 -03:00
Níckolas Goline
f40be19229 ecdh_hsmd: ensure HSM fd is blocking on setup
On macOS under load, socketpair fds sent via SCM_RIGHTS can have
O_NONBLOCK set (from the sender's io_new_conn call in hsmd's
pass_client_hsmfd).  This causes wire_sync_read to return NULL
with EAGAIN, killing connectd or channeld with "No hsmd ECDH response".

The fix mirrors the "Don't trust subd to set it blocking" pattern
already used in lightningd/subd.c:read_fds(): explicitly call
io_fd_block(hsm_fd, true) in ecdh_hsmd_setup.

Changelog-Fixed: connectd: fix intermittent "No hsmd ECDH response" crash on macOS under load.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-14 15:47:07 +02:00
ShahanaFarooqui
e54fe678ec common: don't trigger siphash_seed() init from span hashing either.
Previous commit stopped trace ids consuming the deterministic
randbytes stream, but tracing still touched it once: span_key_hash()
calls siphash_seed(), whose lazy init draws 16 bytes from the stream.
Since randbytes call sites are assigned their offset blocks in
first-use order, that single draw shifts every later draw in the
process by 1000 when tracing is active (HAVE_USDT builds, as in CI):
keysend preimages and invoicerequest payer keys then differ from a
build with tracing disabled, showing up as an 11-file doc-examples
diff.

Use a cheap multiplicative hash for span keys when the deterministic
override is active, so tracing touches the RNG stream zero times.
2026-07-13 18:15:06 -07:00
ShahanaFarooqui
23b4b38a54 common: don't consume deterministic randbytes stream for trace ids
Trace/span ids now come from a plain counter when CLN_DEV_ENTROPY_SEED is active, so tracing (which CI's  HAVE_USDT=1 build enables by default) no longer shifts the deterministic RNG stream that PSBT serial ids and locktime fuzz are drawn from.
2026-07-13 18:15:06 -07:00
ShahanaFarooqui
4ca60ba6e0 common: seed deterministic RNG from basename of argv0, not full path
dev_override_randbytes() hashes argv0 into the CLN_DEV_ENTROPY_SEED
stream, so every plugin and subdaemon gets a distinct seed.  But
lightningd execs them with absolute paths, so the "deterministic"
stream silently depended on where the source tree was checked out:
canned blocks generated in one directory would not replay in another
(funding tx output order and nlocktime fuzz diverge, so txids change).
This is why check-doc-examples passed locally but failed in CI.

Hash only the basename: binaries still get distinct seeds, but the
stream no longer depends on the checkout path.
2026-07-13 18:15:06 -07:00
Rusty Russell
72fd8b5cdb global: replace randombytes_buf() with randbytes() wrapper.
This allows us to override it for deterministic results.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-07-13 18:15:06 -07:00
Rusty Russell
1c925e0a25 common: add randbytes() wrapper to override cryptographic entropy: $CLN_DEV_ENTROPY_SEED
Only in developer mode, ofc.

Notes:
1. We have to move the initialization before the lightningd main trace_start,
   since that uses pseudorand().
2. To make the results stable, we need to use per-caller values to randbytes().
   Otherwise external timing changes the call order.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-07-13 18:15:06 -07:00
Níckolas Goline
281ad119b9
test: add run-close_tx to validate simple-close transaction functionality 2026-07-02 13:30:17 -03:00
Níckolas Goline
9f2f4350df
closingd: add lightning_simpleclosed for option_simple_close
New subdaemon implementing the BOLT2 simple close protocol, replacing `lightning_closingd` when `option_simple_close` is negotiated:
- Each peer independently sends `closing_complete` with their fee proposal;
- The other side signs it and sends `closing_sig`;
- Both sides broadcast two conflicting closing transactions and whichever confirms first wins.

Key protocol details:
- Closer pays the fee and closee receives their exact channel balance;
- TLV variants selected per BOLT2: `closer_output_only`, `closer_and_closee_outputs`, `closee_output_only`;
- Sequence 0xFFFFFFFD enables RBF via re-sending `closing_complete`;
- Script mismatch on `closee_scriptpubkey` warns and fails to reconnect;

common/shutdown_scriptpubkey.h/c: removed `static` from `is_valid_op_return` so it can be used in `simpleclosed.c`
2026-07-02 13:30:17 -03:00
Níckolas Goline
e362c3bb12
common/close_tx: add create_simple_close_tx() for option_simple_close
Adds the BOLT3 simple closing transaction builder:
- sequence 0xFFFFFFFD (RBF-signalling)
- locktime from closing_complete
- closer pays fee (their output is reduced)
- dust outputs are omitted and a zero-value OP_RETURN is used when both outputs would be dust.
2026-07-02 13:30:16 -03:00
Níckolas Goline
ff9e556c7c
common: add OPT_SIMPLE_CLOSE feature bit (60/61)
features.h: Reserves bits 60/61 for `option_simple_close` per BOLT2.
features.c: Add `OPT_SIMPLE_CLOSE` to `feature_styles[]` and declare the correct `feature_name`.
tests/test_closing.py: Update options on `test_simple_close_...` to include `{experimental-simple-close: None}`.
lightningd/options.c: Register noarg option for simple close.
doc/schemas/listconfigs.json: add `experimental-simple-close` to config targeting v26.08.
doc/lightningd-config.5.md: Specify `experimental-simple-close` option.
contrib/pyln-testing/pyln/testing/utils.py: Allow setting `EXPERIMENTAL_SIMPLE_CLOSE` on tests.

Generated files after modifying sources.
2026-07-02 13:30:16 -03:00
Níckolas Goline
b52d5455b3 wire/splice: rename messages and TLV fields per updated BOLTs
Rename splice→splice_init, relative_satoshis→funding_contribution_satoshis,
txsigs_tlvs→tx_signatures_tlvs, and splice_info/batch_info→funding_txid/message_type.
Consolidate three CLN-specific shim patches into extracted_peer_cln_batch_element.patch.

Changelog-None
2026-06-19 09:38:06 +09:30
Níckolas Goline
0a8a7afec0 Revert "Bolt quote updates and improvements"
Reverts commits b0e728572b through aa6ecad90e (11 commits).

This PR was accidentally merged without proper review. The `channeld.c` splice-detection logic (`is_splice_active` + txid comparison) was NACKed by @ddustin as deviating from the spec, the correct approach requires a `funding_tx_index` on the inflight rather than a `txid` comparison.

A clean replacement PR will be opened for discussion once the approach is agreed upon.

Changelog-None
2026-06-18 13:22:14 +09:30
Níckolas Goline
d218756e06 Fix tests for bolt12-decode.
new cases added by autogenerated mocks after updating the default BOLT spec version.

bolt12.c: add new rules to satisfy case `offer_chains with zero entries`.

bech32_util.c: fix padding on `from_bech32_charset` to satisfy case `Bech32 padding exceeds 4-bit limit`
2026-06-17 02:22:45 +10:00
Níckolas Goline
35d6dd6b95 Update outdated BOLT quotes in several files.
update BOLT quotes that drifted from the current spec without changing the meaning or expected functionality.
2026-06-17 02:22:45 +10:00
Níckolas Goline
1a58dd3c13 Update outdated BOLT quotes
bolt12.c:
- quote update on `bolt12_chains_match`;
- add a new condition to `offer_decode` to check if the amount is greater than 0;

run-bolt-12-encode-test.c: add check for `offer_amount > 0`

run-bolt12-format-string-test.c: update BOLT quote

bolt12-cli.c: update BOLT quote
2026-06-17 02:22:45 +10:00
Níckolas Goline
b0e728572b Update outdated BOLT quotes
common/bolt11.c: Some BOLT quotes had changed slightly.
run-bolt11.c: A test was updated to reflect nomenclature changes (from `signature recovery` to `public-key recovery`).
2026-06-17 02:22:45 +10:00
Rusty Russell
703d737dd5 xpay: don't crash on circular routehints.
We earlier fixed the cases of gossipd inserting a same-node channel,
but didn't prevent it for local modifications:

```
cln-askrene: common/gossmap.c:52: nodeidx_htable_add: Assertion `!nodeidx_htable_getmatch_(ht, k, h, v, &i)' failed.
cln-askrene: FATAL SIGNAL 6 (version v26.06rc2-5-gd389c3f-modded)
0x5c50e80dd5cb send_backtrace
        common/daemon.c:38
0x5c50e80dd685 crashdump
        common/daemon.c:83
0x70a5b1e4532f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x70a5b1e9eb2c __pthread_kill_implementation
        ./nptl/pthread_kill.c:44
0x70a5b1e9eb2c __pthread_kill_internal
        ./nptl/pthread_kill.c:78
0x70a5b1e9eb2c __GI___pthread_kill
        ./nptl/pthread_kill.c:89
0x70a5b1e4527d __GI_raise
        ../sysdeps/posix/raise.c:26
0x70a5b1e288fe __GI_abort
        ./stdlib/abort.c:79
0x70a5b1e2881a __assert_fail_base
        ./assert/assert.c:96
0x70a5b1e3b516 __assert_fail
        ./assert/assert.c:105
0x5c50e80dfb44 nodeidx_htable_add
        common/gossmap.c:52
0x5c50e80e1066 add_channel
        common/gossmap.c:515
0x5c50e80e327c gossmap_apply_localmods
        common/gossmap.c:1239
0x5c50e80bed55 do_getroutes
        plugins/askrene/askrene.c:620
0x5c50e80bf919 listpeerchannels_done
```

Reported-by: Won Hoi Kim and Ahmad Elmoursi
Changelog-Fixed: Plugins: xpay no longer crashes on circular bolt11 routehints.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-06-01 11:40:01 +02:00
Rusty Russell
3f20e58a0b common: don't use a dummy zero field for payer proofs.
Spec simplification suggested by @t-bast.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-21 11:30:15 +09:30
Rusty Russell
7b7cbf09e7 common: add test that changing any field invalidates a payer proof.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-21 11:30:15 +09:30
Rusty Russell
4d089e6f49 common: fix up test vectors' invoice_merkle_root.
Calculate proof_merkle_root properly: we accidentally printed the
`invoice_merkle_root` again here.

Reported-by: @t-bast.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-21 11:30:15 +09:30
Rusty Russell
53db80ba31 common/test: don't use an empty note field in test vectors.
It's now optional, so make it NULL here.

Reported-by: @t-bast
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-21 11:30:15 +09:30
Rusty Russell
9c07b985e2 common: extract param_string_array from xpay into common.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 15:51:05 +09:30
Sangbida Chaudhuri
2dd780c9f0 common: expose json_hex_to_be32/be64
These helper functions decode hex strings from JSON into big-endian 32-bit and 64-bit values, useful for parsing datastore entries exposing these into a more common space so they can be used by bwatch in the future.
2026-05-11 15:51:05 +09:30
Rusty Russell
988f121923 common/json_stream: use json_out_addstrn for better efficiency.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 15:51:05 +09:30
Rusty Russell
bf5ee2a6b6 common: add helpers for bitcoin blockids.
Like bitcoin_txid, they are special backwards-printed snowflakes.

Thanks Obama!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 15:51:05 +09:30
wqxoxo
e9fee876d7 setconfig: fix crash on dynamic multi-value plugin options
We had an assert(!(ot->type & OPT_MULTI)) which crashed when using
setconfig on a plugin option marked as both dynamic and multi.

The fix changes plugin_set_dynamic_opt to accept an array of values
(scalar options pass a 1-element array, multi options pass the complete
set). For multi options, setconfig replaces ALL values atomically - an
empty array clears them.

Fixes: #8295

Changelog-Fixed: setconfig no longer crashes on dynamic multi-value plugin options
2026-05-11 15:49:10 +09:30
Rusty Russell
68d700c609 pay: accept invstring as first parameter name.
If you don't use complex pay options, you can use `invstring` now and when xpay
becomes pay, there's no transition.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: JSON-RPC: `pay` now accepts `invstring` as a parameter name for `bolt11`, to ease transition when xpay takes over in v27.03.
2026-05-11 13:51:52 +09:30
Rusty Russell
427ee36dfd common: implement tal_arr_append and tal_arr_appendn, and use them.
These are useful for the common pattern of "append these bytes to this tal array".

As a bonus, we do memcheck() on all these callers, for extra checking
under valgrind.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 13:51:52 +09:30
Rusty Russell
9dda3eecb8 offers: add createproof API.
Changelog-EXPERIMENTAL: JSON-RPC: `createproof` to create a payment proof for a (successful) BOLT12 payment.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
22b0a1c9a5 bolt12: generate payer_proof JSON test vectors.
Create canonical JSON test vectors, using SUPERVERBOSE.  We remove the
ones from bolt12_merkle.c.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
325b52d29a common: routines to create and validate payer proofs.
Claude helped debug, using the LDK implementation at first, then
modified heavily.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
bc2411b52b common: expose is_signature_field as is_tlv_signature_field.
Proof code needs this.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
1189175cbc common/bolt12: use a const char * for fail reason.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
64f134063d common: add test for partial merkle tree support.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
5c851ab951 common: generalize BOLT12 merkle generation.
Allow a callback to tell us the hash of unknown branches.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
05a2693246 common: fix over-allocation in merkle tree creation.
If we have 5 fields, ilog64(5) is 3, and (1 << 3) is 8.  Adding one
made it 16.

In fact, since ilog64(4) is also 3, we should *subtract one*, but
this handles 0 more neatly (ilog64(0) is defined to return 0, as
a special case).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-05-11 11:13:55 +09:30
Rusty Russell
0c63d015d0 BOLT12: don't allow zero-amount offers.
And enhance some of our quotes to use `...` at the start to link them.
As they were, we didn't notice when a new requirement appeared in the
middle.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Rusty Russell
00ff0a0b26 bech32: check for invalid/unnecessary trailing bits.
There's a new test for bolt12 in commit 7153bed9705d7493 ("BOLT 12:
add test vector for invalid bech32 padding (#1312)") which requires us
to b stricter in decoding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Rusty Russell
5d5b012380 common: update BOLTs, reject "empty offer_chains" offers.
It's a bit moot, since we can't pay them anyway, but this brings us into line
with the test vectors.  It *did* catch that we treated empty as missing, though.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Rusty Russell
6c368a110e common: assume OPT_PAYMENT_SECRET.
This means we can assume support, but we *can't* assume it's present, because
of keysend, which doesn't use it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2026-04-30 20:09:31 +09:30
Rusty Russell
671068a55a BOLTs: more textual changes.
Attributable errors and some reordering, but nothing beyond text
changes for us.
2026-04-30 20:09:31 +09:30