<p>There is a limit on the number of descendants a transaction which gets updated during an RBF may have. This limit is of 25 descendant, accounting for the transaction itself. (There is also a limit on the number of ancestor, and on the accumulated size of descendants and ancestors.)</p>
<p>If you try to RBF a transaction which only has 19 ancestors, it can happen that any of those 19 ancestors itself has 25 descendants. In this case the replacement will be rejected.</p>
<p>From the data you provided in private, i counted that the transaction <code>A</code> from OP didn't have 19 descendants as you expected but actually 25 (accounting for itself). This is because some of its descendants not only had one output spent by your transaction chain, but also another output spent by another transaction. That explains why your <code>bumpfee</code> attempt got rejected.</p>

CC BY-SA 4.0
2023-12-04T14:20:57.563Z
2023-12-04T14:20:57.563Z
Antoine Poinsot
<p>I have a wallet in bitcoin core 25.0 where one transaction has 19 ancestors and no descendants (the transaction IDs are obfuscated by A-T, where T is the most recent):</p>
<pre><code>$ bitcoin-cli getmempoolancestors T                                                                          
[
  &quot;L&quot;,
  &quot;J&quot;,
  &quot;S&quot;,
  &quot;H&quot;,
  &quot;O&quot;,
  &quot;R&quot;,
  &quot;M&quot;,
  &quot;K&quot;,
  &quot;I&quot;,
  &quot;Q&quot;,
  &quot;G&quot;,
  &quot;F&quot;,
  &quot;P&quot;,
  &quot;B&quot;,
  &quot;D&quot;,
  &quot;N&quot;,
  &quot;A&quot;,
  &quot;E&quot;,
  &quot;C&quot;
]
$ bitcoin-cli getmempooldescendants T
[
]
</code></pre>
<p>When I try to <code>bumpfee</code> that transaction, I get the following error:</p>
<pre><code>$ bitcoin-cli bumpfee T '{&quot;fee_rate&quot;: 418}'
error code: -4
error message:
Unable to create transaction. Transaction has too long of a mempool chain
</code></pre>
<p>This seems odd to me. The limit of 25 unconfirmed transactions is definitely not exceeded here. There is also package size restriction (max 101kvB), but that's not exceeded either. Here's the mempoolentry:</p>
<pre><code>$ bitcoin-cli getmempoolentry T
{
  &quot;vsize&quot;: 144,
  &quot;weight&quot;: 573,
  &quot;time&quot;: 1701581567,
  &quot;height&quot;: 819521,
  &quot;descendantcount&quot;: 1,
  &quot;descendantsize&quot;: 144,
  &quot;ancestorcount&quot;: 20,
  &quot;ancestorsize&quot;: 2842,
  &quot;wtxid&quot;: &quot;&lt;wtxid of T&gt;&quot;,
  &quot;fees&quot;: {
    &quot;base&quot;: 0.00011887,
    &quot;modified&quot;: 0.00011887,
    &quot;ancestor&quot;: 0.00150381,
    &quot;descendant&quot;: 0.00011887
  },
  &quot;depends&quot;: [
    &quot;S&quot;
  ],
  &quot;spentby&quot;: [
  ],
  &quot;bip125-replaceable&quot;: true,
  &quot;unbroadcast&quot;: false
}
</code></pre>
<p><code>ancestorcount</code> including the bumped tx itself is clearly 20, and the ancestor size is 2842 vB. <strong>Why can't I <code>bumpfee</code> this transaction?</strong></p>

<mempool><rpc-error-4><bumpfee>
Why can't I bumpfee a tx with 19 ancestors?
Kalle Rosenbaum
# Why can't I bumpfee a tx with 19 ancestors?

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

I have a wallet in bitcoin core 25.0 where one transaction has 19 ancestors and no descendants (the transaction IDs are obfuscated by A-T, where T is the most recent):

```
$ bitcoin-cli getmempoolancestors T                                                                          
[
  "L",
  "J",
  "S",
  "H",
  "O",
  "R",
  "M",
  "K",
  "I",
  "Q",
  "G",
  "F",
  "P",
  "B",
  "D",
  "N",
  "A",
  "E",
  "C"
]
$ bitcoin-cli getmempooldescendants T
[
]

```

When I try to `bumpfee` that transaction, I get the following error:

```
$ bitcoin-cli bumpfee T '{"fee_rate": 418}'
error code: -4
error message:
Unable to create transaction. Transaction has too long of a mempool chain

```

This seems odd to me. The limit of 25 unconfirmed transactions is definitely not exceeded here. There is also package size restriction (max 101kvB), but that's not exceeded either. Here's the mempoolentry:

```
$ bitcoin-cli getmempoolentry T
{
  "vsize": 144,
  "weight": 573,
  "time": 1701581567,
  "height": 819521,
  "descendantcount": 1,
  "descendantsize": 144,
  "ancestorcount": 20,
  "ancestorsize": 2842,
  "wtxid": "<wtxid of T>",
  "fees": {
    "base": 0.00011887,
    "modified": 0.00011887,
    "ancestor": 0.00150381,
    "descendant": 0.00011887
  },
  "depends": [
    "S"
  ],
  "spentby": [
  ],
  "bip125-replaceable": true,
  "unbroadcast": false
}

```

`ancestorcount` including the bumped tx itself is clearly 20, and the ancestor size is 2842 vB. **Why can't I `bumpfee` this transaction?**

**Tags:** mempool, rpc-error-4, bumpfee


---

## 1 answers

### Answer by username_1 on 2023-12-04. Score: 3 | Accepted answer

There is a limit on the number of descendants a transaction which gets updated during an RBF may have. This limit is of 25 descendant, accounting for the transaction itself. (There is also a limit on the number of ancestor, and on the accumulated size of descendants and ancestors.)

If you try to RBF a transaction which only has 19 ancestors, it can happen that any of those 19 ancestors itself has 25 descendants. In this case the replacement will be rejected.

From the data you provided in private, i counted that the transaction `A` from OP didn't have 19 descendants as you expected but actually 25 (accounting for itself). This is because some of its descendants not only had one output spent by your transaction chain, but also another output spent by another transaction. That explains why your `bumpfee` attempt got rejected.


---

