Skip to content

Conversation

@gijswijs
Copy link
Collaborator

@gijswijs gijswijs commented Jan 8, 2026

Summary

  • Add NoOpReplayLog, a ReplayLog implementation that performs no replay protection, allowing the Router to be used without replay protection when it is not needed (e.g., for onion messaging)
  • Rename incomingCltv parameter to replayData in ProcessOnionPacket to reflect its generic nature
  • Add CLAUDE.md to gitignore

Test plan

  • Existing tests pass
  • New tests added for NoOpReplayLog in replaylog_test.go

Add NoOpReplayLog, a ReplayLog implementation that performs no replay
protection. This allows using the Router without replay protection when
it is not needed, such as for onion messaging.
Rename the parameter to be more generic since it is passed to the
ReplayLog and can store any auxiliary data, not just CLTV values.
Update godoc to explain usage with and without replay protection.
@gemini-code-assist
Copy link

Summary of Changes

Hello @gijswijs, 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 enhances the flexibility of the Router's replay protection mechanism. It introduces a NoOpReplayLog implementation, allowing the system to bypass replay protection when it's not necessary, such as in onion messaging. Additionally, a key parameter in the ProcessOnionPacket function has been generalized to accommodate diverse replay data, making the system more adaptable.

Highlights

  • New ReplayLog Implementation: Introduced NoOpReplayLog, a ReplayLog implementation that provides no replay protection. This allows the Router to operate without replay protection when it is not required, such as for onion messaging.
  • Parameter Renaming and Generalization: Renamed the incomingCltv parameter to replayData in the ProcessOnionPacket function. This change reflects its generic nature, as it can now store various auxiliary data for the ReplayLog.
  • Gitignore Update: Added CLAUDE.md to the .gitignore file.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 20823897384

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 61.731%

Totals Coverage Status
Change from base Build 19348856264: 0.5%
Covered Lines: 1013
Relevant Lines: 1641

💛 - Coveralls

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 a NoOpReplayLog for scenarios where replay protection is not needed, and refactors ProcessOnionPacket to use a more generic replayData parameter. The changes are logical and well-tested. My review focuses on ensuring adherence to the repository's style guide, particularly regarding comment formatting, line length, and the use of the require library in tests. I've provided specific suggestions to align the new code with these standards.

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🥽

Failing linter howwever.

@saubyk saubyk moved this from In progress to In review in v0.21 Jan 13, 2026
@lightninglabs-deploy
Copy link

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

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants