Skip to content

feat: limit pool tx size #317

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

Merged
merged 6 commits into from
Aug 13, 2025
Merged

Conversation

greged93
Copy link
Collaborator

@greged93 greged93 commented Aug 8, 2025

Resolves #310

@greged93 greged93 requested a review from frisitano August 8, 2025 16:19
Copy link

codspeed-hq bot commented Aug 8, 2025

CodSpeed Performance Report

Merging #317 will not alter performance

Comparing feat/limit-pool-tx-size (ac84c67) with feat/limit-rollup-fee (2797eb1)

Summary

✅ 77 untouched benchmarks

Signed-off-by: Gregory Edison <[email protected]>
Signed-off-by: Gregory Edison <[email protected]>
@@ -68,6 +68,7 @@ where
.with_local_transactions_config(
pool_config_overrides.clone().apply(ctx.pool_config()).local_transactions_config,
)
.with_max_tx_input_bytes(ctx.chain_spec().chain_config().max_tx_payload_bytes_per_block)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few notes:

  • Here we only check tx.input, but the overall transaction could be much larger (e.g. by including a long authorization list).
  • Also, if tx.input == max_payload_size, then we'll admin it into the txpool, but we must not include it in the block (the full serialized block must respect the same limit).

That said, this is not very critical, and the current impl seems idential to l2geth. The critical part is ensuring these limits during block building.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not aware of the second point, can always add this to the block builder, it's not much. For the first point, I think we check tx.rlp_encoding_length so this should cover the authorization list.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is here: https://github.com/scroll-tech/go-ethereum/blob/develop/miner/scroll_worker.go#L836. Yes we should add it to the block builder.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a check, this was implemented by Morty here.

@greged93 greged93 merged commit 2686f6e into feat/limit-rollup-fee Aug 13, 2025
41 checks passed
@greged93 greged93 deleted the feat/limit-pool-tx-size branch August 13, 2025 13:41
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

Successfully merging this pull request may close these issues.

2 participants