Skip to content

Add more RPCs for scid aliases#8509

Merged
guggero merged 6 commits into
lightningnetwork:0-19-stagingfrom
GeorgeTsagk:scid-alias-rpcs
May 20, 2024
Merged

Add more RPCs for scid aliases#8509
guggero merged 6 commits into
lightningnetwork:0-19-stagingfrom
GeorgeTsagk:scid-alias-rpcs

Conversation

@GeorgeTsagk
Copy link
Copy Markdown
Collaborator

@GeorgeTsagk GeorgeTsagk commented Feb 29, 2024

Change Description

This PR adds RPC methods that allow the user to manually edit the sets of aliases for channel scids.

Closes #8199
Closes lightninglabs/taproot-assets#786

@GeorgeTsagk GeorgeTsagk self-assigned this Feb 29, 2024
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 29, 2024

Important

Auto Review Skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Comment thread htlcswitch/switch.go Outdated
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This will force the switch to read all the aliases for this link again. Maybe not ideal for big scale use cases

Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Code looks pretty good, nice work.
Main comment is about the defer in the link level and about where to place the two new RPCs.

Comment thread rpcserver.go Outdated
Comment thread rpcserver.go Outdated
Comment thread itest/lnd_routing_test.go Outdated
Comment thread itest/lnd_routing_test.go Outdated
Comment thread aliasmgr/aliasmgr.go Outdated
Comment thread aliasmgr/aliasmgr.go Outdated
Comment thread aliasmgr/aliasmgr_test.go Outdated
Comment thread lnrpc/lightning.proto Outdated
Comment thread lnrpc/lightning.proto Outdated
@GeorgeTsagk GeorgeTsagk force-pushed the scid-alias-rpcs branch 3 times, most recently from c6cbb72 to 1fa023e Compare March 12, 2024 17:32
@GeorgeTsagk GeorgeTsagk requested a review from guggero March 13, 2024 12:09
Comment thread itest/lnd_routing_test.go Outdated
Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Nice work, this is very close. Just need to fix a potential deadlock and find out what the problem with the itest is.

Comment thread lnrpc/devrpc/dev.proto Outdated
Comment thread lnrpc/marshall_utils.go Outdated
Comment thread lnrpc/marshall_utils.go Outdated
Comment thread rpcserver.go Outdated
Comment thread itest/lnd_routing_test.go Outdated
Comment thread aliasmgr/aliasmgr.go Outdated
Comment thread aliasmgr/aliasmgr.go Outdated
@GeorgeTsagk GeorgeTsagk force-pushed the scid-alias-rpcs branch 3 times, most recently from 7134e7d to 781ca9e Compare March 13, 2024 20:01
@GeorgeTsagk GeorgeTsagk requested a review from guggero March 13, 2024 20:02
@GeorgeTsagk
Copy link
Copy Markdown
Collaborator Author

Updated @guggero , most of CI should also be green now, will revisit once this run is completed

Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 🎉

Comment thread htlcswitch/switch.go Outdated
@saubyk saubyk added this to the v0.18.0 milestone Mar 14, 2024
@saubyk saubyk modified the milestones: v0.18.0, v0.18.1 Mar 26, 2024
@dstadulis
Copy link
Copy Markdown

This PR still needs review and if a pioneering review wishes to take it, please do so.

Current review capacity is critical so intention is to include it in lnd v0.18.1

@GeorgeTsagk GeorgeTsagk changed the base branch from master to custom-channels-integration April 23, 2024 12:07
@guggero guggero force-pushed the custom-channels-integration branch 2 times, most recently from a5d1e43 to 15abb14 Compare May 1, 2024 13:53
@lightninglabs-deploy
Copy link
Copy Markdown
Collaborator

@GeorgeTsagk, remember to re-request review from reviewers when ready

@guggero guggero force-pushed the custom-channels-integration branch from 15abb14 to 09b34f1 Compare May 14, 2024 07:49
@GeorgeTsagk GeorgeTsagk changed the base branch from custom-channels-integration to 0-19-staging May 16, 2024 09:07
@GeorgeTsagk GeorgeTsagk requested a review from guggero May 16, 2024 17:15
Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Sorry, one more move of the RPC... My bad, should've communicated better.

Other than that and a few minor CI related things, this is good to go 🎉

Comment thread lnrpc/lightning.proto Outdated
Comment thread lnrpc/lightning.yaml Outdated
Comment thread lntest/rpc/lnd.go Outdated
Comment thread lntest/rpc/harness_rpc.go Outdated
Comment thread aliasmgr/aliasmgr.go Outdated
Comment thread docs/release-notes/release-notes-0.18.0.md Outdated
Copy link
Copy Markdown
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

Three more small things, then we're definitely good to go!

Comment thread htlcswitch/switch.go Outdated
Comment thread lnrpc/routerrpc/router.yaml Outdated
Comment thread lnrpc/routerrpc/router_server.go Outdated
@GeorgeTsagk GeorgeTsagk requested a review from guggero May 20, 2024 14:43
Copy link
Copy Markdown
Collaborator

@guggero guggero 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 resolution of this thread 🎉

Comment thread lnrpc/routerrpc/router_server.go Outdated
Comment thread htlcswitch/switch.go Outdated
@guggero guggero force-pushed the scid-alias-rpcs branch from 98d0a43 to d9a59c6 Compare May 20, 2024 16:50
@guggero
Copy link
Copy Markdown
Collaborator

guggero commented May 20, 2024

Will merge this PR into the staging branch as soon as CI is green. Tracking remaining issues to address before merging into master here: #8769

@Crypt-iQ
Copy link
Copy Markdown
Collaborator

Looking at the linked issue above - not sure if you want to defer these patches to another PR, but should also check (ideally at RPC level) that:

  • the alias doesn't collide with a real channel (this is the up-front check - still doesn't totally negate the possibility of collision)
  • the passed-in base SCID also maps to a real channel that we own

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

7 participants