itest: add channel capacity assertions#1198
itest: add channel capacity assertions#1198jtobin wants to merge 1 commit intolightninglabs:masterfrom
Conversation
Summary of ChangesHello @jtobin, 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 robustness of asset transfer mechanisms by introducing new validation steps in integration tests. These steps ensure that channel capacity is correctly perceived by the responder after funding, specifically targeting and preventing issues related to the erroneous inclusion of passive assets in funding proofs. 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. 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
|
There was a problem hiding this comment.
Code Review
The pull request successfully adds assertions to the integration tests, specifically verifying the responder's view of channel capacity after funding. This directly addresses the goal of catching potential issues with passive assets being included in funding proofs, enhancing the robustness of the test suite. The changes are well-placed and consistent across the relevant test functions.
|
(Converting to draft as I haven't managed to trigger the condition in CI that I'm hoping to.) |
5363035 to
ad3fa85
Compare
ad3fa85 to
311ba7f
Compare
|
Ok, the new custom_channels_passive_assets icase should now fail in CI with an 'expected 1 funding asset, got 2' error. It should pass after lightninglabs/taproot-assets#1943 is merged. |
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds an integration test to verify that passive assets are not incorrectly included in channel funding proofs, which could lead to an incorrect channel capacity on the responder's side. The new test, testCustomChannelsPassiveAssets, correctly sets up a scenario with a passive asset and asserts the responder's view of the channel capacity and funding assets.
The implementation is clear and the test case is relevant. I've found one potential issue regarding the test's robustness which could lead to flakiness, and I've left a suggestion to address it. Otherwise, the changes look good.
|
Note that this itest uses a group key to create a passive asset, whereas the user in lightninglabs/taproot-assets#1932 did not. It doesn't actually matter here, because the effect is the same -- it was just easier to construct an itest this way. |
Adds a 'custom channels passive assets' icase asserting that passive assets aren't included amongst the funding proofs sent to a responder.
311ba7f to
9e641ba
Compare
|
(FYI this passes for taproot-assets's current 'main'.) |
Adds assertions that check a responder's view of channel capacity after funding. This should catch if passive assets have been included amongst the funding proofs (see lightninglabs/taproot-assets#1932).