Skip to content
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: always enabled mixed batches #882

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

starius
Copy link
Collaborator

@starius starius commented Jan 31, 2025

Mixed batches approach covers the case where all the inputs are cooperative (function publishBatchCoop) and it is better than fully non-cooperative case (function publishBatch), but it can also create such transaction if needed, i.e. if all the sweeps are non-cooperative. So we can remove functions publishBatch, publishBatchCoop, option WithMixedBatch and associated code in greedy batch selection algorithm.

This simplifies the code ahead of the upcoming changes.

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

@starius starius force-pushed the always-mixed-batches branch from 15b73a5 to 8413f80 Compare January 31, 2025 22:03
@starius starius marked this pull request as ready for review February 1, 2025 00:36
@starius starius requested review from hieblmi and bhandras February 1, 2025 00:36
Mixed batches approach covers the case where all the inputs are cooperative
(function publishBatchCoop) and it is better than fully non-cooperative case
(function publishBatch), but it can also create such transaction if needed, i.e.
if all the sweeps are non-cooperative. So we can remove functions publishBatch,
publishBatchCoop, option WithMixedBatch and associated code in greedy batch
selection algorithm.
@starius starius force-pushed the always-mixed-batches branch from 8413f80 to 2c38de1 Compare February 5, 2025 19:18
Copy link
Collaborator

@hieblmi hieblmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I missed why there were two different batches live in the first place. Isn't the mixed batcher just a more generalized coop-batcher?

@starius
Copy link
Collaborator Author

starius commented Feb 6, 2025

I missed why there were two different batches live in the first place. Isn't the mixed batcher just a more generalized coop-batcher?

@hieblmi yes, the mixed batcher is a generalized coop-batcher and it is also a generalized noncoop-batcher. It can produce both these variants when possible/needed.

Copy link
Member

@bhandras bhandras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍨

@starius starius merged commit 1f07c37 into lightninglabs:master Feb 6, 2025
4 checks passed
@starius starius deleted the always-mixed-batches branch February 6, 2025 23:36
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