-
Notifications
You must be signed in to change notification settings - Fork 116
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
sweepbatcher: add greedy batch selection algorithm #787
sweepbatcher: add greedy batch selection algorithm #787
Commits on Jul 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 1290ebe - Browse repository at this point
Copy the full SHA 1290ebeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f1a274 - Browse repository at this point
Copy the full SHA 1f1a274View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccd1b31 - Browse repository at this point
Copy the full SHA ccd1b31View commit details -
sweepbatcher: MinFeeRate -> WithCustomFeeRate
The reason is because we want to know in advance if fee rates come from an external source or are determined by sweepbatcher internally. Also remove WithNoBumping option. It is now a part of WithCustomFeeRate: if WithCustomFeeRate is passed, automatic fee bumping by sweepbatcher is disabled.
Configuration menu - View commit details
-
Copy full SHA for e814157 - Browse repository at this point
Copy the full SHA e814157View commit details -
sweep: factor out function AddOutputEstimate
It adds output to transaction weight estimator depending on address type.
Configuration menu - View commit details
-
Copy full SHA for 019d3c6 - Browse repository at this point
Copy the full SHA 019d3c6View commit details -
sweepbatcher: add greedy batch selection algorithm
If custom fee rates are used, the algorithm is tried. It selects a batch for the sweep using the greedy algorithm, which minimizes costs, and adds the sweep to the batch. If it fails, old algorithm is used, trying to add to any batch, or starting a new batch.
Configuration menu - View commit details
-
Copy full SHA for 44d9147 - Browse repository at this point
Copy the full SHA 44d9147View commit details -
sweepbatcher: fix inaccuracies in fee estimations
Use SigHashDefault instead of SigHashAll in weight estimations. Actual code uses SigHashDefault, not SigHashAll. SigHashAll is 1wu larger. Use the actual destination address in weight estimator, not taproot always. In the test the type of address is P2WPKH, not taproot. Updated testSweepFetcher to calculate fee, fee rate and weight accurately and to compare the data observed in the published transaction with the estimates.
Configuration menu - View commit details
-
Copy full SHA for db5e0d1 - Browse repository at this point
Copy the full SHA db5e0d1View commit details -
sweepbatcher: log batcher failures
This is useful to debug. It used to fail silently.
Configuration menu - View commit details
-
Copy full SHA for f5e97c0 - Browse repository at this point
Copy the full SHA f5e97c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5dac7ca - Browse repository at this point
Copy the full SHA 5dac7caView commit details -
sweepbatcher: always fill sweep.minFeeRate
Use customFeeRate if it is provided, otherwise use wallet's EstimateFeeRate. Added flag SkipNextBump to rbfCache to avoid extra bumping upon updating fee rate externally. Fix test TestSweepBatcherCloseDuringAdding, it didn't have confTarget and failed in wallet.EstimateFeeRate call.
Configuration menu - View commit details
-
Copy full SHA for 75641c3 - Browse repository at this point
Copy the full SHA 75641c3View commit details -
sweepbatcher: always try greedy batch selection
Now that sweep.minFeeRate is always set, greedy batch selection has all needed inputs to work even without customFeeRate provider.
Configuration menu - View commit details
-
Copy full SHA for 026cf0d - Browse repository at this point
Copy the full SHA 026cf0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a61d5e - Browse repository at this point
Copy the full SHA 7a61d5eView commit details