-
Notifications
You must be signed in to change notification settings - Fork 123
staticaddr: dynamic deposit conf target matching legacy loop-in #1065
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
base: master
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @hieblmi, 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 updates the static address loop-in client to dynamically adapt to server-side confirmation requirements. It streamlines the process for small swaps by reducing the client's minimum confirmation threshold, intelligently prioritizes deposits based on their confirmation status, and provides clearer feedback to users when deposits require additional confirmations. These changes improve the client's efficiency and user experience when interacting with servers that implement risk-based confirmation policies. Highlights
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this 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 introduces support for dynamic server-side confirmation requirements for static address loop-ins. The client's minimum confirmation requirement is lowered to 1, and the deposit selection logic is updated to prioritize deposits with more confirmations. Additionally, the client now logs detailed information when a swap fails due to insufficient confirmations, improving user feedback. The changes look good and align with the goal of providing more flexibility for loop-in swaps. I've added a couple of minor suggestions to improve log message formatting for better readability.
| log.Warnf("Insufficient deposit confirmations, max wait: "+ | ||
| "%d blocks", confDetails.MaxBlocksToWait) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| log.Warnf(" Deposit %s: %d/%d confirmations "+ | ||
| "(need %d more blocks)", | ||
| dep.Outpoint, dep.CurrentConfirmations, | ||
| dep.RequiredConfirmations, dep.BlocksToWait) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add DepositConfirmationStatus and InsufficientConfirmationsDetails messages to support structured error responses when deposits lack sufficient confirmations for dynamic risk requirements.
- Reduce MinConfs from 6 to 1 to allow faster swap attempts for small amounts while the server enforces risk-based confirmation requirements - Update SelectDeposits to prioritize more-confirmed deposits first, increasing the likelihood of server acceptance - Add client-side logging of insufficient confirmation details from server errors, helping users understand when deposits need more confirmations
b59d0dc to
3d7e24f
Compare
Update static address loop-in client to support dynamic server-side confirmation requirements.
Changes:
Proto updates:
Backwards compatible: Clients with older servers will continue to work normally. The server determines actual confirmation requirements.