Skip to content

wallet: RBF batch payments manager #9298

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

Merged
merged 1 commit into from
Mar 13, 2025
Merged

wallet: RBF batch payments manager #9298

merged 1 commit into from
Mar 13, 2025

Conversation

ecdsa
Copy link
Member

@ecdsa ecdsa commented Nov 12, 2024

note: this is not "reorg safe", meaning that there is no guarantee that all payments will end up in in the blockchain.
However, I believe this is "double send safe", meaning that we will never send a payment twice.

@ecdsa ecdsa marked this pull request as ready for review November 12, 2024 10:20
@ecdsa ecdsa force-pushed the batch_payments_manager branch from b71b11f to 45c7543 Compare November 14, 2024 09:21
@ecdsa ecdsa force-pushed the batch_payments_manager branch 13 times, most recently from a48e7ca to 5c7a247 Compare December 4, 2024 10:34
@ecdsa ecdsa added this to the 4.6.0 milestone Dec 4, 2024
@ecdsa ecdsa force-pushed the batch_payments_manager branch 13 times, most recently from 3bdbf87 to 3ad4406 Compare December 10, 2024 09:24
@ecdsa ecdsa marked this pull request as ready for review February 23, 2025 09:27
@ecdsa
Copy link
Member Author

ecdsa commented Feb 24, 2025

Note: This PR does not work well with fee settings.

When we change the fee settings in ConfirmTxDialog, this side effects the fee settings in config, which is in turn used by TxBatcher. I think we should use a FeeEstimator object that holds fee settings and provides fee estimates, without committing the settings to config.

@ecdsa ecdsa force-pushed the batch_payments_manager branch from ccb0cc3 to 3325ca1 Compare February 26, 2025 10:58
@ecdsa ecdsa force-pushed the batch_payments_manager branch 12 times, most recently from 39e40c0 to 7918670 Compare March 7, 2025 14:00
@ecdsa ecdsa force-pushed the batch_payments_manager branch 5 times, most recently from 88a16f1 to 94f4b0b Compare March 11, 2025 13:08
@ecdsa ecdsa force-pushed the batch_payments_manager branch from 94f4b0b to d2ece93 Compare March 13, 2025 09:07
The class TxBatcher handles the creation, broadcast and replacement
of replaceable transactions. Callers (LNWatcher, SwapManager) use
methods add_payment_output and add_sweep_info. Transactions
created by TxBatcher may combine sweeps and outgoing payments.

Transactions created by TxBatcher will have their fee bumped
automatically (this was only the case for sweeps before).

TxBatcher manages several TxBatches. TxBatches are created
dynamically when needed.

The GUI does not touch txbatcher transactions:
  - wallet.get_candidates_for_batching excludes txbatcher
    transactions
  - RBF dialogs do not work with txbatcher transactions

wallet:
  - instead of reading config variables, make_unsigned_transaction
    takes new parameters: base_tx, send_change_to_lighting

tests:
  - unit tests in test_txbatcher.py (replaces test_sswaps.py)
  - force all regtests to use MPP, so that we sweep transactions
    with several HTLCs. This forces the payment manager to aggregate
    first-stage HTLC tx inputs. second-stage are not batched for now.
@ecdsa ecdsa force-pushed the batch_payments_manager branch from d2ece93 to bdb7a82 Compare March 13, 2025 09:22
@spesmilo spesmilo deleted a comment from ALANthemoor Mar 13, 2025
@ecdsa ecdsa merged commit 838189a into master Mar 13, 2025
10 of 13 checks passed
@ecdsa ecdsa deleted the batch_payments_manager branch March 13, 2025 10:12
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.

4 participants