Skip to content

Move and Rustfmt channel acceptance and type downgrade tests #3797

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

carlaKC
Copy link
Contributor

@carlaKC carlaKC commented May 23, 2025

Depends on #3792, as requested in review.

Only last 2 commits reviewable in this PR.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented May 23, 2025

👋 I see @jkczyz was un-assigned.
If you'd like another reviewer assignemnt, please click here.

Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 95.97315% with 18 lines in your changes missing coverage. Please review.

Project coverage is 89.92%. Comparing base (7b62ea4) to head (a204e88).

Files with missing lines Patch % Lines
lightning/src/ln/channel.rs 92.91% 9 Missing ⚠️
lightning/src/ln/channel_acceptance_tests.rs 97.59% 6 Missing ⚠️
lightning/src/ln/functional_tests.rs 94.11% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3797      +/-   ##
==========================================
+ Coverage   89.91%   89.92%   +0.01%     
==========================================
  Files         160      161       +1     
  Lines      129307   129623     +316     
  Branches   129307   129623     +316     
==========================================
+ Hits       116262   116561     +299     
- Misses      10355    10370      +15     
- Partials     2690     2692       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ldk-reviews-bot ldk-reviews-bot requested a review from jkczyz May 23, 2025 18:41
@ldk-reviews-bot
Copy link

🔔 1st Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@ldk-reviews-bot
Copy link

🔔 2nd Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@carlaKC carlaKC removed the request for review from jkczyz May 28, 2025 18:52
@carlaKC
Copy link
Contributor Author

carlaKC commented May 28, 2025

Removing bot-reviewer until dependent PR is in.

@carlaKC carlaKC changed the title rustfmt: move channel acceptance tests into own file and format Move and Rustfmt channel acceptance and type Downgrade tests Jun 4, 2025
@carlaKC carlaKC changed the title Move and Rustfmt channel acceptance and type Downgrade tests Move and Rustfmt channel acceptance and type downgrade tests Jun 4, 2025
@carlaKC carlaKC force-pushed the refactor-chantype-tests branch from 26032a9 to 8e347da Compare June 4, 2025 15:54
carlaKC and others added 10 commits June 4, 2025 16:14
Useful for the commits that follow where we add more downgrade tests.
Rather than duplicating our channel type preference ordering in
downgrade logic, make a modified version of the remote peer's supported
features and remove our current channel type from it to get the next
preferred channel type.
To allow testing along the way in this PR, turn on negotiation of
zero fee channels.

Co-authored-by: Matt Corallo <[email protected]>
Sender: MUST set `feerate_per_kw` to zero
Receiver: MUST fail the channel if `feerate_per_kw` != 0

Co-authored-by: Matt Corallo <[email protected]>
Like anchor channels, these channels require that the user reserves a
UTXO to bump the channel. If we automatically accept this channel type
and the user does not have such reserve available, they are at risk of
losing funds because they cannot fee bump the channel.
@carlaKC carlaKC force-pushed the refactor-chantype-tests branch from 8e347da to a204e88 Compare June 4, 2025 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants