-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
To enforce limits, we need to co-ordinate between mempool and state so that mempool only proposes blocks within the limits enforced by state. Since the only size limit is that of the whole block, we must account for encoding overhead for how txs will be included in blocks before deciding to accept the tx in the mempool, or to include it in a proposed block.
A bug in this led to #2789 and the fix in #2792.
However we still don't have tests that ensures a block produced with txs from ReapMaxBytesMaxGas will be valid, especially if the rest of the block is full (max header size, max evidence included, max vote size ...). Such a test should have caught #2789 - a block with a full header, votes, and evidence with a single tx of max size that passed ReapMaxBytesMaxGas should have failed to validate in that case, because it wasn't accounting for the extra amino overhead fixedd in #2792.