We should change the mempool admission test from:
mempoolsize + txsize <= mempoolcapacity
to:
mempoolsize < mempoolcapacity
This would mean that as soon as there is a byte free in the mempool we add a transaction to it.
We should look out for invariants that assume that mempoolsize <= mempoolcapacity always hold.
We expect that the ledger checks the sanity of the transactions' size. We should document this expectation somewhere.
The mempool admission check can be found here.
This change should take place on top of IntersectMBO/ouroboros-network#4436.