Skip to content

Filter orphan utxos with no signing information and limit their amount #1859

@darioAnongba

Description

@darioAnongba

Currently, when the sweeping of orphan UTXOs is enabled. We attempt to sweep all of them in a single transaction without verifying whether they can be signed. This can create 2 issues:

  1. Users updating from v0.7 to v0.8 having already accumulated a significant amount of orphan UTXOs will be blocked because the signing information of these UTXOs was not persisted so the tx cannot be finalized.
  2. Users disabling the sweeping feature and accumulating many orphan UTXOs can get blocked when activating the feature because the amount of orphan UTXOs creates a non-standard tx outside of the weight limit.

Describe the solution you'd like

  1. Filter the UTXOs that have no signing information (keyFamily=0, keyIndex=0), such that they are not included in the PSBT.
  2. Limit the max number of inputs that can be swept in 1 tx. This will automatically prevent transactions from being non-standard (too big). Simply hardcore a reasonable value like 20.
  3. Activate the feature sweep-orphan-utxos by default.

Metadata

Metadata

Assignees

Type

Projects

Status

👀 In review

Relationships

None yet

Development

No branches or pull requests

Issue actions