You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the implementation has been like that since ZIP 401 was first implemented, and I even made a comment on the relevant line, so I'm surprised that I didn't notice the discrepancy then. The implementation using dynamic usage might be better than what is specified, but if so then we should make an explicit decision about that and update the ZIP accordingly.
The text was updated successfully, but these errors were encountered:
This interacts with #565, because when we chose 4000 (bytes) for the minimum transaction cost for mempool limiting, we were thinking of it as a minimum relative to the serialized size, not relative to the size in memory.
I also notice that CTxMemPoolEntryusesRecursiveDynamicUsage(*tx) + memusage::DynamicUsage(tx). Should the cost calculation be doing the same? Does DEFAULT_MEMPOOL_TOTAL_COST_LIMIT need to be adjusted?
daira
added a commit
to daira/zips
that referenced
this issue
Apr 16, 2023
I just noticed that our implementation of ZIP 401 (mempool size limiting) uses the
RecursiveDynamicUsage
of each transaction to calculate its cost, not the serialized size:The ZIP specifies to use the serialized size.
It looks like the implementation has been like that since ZIP 401 was first implemented, and I even made a comment on the relevant line, so I'm surprised that I didn't notice the discrepancy then. The implementation using dynamic usage might be better than what is specified, but if so then we should make an explicit decision about that and update the ZIP accordingly.
The text was updated successfully, but these errors were encountered: