-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Merge new sweeper branch to master #8667
Conversation
To properly reflect what the method really does. We also changes the method signature so only a hash is used.
Which will be used to make the sweeper RBF-aware.
This commit modifies the sweeper store to save a `TxRecord` in db instead of an empty byte slice. This record will later be used to bring RBF-awareness to our sweeper.
Thus we can use shorter method signatures. In doing so we also remove an old TODO in one use case of `CreateSweepTx`.
This commit refactors the sweeper so the method `feeRateForPreference` is now moved to `FeePreference`, which makes our following refactor easier to handle.
This commit moves `DetermineFeePerKw` into the `Estimate` method on `FeePreference`. A few callsites previously calling `DetermineFeePerKw` without the max fee rate is now also temporarily fixed by forcing them to use `Estimate` with the default sweeper max fee rate.
Results from running, ``` gofmt -d -w -r 'FeePreference -> FeeEstimateInfo' . ```
This commit adds a new interface `FeePreference` which makes it easier to write unit tests and allows more customized implementation in following commits.
This commit refactors the grouping logic into a new interface `UtxoAggregator`, which makes it easier to write tests and opens possibility for future customized clustering strategies. The old clustering logic is kept as and moved into `SimpleAggregator`.
This commit starts tracking the state of a pending input so it's easier to control the sweeping flow and provide RBF awareness in the future.
This commit changes how a new input sweep request is handled - now we will query the mempool and see if it's already been spent. If so, we'll update its state as we may need to RBF this input.
This commit uniforms and put the deletion of pending inputs in a single point.
This commit attaches RBFInfo to an input before it's been published or it's already been published.
This commit removes the logic where we remove an input when it's been published more than 10 times. This is needed as in our future fee bumper, we might start with a low fee and rebroadcast the same input for hundred of blocks.
…ublish` Now that the refactor is done, we start patching unit tests for these two methods. Minor changes are also made based on the feedback from the tests.
So we can use the methods implemented on the chain RPC client.
sweeper This commit implements a new method, `LookupInputMempoolSpend` to do lookups in the mempool. This method is useful in the case when we only want to know whether an input is already been spent in the mempool by the time we call.
Thus this method `decideStateAndRBFInfo` won't touch the state changes of a given input.
This commit adds a new check for neutrino backend - when the inputs in the sweeping tx are spent by a third party, we will send back a `TxFailed` event to free the rest of the inputs for re-grouping.
This commit makes sure the time-sensitive outputs are swept immediately during startup.
This commit adds a test case to check the no deadline sweeping behavior. The sweeper is updated to make sure it can handle the case for neutrino backend.
This commit changes how we transform from a deadline option to a concrete deadline value - previously this is done when we decide to cluster inputs, and we now move it to a step earlier - once an input is received via `SweeperInput`, we will immediately transform its optional deadline into a real value. For inputs that come with a deadline option, since the Some will be used, it makes no difference. For inputs with None as their deadlines, we need this change to make sure the default deadlines are assigned accurately.
Important Auto Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Pull reviewers statsStats of the last 30 days for lnd:
|
72c3e06
to
f5decce
Compare
f5decce
to
4d96f9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🌊
Merge the sweeper saga to master.
Fixes #8522
Fixes #8433
Fixes #4215
Fixes #6562
Fixes #6433
Fixes #8042
Fixes #7026 (via addition of budget config)
Fixes #7390
Fixes #7554
Fixes #8370