require loop:out perms for InstantOut#1149
Conversation
loop:out perms for InstantOut
Summary of ChangesHello, 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 improves the security posture of the InstantOut RPC by mandating additional permissions for its execution. By requiring the loop:out permission, the system ensures that only authorized clients can perform externally directed loop-out operations. The changes also include a suite of improvements to the codebase, including standardized public key parsing, more robust validation for MuSig2 signing data, and various documentation and typo fixes across the project. Highlights
New Features🧠 You can now enable Memory (public preview) 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 the 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 counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request improves MuSig2 signing validation, adds permission checks, refactors server public key parsing, and fixes various typos across the codebase. Specifically, it introduces length and nil checks for MuSig2 nonces and signatures, adds the loop:out permission requirement to the InstantOut RPC endpoint, and updates mock signing data in tests. A review comment highlights a potential issue in staticaddr/withdraw/manager.go where a missing key in depositsToIdx could lead to silent data corruption by defaulting to index 0; verifying the key's existence before usage is recommended.
5e258b6 to
48f5ce2
Compare
48f5ce2 to
e0e1da5
Compare
Summary
Why
InstantOut can now accept dest_addr and use it as the on-chain sweep destination for reservation funds. That makes it an externally directed loop-out spend path, so a macaroon with only swap:execute should not be able to redirect those funds.
Requiring loop:out aligns InstantOut with LoopOut's authorization boundary. Existing clients remain wire-compatible; the intended behavior change is that narrowly scoped macaroons must include loop:out before they can start InstantOut.
Validation