Ancestor Limit

Revision as of 05:27, 22 April 2022 by Todd Price (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In the first iteration of the Bitcoin software, bitcoind v0.1.0 handled the creation of blocks fairly simply. Once a second or so, the software would take a memory map of all the transactions it had received, check any new ones to ensure they met the minimum fee requirement set for the node and if so, add them to the block template which was basically an ordered list of valid transactions. It would then calculate a merkle tree from that set of transactions and build a block header to start doing proof of work upon.

Because of the arbitrary 1MB block size limit imposed on the software at a later time, the software was then optimized to select transactions for block building with the highest fee rates until the 1MB block size limit was filled. Due to this accounting and other policy based limitations, the software inefficiently added transactions to block templates.

This inefficiency manifested in a big way when creating long chains of descendant transactions prior to a block being found. Descendant transactions refers to transactions that are added to a node's mempool that are dependent on previous transactions that are also in that node's mempool. Because the older Bitcoin software was designed around 1MB blocks, situations arose where these long chains of transactions had to be split across multiple blocks.

Starting in October 2015, the BTC Core developers introduced a rule in bitcoin v0.12 to account for this inefficiency by limiting the number of descendants a coin could have to 25. This limit, also called the Ancestor Limit, rejected any transactions that violated this rule with error code 64: too-long-mempool-chain. Bitcoin SV Node v1.0.7 raised this default limit to 1000, and plan to remove the limit entirely soon. Since this restriction is miner policy, miners are free to raise this limit themselves as well.

Ancestor Limit Performance Comparison for Bitcoin SV Node 1.0.7


In the above graphic, you can see the performance increase for long chain submission to the node software in v1.0.7.