Description
(Created on Aug 31, 2023 by @iljakuklic)
Mempool builds its own transaction graph. However, its view of inter-transaction dependencies is currently not fully in sync with transaction verifier. I.e. transaction verifier may require certain transaction dependency where mempool misses it. It happens with some account-based transactions.
This means there is certain amount of duplicated logic between the transaction verifier and mempool. Ideally, it would be avoided.
This has implications for block production. Not having a fully accurate picture of transaction dependencies means mempool can provide an invalid sequence of transactions to be included in the block. For the time of being, transaction verifier is employed to prevent this from happening. That is, however, quite expensive, duplicates work and would better be avoided.