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: add mixed batches as an option #791

Merged
merged 6 commits into from
Aug 21, 2024

Commits on Aug 21, 2024

  1. sweepbatcher: coopSignBatchTx accepts wire.MsgTx

    ... instead of psbt.Packet.
    
    Make the code simpler. Function worked with packet.UnsignedTx only,
    so it is easier to pass tx directly.
    starius committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    5cd6c0c View commit details
    Browse the repository at this point in the history
  2. sweepbatcher: factor out method createPsbt

    Unload method publishBatchCoop. Also this code will be reused in new method
    for mixed batches soon.
    starius committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    2c2c427 View commit details
    Browse the repository at this point in the history
  3. test/signer_mock: return signatures of real size

    Size of a signature affects the weight of transaction, which is verified
    in tests.
    
    Also method SignOutputRaw now returns the number of signatures matching
    the number of signature descriptors to prevent crashes in tests where
    multiple inputs are signed.
    starius committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    58d9445 View commit details
    Browse the repository at this point in the history
  4. sweepbatcher: add mixed batches option

    Option WithMixedBatch instructs sweepbatcher to create mixed batches with regard
    to cooperativeness. Such a batch can include both sweeps signed both
    cooperatively and non-cooperatively. If cooperative signing fails for a sweep,
    transaction is updated to sign that sweep non-cooperatively and another round of
    cooperative signing runs on the remaining sweeps. The remaining sweeps are
    signed in non-cooperative (more expensive) way. If the whole procedure fails for
    whatever reason, the batch is signed non-cooperatively (the fallback).
    starius committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    26eda00 View commit details
    Browse the repository at this point in the history
  5. sweepbatcher: use coopFailed in greedy selection

    Treat coopFailed flag the same as nonCoopHint. The former is what we found in
    previos signing attempts, the later is what the caller signalled to us.
    starius committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    d007cf6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b171f76 View commit details
    Browse the repository at this point in the history