Skip to content

Conversation

amesgen
Copy link
Member

@amesgen amesgen commented Jan 7, 2025

With the previous logic, a tx that has less than perTxOverhead = 4 bytes less than the max tx size will be rejected by the mempool even though it is perfectly valid. This bug was introduced in #1175.

This behavior could be rather surprising for users who create a big (but not too big) tx and then can't submit it to any node.

The fix is to use the "raw" size (without adding perTxOverhead) for the check, but to still add perTxOverhead when returning the TxMeasure.

Related: This code shouldn't live in Consensus (also see the module header), cf IntersectMBO/cardano-ledger#4820.

@amesgen amesgen added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit 4fddb31 Jan 8, 2025
33 checks passed
@amesgen amesgen deleted the amesgen/shelley-mempool-txsize-check branch January 8, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants