Skip to content

staticaddr: revert dynamic conf #1096

Merged
hieblmi merged 2 commits intolightninglabs:masterfrom
hieblmi:revert-dyn-conf
Mar 13, 2026
Merged

staticaddr: revert dynamic conf #1096
hieblmi merged 2 commits intolightninglabs:masterfrom
hieblmi:revert-dyn-conf

Conversation

@hieblmi
Copy link
Collaborator

@hieblmi hieblmi commented Mar 13, 2026

No description provided.

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 reverts a set of changes that introduced dynamic confirmation requirements for static address deposits. The primary goal is to simplify the deposit handling by removing the complexity of dynamic confirmation logic. This involves restoring a fixed, higher minimum confirmation count, eliminating the RPC messages and client-side logging associated with dynamic confirmations, and adjusting the deposit selection strategy to no longer factor in confirmation counts for sorting.

Highlights

  • Minimum Confirmations Reverted: The minimum number of confirmations required for a deposit to be considered available has been reverted from 3 to 6 blocks, restoring the previous, more conservative setting.
  • Dynamic Confirmation Logic Removed: All code and RPC messages related to dynamic confirmation requirements and logging of insufficient confirmation details have been removed. This includes the InsufficientConfirmationsDetails and DepositConfirmationStatus Protobuf messages.
  • Deposit Selection Sorting Logic Updated: The SelectDeposits function's sorting algorithm has been updated. It now prioritizes deposits by larger amounts first, then by earlier expiry, removing the previous prioritization based on confirmation counts.

🧠 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.

Changelog
  • staticaddr/deposit/manager.go
    • Increased MinConfs constant from 3 to 6.
  • staticaddr/loopin/actions.go
    • Removed import of google.golang.org/grpc/status.
    • Removed the call to logInsufficientConfirmationsDetails.
    • Deleted the logInsufficientConfirmationsDetails function.
  • staticaddr/loopin/manager.go
    • Updated comments for SelectDeposits to reflect the change in sorting priority.
    • Modified the SelectDeposits sorting logic to prioritize deposit value (descending) then blocks-until-expiry (ascending), removing confirmation-based sorting.
  • staticaddr/loopin/manager_test.go
    • Updated comments in TestSelectDeposits.
    • Modified test cases in TestSelectDeposits to align with the new deposit sorting logic, specifically removing confirmation-based preferences.
  • swapserverrpc/staticaddr.pb.go
    • Removed generated code for InsufficientConfirmationsDetails and DepositConfirmationStatus messages.
    • Adjusted message and dependency indices.
  • swapserverrpc/staticaddr.proto
    • Removed InsufficientConfirmationsDetails and DepositConfirmationStatus message definitions.
Activity
  • No human activity has been recorded on this pull request yet.
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 reverts the dynamic confirmation feature for static addresses. The changes are well-executed and consistent across the codebase. Key changes include increasing the minimum confirmations for deposits to 6, which enhances security. The logic for handling dynamic confirmations, including related RPC messages and client-side processing, has been cleanly removed. The deposit selection algorithm is simplified to prioritize larger amounts and earlier expiry, which is appropriate now that dynamic confirmation counts are no longer a factor. The tests have also been updated to reflect these logic changes. Overall, this is a solid simplification of the codebase.

@hieblmi hieblmi merged commit 91d1a3e into lightninglabs:master Mar 13, 2026
9 checks passed
@hieblmi hieblmi deleted the revert-dyn-conf branch March 13, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants