Skip to content

Async wallet bump #3752

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

joostjager
Copy link
Contributor

@joostjager joostjager commented Apr 28, 2025

Fixes #3540

@ldk-reviews-bot
Copy link

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

@joostjager joostjager force-pushed the async-wallet-bump branch 3 times, most recently from d9b1c75 to 873516b Compare May 1, 2025 11:08
Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 89.00709% with 62 lines in your changes missing coverage. Please review.

Project coverage is 89.53%. Comparing base (5316257) to head (15af397).

Files with missing lines Patch % Lines
lightning/src/util/sweep.rs 77.71% 27 Missing and 10 partials ⚠️
lightning/src/events/bump_transaction.rs 90.65% 10 Missing and 7 partials ⚠️
lightning/src/util/async_poll.rs 57.14% 3 Missing ⚠️
lightning-background-processor/src/lib.rs 96.22% 2 Missing ⚠️
lightning/src/ln/functional_tests.rs 96.42% 1 Missing ⚠️
lightning/src/ln/monitor_tests.rs 99.00% 1 Missing ⚠️
lightning/src/util/test_utils.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main    #3752    +/-   ##
========================================
  Coverage   89.53%   89.53%            
========================================
  Files         157      157            
  Lines      125310   125551   +241     
  Branches   125310   125551   +241     
========================================
+ Hits       112192   112409   +217     
- Misses      10429    10439    +10     
- Partials     2689     2703    +14     

☔ 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.

@joostjager joostjager force-pushed the async-wallet-bump branch 6 times, most recently from 4b4b898 to 3816c66 Compare May 5, 2025 11:37
@joostjager joostjager force-pushed the async-wallet-bump branch 5 times, most recently from a2bd643 to d35c1f4 Compare May 12, 2025 12:45
To prepare for asynchronous processing of the sweep, we need to decouple
the spending from the chain notifications. These notifications run in a
sync context and wouldn't allow calls into an async trait.

Instead we now periodically call into the sweeper, to open up the
possibility to do so from an async context if desired.
synchronous wrappers for usage in a sync context.
@joostjager joostjager force-pushed the async-wallet-bump branch 2 times, most recently from 9d7dedd to 825bd10 Compare May 13, 2025 11:26
Async closures are complicated. Preparatory commit.
Convert methods that need to be async when the wallet traits become
async.
It seems that the compiler doesn't recognize the drop and complains
that the mutex crosses an await (introduced in later commit), even
though it doesn't.
Async closures are complicated. Preparatory commit.
@joostjager joostjager force-pushed the async-wallet-bump branch from 825bd10 to 15af397 Compare May 13, 2025 11:33
@joostjager joostjager force-pushed the async-wallet-bump branch from 15af397 to b96efa9 Compare May 13, 2025 12:42
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.

Make BumpTransactionEventHandler async-optional
2 participants