-
Notifications
You must be signed in to change notification settings - Fork 902
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
rustyrussell
wants to merge
5
commits into
ElementsProject:master
from
rustyrussell:guilt/prepare-23.05.1
Closed
Prepare 23.05.1 #6305
rustyrussell
wants to merge
5
commits into
ElementsProject:master
from
rustyrussell:guilt/prepare-23.05.1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 <[email protected]>
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 <[email protected]> Changelog-EXPERIMENTAL: Fixed crash in dual-funding.
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
rustyrussell
force-pushed
the
guilt/prepare-23.05.1
branch
2 times, most recently
from
June 5, 2023 02:45
d9c779a
to
d3eb457
Compare
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 <[email protected]> Changelog-Fixed: Fix incompatibility with LND which prevented us opening private channels Fixes: ElementsProject#6208
Signed-off-by: Rusty Russell <[email protected]>
rustyrussell
force-pushed
the
guilt/prepare-23.05.1
branch
from
June 6, 2023 02:31
d3eb457
to
484d447
Compare
EDIT: Never mind the low-hanging part. I missed the recent comment from @rustyrussell about CI. |
ACK 484d447 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does anyone see any other issues or PRs which merit inclusion?
So far:
listtransactions
([openingd: work harder to intuit OPT_SCID_ALIAS. #6304])