Friday, September 19, 2025

mempool coverage – How a lot does the additional pool assist with lacking transactions for compact block reconstruction?

    def test_policy_rejection_types(self):
        """Check that every coverage rejection kind provides transactions to additional pool."""
        self.log.information("Testing coverage rejection sorts for additional pool...")

        self.restart_node_with_limit(depend=100)

        rejection_types = ["dust", "low_fee", "op_return_size", "nonstandard_script"]
        rejected_txs = []

        for rejection_type in rejection_types:
            self.log.information(f"Testing {rejection_type} rejection...")
            tx_info = self.create_policy_rejected_tx(rejection_type)

            tx_obj = tx_from_hex(tx_info['hex'])
            self.segwit_node.send_message(msg_tx(tx_obj))

            rejected_txs.append({
                'kind': rejection_type,
                'tx_info': tx_info,
                'txid': tx_info['tx'].hash,
                'wtxid': tx_info['tx'].getwtxid()
            })

        self.segwit_node.sync_with_ping()

        mempool = self.nodes[0].getrawmempool()
        for rejected in rejected_txs:
            assert_equal(rejected['txid'] in mempool, False)
            self.log.information(f"✓ {rejected['type']} transaction rejected from mempool")

        indices = listing(vary(len(rejected_txs)))
        tx_list = [r['tx_info'] for r in rejected_txs]

        consequence = self.send_compact_block(tx_list, indices)

        assert_equal(consequence["missing_indices"], [])
        self.log.information("✓ All rejected transactions can be found in additional pool")
    def test_extratxnpool_disabled(self):
        """Check that setting depend to 0 disables the additional transaction pool."""
        self.log.information("Testing disabled additional transaction pool (0 capability)...")

        self.restart_node_with_limit(depend=0)
        buffersize = 5
        rejected_txs = self.populate_extra_pool(buffersize)

        indices = listing(vary(buffersize))
        consequence = self.send_compact_block(rejected_txs, indices)
        assert_equal(consequence["missing_indices"], indices)
        self.log.information(f"✓ All {buffersize} transactions are lacking (additional txn pool disabled)")

These practical checks show that additional pool helps in compact block reconstruction. With the elevated restrict for blockreconstructionextratxn and addition of blockreconstructionextratxnsize in v29.120-40% rejected transactions could be cached in reminiscence and used for block reconstruction.


Observe: Additional pool evictions observe FIFO and it shops rejected transactions. So, an attacker can fill the additional pool with irrelevant transactions without charge. It can have an effect on the reminiscence utilization and compact block reconstruction.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

0FansLike
0FollowersFollow
0SubscribersSubscribe
- Advertisement -spot_img

Latest Articles