Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream tx size-ish checks from Consensus #4820

Open
amesgen opened this issue Jan 7, 2025 · 0 comments
Open

Upstream tx size-ish checks from Consensus #4820

amesgen opened this issue Jan 7, 2025 · 0 comments

Comments

@amesgen
Copy link
Member

amesgen commented Jan 7, 2025

Since IntersectMBO/ouroboros-consensus#1175, the Mempool needs to be able to run all size-related checks (tx byte size, execution units, ref scripts) separately from (namely before) regular tx validation. Currently, this logic is implemented in Consensus (in Ouroboros.Consensus.Shelley.Ledger.Mempool, but this rather belongs into the Ledger, where it can be shared with the regular tx validation.

github-merge-queue bot pushed a commit to IntersectMBO/ouroboros-consensus that referenced this issue Jan 8, 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant