Skip to content
  1. Nov 11, 2024
    • Michal Kucharczyk's avatar
      `fatxpool`: size limits implemented (#6262) · ace62f12
      Michal Kucharczyk authored
      This PR adds size-limits to the fork-aware transaction pool.
      
      **Review Notes**
      - Existing
      [`TrackedMap`](https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4/substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41)
      is used in internal mempool to track the size of extrinsics:
      
      https://github.com/paritytech/polkadot-sdk/blob/58fd5ae4
      
      /substrate/client/transaction-pool/src/graph/tracked_map.rs#L33-L41
      
      - In this PR, I also removed the logic that kept transactions in the
      `tx_mem_pool` if they were immediately dropped by the views. Initially,
      I implemented this as an improvement: if there was available space in
      the _mempool_ and all views dropped the transaction upon submission, the
      transaction would still be retained in the _mempool_.
      
      However, upon further consideration, I decided to remove this
      functionality to reduce unnecessary complexity. Now, when all views drop
      a transaction during submission, it is automatically rejected, with the
      `submit/submit_and_watch` call returning `ImmediatelyDropped`.
      
      
      Closes: #5476
      
      ---------
      
      Co-authored-by: default avatarSebastian Kunert <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      ace62f12