[bug]: RBF coop close silently ignores a requested delivery address that conflicts with the upfront shutdown script (classic close returns an error)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #11475 của @lmtlssss — đã đóng, không merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- blockchain, payments
Hướng nghiên cứu
Start with the SendShutdown transition and env.LocalUpfrontShutdown.Alt(msg.DeliveryAddr) in lnwallet/chancloser/rbf_coop_transitions.go, then compare with chooseDeliveryScript and ErrUpfrontShutdownScriptMismatch in peer/brontide.go. Done means the RBF closer rejects or warns on a requested address that differs from the upfront script, matching the classic path, with tests covering both cases. The issue leaves open whether to error or warn, so confirm that with maintainers first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Pre-Submission Checklist
- I have searched the existing issues and believe this is a new bug.
- I am not asking a question about how to use lnd, but reporting a bug (otherwise open a discussion).
Bug Details & Steps to Reproduce
Background
When a channel was opened with an upfront_shutdown_script, BOLT 2 requires the shutdown message to carry that committed script (02-peer-protocol.md: "if it sent a non-zero-length shutdown_scriptpubkey in open_channel or accept_channel: MUST send the same value in scriptpubkey"). So the correct on-chain behaviour, in both close flows, is that cooperative-close funds go to the upfront script. That part is fine.
The inconsistency is in how the two coop-close implementations treat an operator who asks, via CloseChannel, to close out to a different address than the upfront script.
Behaviour
Both paths are reached from rpcServer.CloseChannel, which only decodes the delivery_address and checks it is for the active network; it does not compare it against the channel's upfront script.
-
Classic closer:
chooseDeliveryScript(peer/brontide.go) compares the requested address against the upfront script and, when they differ, returnschancloser.ErrUpfrontShutdownScriptMismatch. The RPC fails with a clear error, so the operator learns the request could not be honoured. -
RBF closer: the
SendShutdowntransition usesenv.LocalUpfrontShutdown.Alt(msg.DeliveryAddr)(lnwallet/chancloser/rbf_coop_transitions.go). When an upfront script is set,Altreturns it and the requesteddelivery_addressis dropped with no comparison and no error. The close proceeds to the upfront script and the RPC succeeds, so the operator is not told their requested address was ignored.
(The existing ErrUpfrontShutdownScriptMismatch check in the RBF code validates the remote peer's script against the peer's upfront, via validateRemoteDeliveryScript — a different check from the local requested address.)
Expected Behavior
For consistency, the RBF closer should treat a non-matching requested delivery address the same way the classic closer does: return ErrUpfrontShutdownScriptMismatch (or at least surface a warning) when a delivery_address that differs from the upfront script is requested, rather than silently using the upfront script.
- Ngôn ngữ chính
- Go
- Star
- 8.2k
- Fork
- 2.3k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 103
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lightningnetwork/lnd
-
funding: failure logs print `<nil>` error and zero channel IDCó thể đã có người làm @litbot-9000 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
lightningnetwork/lnd#11676 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 85/100
lightningnetwork/lnd#11674 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
lightningnetwork/lnd#11672 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test flake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
lightningnetwork/lnd#11663 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[flake]: lnwallet/test/bitcoind.TestLightningWalletBitcoindRPCPolling/spend_unconfirmed_outputsĐang mởtest flake
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lightningnetwork/lnd#11642 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lightningnetwork/lnd
Issue tương tự
-
ConcatAgenticMessages loses the approval request ID of a streamed MCP tool callCó thể đã có người làm @ningsiyuan1024 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
containers/gvisor-tap-vsock#796 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
external needs:triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
celestiaorg/celestia-node#5448 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Azure SAS signing uses local time instead of UTC, shifting validity window on non-UTC hostsCó thể đã có người làm @huanghaoyuanhhy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
zilliztech/milvus-backup#1418 ·
Maintainer thường phản hồi trong vòng 1 ngày