Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare 23.05.1 #6305

Closed

Commits on Jun 5, 2023

  1. wallet: fix crash on listtransactions.

    We removed the (experimental-only!) annotation output in 611795b
    but we still loaded them from the db.  Turns out that we were putting bogus
    annotations into the db, and accessing out of range when loading them.
    
    Consider the following db entry in transaction_annotations:
    
    ```
    CREATE TABLE transaction_annotations (  txid BLOB, idx INTEGER, location INTEGER, type INTEGER, channel INTEGER REFERENCES channels(id), UNIQUE(txid, idx));
    ...
    INSERT INTO transaction_annotations VALUES(X'19706f9af2875508a06c7db1754ef7ecb3da745ead005992e626441e4e83465f',18,1,129,53699);
    ```
    
    Here is the corresponding entry in txs:
    
    ```
    INSERT INTO transactions VALUES(X'19706f9af2875508a06c7db1754ef7ecb3da745ead005992e626441e4e83465f',710327,966,X'02000000000101f2add69112a1d557317826120e1f4ea3bc1cbe4674d720325695b26ecfe8355d120000000000000000013634000000000000160014dca21f104359bbb81e88ed7da985549f2cd0cbc30347304402201cdc854b76c4c7523e3ca09f38a81539d3b2f7fbd9a0de6ae10b7ceaa65ed9d402205a1770058cd1ef081c77c2fe957c07a334cb3a11bc0cc502834a29c59424fe010120589da1f809d955c7af150bf53123c27ffc0a741489b5291f6be811189863ec838576a9142f188d0d973c4ad1865a619d3748340b30746e088763ac672103b7bbcd592197ba6501e7176aabd3f908d94b126ae82ab1e7a4c58f5a789782e57c820120876475527c21029bcf62114eb36758fcb1aead7e67b6f707d32f34e67816894d5211ac9f2d6ce752ae67a9144483a115219ba65c63a3844be8445f739703bea988ac686800000000',NULL,NULL);
    ```
    
    The annotation refers to output 18 of the tx, but it only has one output!
    
    However, decoding the tx shows that it spent output 18 of a previous tx, so
    that's probably where the `18` came from.
    
    Remove this logic: we can remove the remaining (clearly broken!) annotation
    adding code in another cleanup commit.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    1b4672b View commit details
    Browse the repository at this point in the history
  2. lightningd: fix DF crash from libwally update.

    Broken prior to 23.05 in 908f834:
    
    ```
    lightningd: FATAL SIGNAL 11 (version d1cf88c)
    0x56135ea0f865 send_backtrace
    	common/daemon.c:33
    0x56135ea0fa50 crashdump
    	common/daemon.c:75
    0x7f00d263bcef ???
    	./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
    0x56135e9887d9 validate_input_unspent
    	lightningd/dual_open_control.c:2632
    0x56135e989a55 handle_validate_inputs
    	lightningd/dual_open_control.c:3026
    0x56135e98a9a3 dual_opend_msg
    	lightningd/dual_open_control.c:3357
    0x56135e9df230 sd_msg_read
    	lightningd/subd.c:557
    0x56135eb0b6aa next_plan
    	ccan/ccan/io/io.c:59
    0x56135eb0c2d9 do_plan
    	ccan/ccan/io/io.c:407
    0x56135eb0c31b io_ready
    	ccan/ccan/io/io.c:417
    0x56135eb0e6b5 io_loop
    	ccan/ccan/io/poll.c:453
    0x56135e99b682 io_loop_with_timers
    	lightningd/io_loop_with_timers.c:22
    0x56135e9a230c main
    	lightningd/lightningd.c:1231
    0x7f00d262350f __libc_start_call_main
    	../sysdeps/nptl/libc_start_call_main.h:58
    0x7f00d26235c8 __libc_start_main_impl
    	../csu/libc-start.c:381
    0x56135e96ff24 ???
    	???:0
    0xffffffffffffffff ???
    	???:0
    ```
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-EXPERIMENTAL: Fixed crash in dual-funding.
    rustyrussell committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    d9fe79c View commit details
    Browse the repository at this point in the history
  3. gossipd: don't fail on gossip deletion

    Reported in ElementsProject#6270, there was an attempt to delete gossip overrunning
    the end of the gossip_store. This logs the gossip type that was attempted to be deleted and avoids an immediate crash (tombstones would be fine to
    skip over at least.)
    
    Changelog-None
    endothermicdev authored and rustyrussell committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    d26429b View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2023

  1. openingd: work harder to intuit OPT_SCID_ALIAS.

    option_scid_alias inside a channel_type allows for more private
    channels: in particular, it tells the peer that it MUST NOT allow
    routing via the real short channel id, and MUST use the alias.
    
    It only makes sense (and is only permitted!) on unannounced channels.
    
    Unfortunately, we didn't set this bit in the channel_type in v12.0
    when it was introduced, instead relying on the presence of the feature
    bit with the peer.  This was fixed in 23.05, but:
    
    1. Prior to 23.05 we didn't allow it to be set at all, and
    2. LND has a limited set of features they allow, and this isn't allowed without
       option_anchors_zero_fee_htlc_tx.
    
    We could simply drop this channel_type until we merge anchors, *but*
    that has nasty privacy implications (you can probe the real channel id).
    
    So, if we don't negotiate anchors (we don't!), we don't set this
    channel_type bit even if we want it, and *intuit* it, based on:
    
    1. Is this a non-anchor channel_type?
    2. Did we both send channel_type?
    3. Is this an unannounced channel?
    4. Did both peers announce support for scid aliases?
    
    In addition, while looking at the previous backwards-compat code, I
    realized that v23.05 violated the spec and send accept_channel with
    OPT_SCID_ALIAS if it intuited it, even if it wasn't offered.  Stop
    doing this, but allow our peers to.
    
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    Changelog-Fixed: Fix incompatibility with LND which prevented us opening private channels
    Fixes: ElementsProject#6208
    rustyrussell committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    94a7b40 View commit details
    Browse the repository at this point in the history
  2. CHANGELOG.md: update for release.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Jun 6, 2023
    Configuration menu
    Copy the full SHA
    484d447 View commit details
    Browse the repository at this point in the history