Why is 25 the max parents a child can rescue in a child pay for parent?

I don't think I understand what DEFAULT_ANCESTOR_LIMIT = 25 means.

Does that also mean that the child transaction has 25 input utxos from those parents?


Bitcoin Core by default does not forward a transaction to its peers, when the full tree of its ancestor transactions contains more than 25 unconfirmed transactions or 101 kvB of unconfirmed transaction data. This limit helps curb spam attacks using long chains of unconfirmed transactions.

Example1: If you have no unconfirmed transactions associated with your wallet, and then send a single transaction, you may spend the unconfirmed change output of the first transaction in a second transaction. This second transaction would now have one ancestor transaction for the purpose of the above described metric.

Example2: Alice sends funds to you and Bob, but Alice's transaction itself spends outputs from two other unconfirmed transactions. If you use the transaction output sent to you by Alice, you will have an ancestor count of 3. If Bob then also spends his output in yet another transaction, his ancestor count is also 3. Your transaction is not part of Bob transaction's ancestry.

Unless you create a lot of transactions in rapid succession or always pay minimum fees even when there is a large queue of transactions waiting to be confirmed, you will not usually get to 25 ancestor transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.