Skip to content

[v0.20.x-branch] Revert backport #10331: re-org aware channel close logic#10523

Merged
Roasbeef merged 1 commit intov0.20.x-branchfrom
revert-10331-backport
Jan 26, 2026
Merged

[v0.20.x-branch] Revert backport #10331: re-org aware channel close logic#10523
Roasbeef merged 1 commit intov0.20.x-branchfrom
revert-10331-backport

Conversation

@Roasbeef
Copy link
Member

This reverts the backport of #10331 (merged via #10510).

PR #10331 introduced re-org aware channel close handling that waits for N confirmations before acting on channel closures. It also increased DefaultIncomingBroadcastDelta from 10 to 16 and MinCLTVDelta from 18 to 24 blocks.

This revert removes the chain watcher state machine changes, confirmation scaling logic, and associated tests while preserving subsequent commits (#10511, #10518).

…1-to-v0.20.x-branch"

This reverts commit 40d8b47, reversing
changes made to 0b9e8c3.
@gemini-code-assist
Copy link

Summary of Changes

Hello @Roasbeef, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request performs a full revert of a previous backport that introduced a re-organization aware channel close mechanism and adjusted several key timing parameters. The change aims to simplify the codebase by removing the complex state machine for re-org protection during channel closures and the associated confirmation scaling logic. Consequently, the system's behavior regarding channel close confirmations, HTLC expiration, and channel policy defaults is restored to its prior state.

Highlights

  • Revert Re-org Aware Channel Close Logic: This pull request fully reverts the previously backported re-organization aware channel close handling, removing the state machine that waited for multiple confirmations before processing channel closures.
  • Confirmation Scaling Logic Removed: The dedicated confirmation scaling logic for channel closes, which adjusted confirmation requirements based on channel capacity, has been removed. Cooperative closes now default to requiring 1 confirmation for RPC clients, while a simplified scaling logic for funding channels is re-embedded directly in the server configuration.
  • CLTV and Broadcast Delta Values Restored: The DefaultIncomingBroadcastDelta is reverted from 16 to 10 blocks, and MinCLTVDelta is reverted from 24 to 18 blocks, restoring previous timing parameters for HTLCs and channel policies.
  • Test Infrastructure Simplification: Several test files and a test harness related to re-org aware closing and confirmation scaling have been removed, simplifying the test suite.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully reverts the changes introduced in #10331, which aimed to implement re-org aware channel close logic. The changes correctly remove the ChannelCloseConfs configuration, the spendConfirmationState state machine, and related functions and tests. It also reverts the MinCLTVDelta and DefaultIncomingBroadcastDelta values to their previous states. The removal of the confscale package and its associated logic is thorough. The updated comments and simplified closeObserver logic reflect the removal of the re-org protection mechanism. Overall, the revert is clean and consistent across all modified files.

Copy link
Collaborator

@ziggie1984 ziggie1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending CI

@Roasbeef Roasbeef merged commit 60bc0f3 into v0.20.x-branch Jan 26, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants