Skip to content
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

[5/5]: lnwallet: extensions to aux leaf store to integrate custom channels #8641

Merged
merged 13 commits into from
May 27, 2024

Conversation

Copy link

coderabbitai bot commented Apr 11, 2024

Important

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to full the review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @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.

Copy link

Pull reviewers stats

Stats of the last 30 days for lnd:

User Total reviews Time to review Total comments
guggero
🥇
24
▀▀▀
2d 13h 46m
52
▀▀▀
ellemouton
🥈
12
5d 14h 33m
21
bhandras
🥉
9
30m
0
Roasbeef
7
7d 8h 43m
20
yyforyongyu
6
3h 18m
0
ziggie1984
5
3d 1h 5m
14
ProofOfKeags
4
4d 6h 3m
42
▀▀
GeorgeTsagk
4
2d 20h 31m
10
bitromortac
2
13d 3h 49m
6
saubyk
2
5h 24m
0
Chinwendu20
2
18d 5h 38m
▀▀
9
positiveblue
1
4d 21h 57m
0
AndySchroder
1
17d 9h 5m
▀▀
4
ffranr
1
14h 10m
4
Crypt-iQ
1
7d 14h 36m
4
dstadulis
1
1d 22h 10m
4
morehouse
1
2d 2h 39m
1
carlaKC
1
12h 2m
0
mohamedawnallah
1
1d 4h 44m
0

lnwallet/commitment.go Outdated Show resolved Hide resolved
lnwallet/commitment.go Outdated Show resolved Hide resolved
lnwallet/commitment.go Outdated Show resolved Hide resolved
input/script_utils.go Show resolved Hide resolved
lnwallet/commitment.go Outdated Show resolved Hide resolved
@guggero guggero force-pushed the custom-channels-integration branch 5 times, most recently from d288b6a to f7f875b Compare April 16, 2024 11:23
@guggero guggero changed the base branch from aux-leaf-fetcher to aux-leaf-signing April 16, 2024 11:23
@guggero guggero force-pushed the custom-channels-integration branch 7 times, most recently from cb514a1 to f35aead Compare April 23, 2024 20:19
@guggero guggero changed the base branch from aux-leaf-signing to 0-19-staging April 23, 2024 20:21
@guggero guggero force-pushed the custom-channels-integration branch from f35aead to cf965f0 Compare April 24, 2024 15:04
@guggero guggero changed the base branch from 0-19-staging to aux-leaf-signing April 24, 2024 15:07
@guggero guggero changed the title lnwallet: extensions to aux leaf store to integrate custom channels [5/?]: lnwallet: extensions to aux leaf store to integrate custom channels Apr 24, 2024
@guggero guggero force-pushed the custom-channels-integration branch from cf965f0 to 0e6a9dd Compare April 25, 2024 17:06
Copy link
Collaborator

@ffranr ffranr left a comment

Choose a reason for hiding this comment

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

I appreciate that each commit pretty much does one thing 👍

.golangci.yml Show resolved Hide resolved
lnwallet/channel.go Outdated Show resolved Hide resolved
rpcserver.go Show resolved Hide resolved
lnwallet/channel.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

looking good!
ideally some of the refactoring stuff could be separate, but imo it's no big deal can keep it here

CI seems to be complaining

lnwallet/channel.go Outdated Show resolved Hide resolved
rpcserver.go Show resolved Hide resolved
rpcserver.go Show resolved Hide resolved
rpcserver.go Show resolved Hide resolved
@guggero guggero force-pushed the custom-channels-integration branch 2 times, most recently from c6b7ef7 to 13828b7 Compare May 27, 2024 11:47
Base automatically changed from aux-leaf-signing to 0-19-staging May 27, 2024 13:46
We want to export some of our CLI code to re-use in other projects. But
in Golang you cannot import code from a `main` package.
So we need to move the actual code into its own package and only have
the `func main()` in the `main` package.
This commit adds an optional data parser that can inspect and in-place
format custom data of certain RPC messages.
We don't add an implementation of the interface itself, as that will be
provided by external components when packaging up lnd as a bundle with
other software.
@guggero guggero force-pushed the custom-channels-integration branch from 13828b7 to f2e71de Compare May 27, 2024 13:53
Copy link
Collaborator

@GeorgeTsagk GeorgeTsagk left a comment

Choose a reason for hiding this comment

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

Lgtm 🍃

It doesn't make sense to do multiple encode/decode round trips on the
custom data of an HTLC. So we just use the same custom record type
everywhere, which also simplifies some of the code again.
To avoid sorting issues with identical HTLCs (equal size, equal payment
hash, equal CLTV), we need to also use the HTLC index to be able to
distinguish between them.
@guggero guggero force-pushed the custom-channels-integration branch from f2e71de to d2d5064 Compare May 27, 2024 16:20
@guggero guggero merged commit be752ac into 0-19-staging May 27, 2024
22 of 27 checks passed
@guggero guggero deleted the custom-channels-integration branch May 27, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants