Skip to content
Unverified Commit ace62f12 authored by Michal Kucharczyk's avatar Michal Kucharczyk Committed by GitHub
Browse files

`fatxpool`: size limits implemented (#6262)

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]>
parent b601d57a
Pipeline #505097 waiting for manual action with stages
in 1 hour, 11 minutes, and 23 seconds