<p>There really is no better answer than &quot;wait for fees to come down&quot;. That might not be the most satisfying answer, but fees were below 2 sat/vB only a month ago, and the vast majority of transactions currently sitting in the mempool pay no more than a much more pleasant 12 sat/vB (see <a href="https://mempool.space/graphs/mempool" rel="noreferrer">mempool.space's fee distribution chart</a>).</p>
<p>Every output created has a predetermined (minimal) spending weight, which for <a href="https://bitcoin.stackexchange.com/q/48279/121614">P2PKH is 147 vB</a> (assuming the signature is grinded to 71 bytes). For <a href="https://bitcoin.stackexchange.com/q/100159/121614">P2WPKH it's only 67.75 vB</a>, but as you correctly understand, that doesn't make your pre-SegWit outputs any cheaper to spend. Since a transaction's fee is the product of its weight and fee rate, and there's nothing you can do about the weight, your only option is to set a low fee rate.</p>

CC BY-SA 4.0
2023-12-01T12:33:37.430Z
Slightly unrelated theoretical question: Since all these outputs were created using a HD key (non-hardened), wouldn't there be a way to leverage this cryptographically speaking, that is, signing the tx globally with the Master key (parent node) and somehow embed the root derivation path root together with corresponding master pubkey, in the transaction? I understand this is not currently possible with P2PKH, but is there anything like this?
nakwa
CC BY-SA 4.0
2023-12-01T14:07:23.553Z
@nakwa Bitcoin transaction inputs require a signature per UTXO spent today. There does exist research into cross-input signature aggregation, which could one day permit spending multiple UTXOs with a single signature (even if they were created with distinct root keys, FWIW). You'd still need a separate input per UTXO though (just not a signature *per* input), so the cost savings for this top out at ~20% or so.
Pieter Wuille
CC BY-SA 4.0
2023-12-01T04:31:27.963Z
2023-12-01T04:44:54.080Z
2023-12-01T04:44:54.080Z
Vojtěch Strnad
<p>I have thousands of UTXOs that were created for experimental purposes back in 2016, programmatically, using P2PKH transactions, each generating hundreds of 10K-ish sat outputs.</p>
<p>Since these are now worth a few thousands $, I'd like to consolidate these outputs (and retrieve them to some wallet for convenience).</p>
<p>However, given the current fee market (on avg, above 50sat/vB, for a while now), each transaction I attempted to build turns out to be super heavy and hence requires paying fees that amount for more than 60% of the total value transacted (or it'd be stuck in the mempool forever).</p>
<p>As far as I understand, because the inputs all have P2PKH scripts, there is no way to use SegWit, Taproot, and so on.</p>
<p>Any suggestion on how to handle this situation?</p>
<p>Thanks!</p>

CC BY-SA 4.0
2023-12-02T11:45:27.640Z
Related: https://bitcoin.stackexchange.com/q/80213/121614
Vojtěch Strnad
<transaction-fees><utxo><p2pkh><blockspace-market><consolidation>
How can I cheaply consolidate P2PKH outputs?
nakwa
# How can I cheaply consolidate P2PKH outputs?

(Asked by: username_0 on 2023-12-01)

I have thousands of UTXOs that were created for experimental purposes back in 2016, programmatically, using P2PKH transactions, each generating hundreds of 10K-ish sat outputs.

Since these are now worth a few thousands $, I'd like to consolidate these outputs (and retrieve them to some wallet for convenience).

However, given the current fee market (on avg, above 50sat/vB, for a while now), each transaction I attempted to build turns out to be super heavy and hence requires paying fees that amount for more than 60% of the total value transacted (or it'd be stuck in the mempool forever).

As far as I understand, because the inputs all have P2PKH scripts, there is no way to use SegWit, Taproot, and so on.

Any suggestion on how to handle this situation?

Thanks!

**Tags:** transaction-fees, utxo, p2pkh, blockspace-market, consolidation

> **Comments:**
> **username_1**: Related: https://bitcoin.stackexchange.com/q/80213/121614  

---

## 1 answers

### Answer by username_1 on 2023-12-01. Score: 9 | Accepted answer

There really is no better answer than "wait for fees to come down". That might not be the most satisfying answer, but fees were below 2 sat/vB only a month ago, and the vast majority of transactions currently sitting in the mempool pay no more than a much more pleasant 12 sat/vB (see [mempool.space's fee distribution chart](https://mempool.space/graphs/mempool)).

Every output created has a predetermined (minimal) spending weight, which for [P2PKH is 147 vB](https://bitcoin.stackexchange.com/q/48279/121614) (assuming the signature is grinded to 71 bytes). For [P2WPKH it's only 67.75 vB](https://bitcoin.stackexchange.com/q/100159/121614), but as you correctly understand, that doesn't make your pre-SegWit outputs any cheaper to spend. Since a transaction's fee is the product of its weight and fee rate, and there's nothing you can do about the weight, your only option is to set a low fee rate.

> **Comments:**
> **username_0**: Slightly unrelated theoretical question: Since all these outputs were created using a HD key (non-hardened), wouldn't there be a way to leverage this cryptographically speaking, that is, signing the tx globally with the Master key (parent node) and somehow embed the root derivation path root together with corresponding master pubkey, in the transaction? I understand this is not currently possible with P2PKH, but is there anything like this?  
> **username_2**: @username_0 Bitcoin transaction inputs require a signature per UTXO spent today. There does exist research into cross-input signature aggregation, which could one day permit spending multiple UTXOs with a single signature (even if they were created with distinct root keys, FWIW). You'd still need a separate input per UTXO though (just not a signature *per* input), so the cost savings for this top out at ~20% or so.  

---

