commands: cli commands for sendonionmessage and subscribeonionmessage#10560
commands: cli commands for sendonionmessage and subscribeonionmessage#10560Abdulkbk wants to merge 3 commits intolightningnetwork:masterfrom
Conversation
In this commit we update `sendonion` to `sendonionmessage`. This clarifies the intent of the command is to send onion messages, not `sendonion` for payments which we have in `switchrpc`.
Summary of ChangesHello @Abdulkbk, 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 significantly enhances the command-line interface for the Lightning Network Daemon (LND) by integrating new commands for sending and subscribing to onion messages. These additions provide users with direct 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. Changelog
Activity
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
|
1bb0c2b to
7966b75
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces lncli commands for the SendOnionMessage and SubscribeOnionMessages RPCs, which is a great addition for interacting with onion messages. The implementation is straightforward and follows existing patterns in the codebase. I've provided a few suggestions to improve error handling and adhere to the project's style guide regarding function documentation. Overall, the changes are well-implemented.
Add CLI commands for the SendOnionMessage and SubscribeOnionMessages RPCs, allowing users to send and receive onion messages via lncli.
7966b75 to
414e98d
Compare
|
Hi @Abdulkbk I am not certain that exposing these RPCs as cli to end users is a good idea. AFAIU these RPCs should be for internal usage within the code for the extremely specific purpose of requesting a Bolt12 invoice from a node. Surfacing them to end users in such way can potentially open up the feature for other uses which we may not want to encourage. I am not sure that this is the best defense to limit the use of these RPCs, but we would at least not like to make it easy on LND. |
The reason I thought it was a good idea is that both Eclair and CLN expose equivalent CLI commands (sendonionmessage and injectonionmessage, respectively). Since the RPCs are already available on the public Lightning service, I don't think adding the CLI would hurt LND. Additionally, CLI commands are essential for testing and debugging during development. Without them, anyone working on onion message features has to write custom gRPC client code just to manually test basic send/receive flows.
There are discussions in the PR to limit the use of these RPCs, similar to other implementations that ratelimit and provide config policies for forwarding onion messages. |
|
@Abdulkbk, remember to re-request review from reviewers when ready |
Change Description
Add lncli commands for the SendOnionMessage and SubscribeOnionMessages RPCs that were introduced in #9868.
The commands follow the same pattern as the existing sendcustom/subscribecustom commands in cmd_custom.go.