Skip to content

Conversation

@greged93
Copy link

@greged93 greged93 commented Aug 8, 2025

Resolves #310

@greged93 greged93 requested a review from frisitano August 8, 2025 16:19
@codspeed-hq
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]>
.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
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
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
frisitano pushed a commit that referenced this pull request Aug 18, 2025
* feat: limit rollup fee in tx pool

Signed-off-by: Gregory Edison <[email protected]>

* fix: check rollup fee

Signed-off-by: Gregory Edison <[email protected]>

* feat: limit pool tx size (#317)

* feat: add maxTxPayloadBytesPerBlock to ScrollChainConfig

Signed-off-by: Gregory Edison <[email protected]>

* feat: limit pool max tx input bytes

Signed-off-by: Gregory Edison <[email protected]>

* test: set max_tx_payload_bytes_per_block

Signed-off-by: Gregory Edison <[email protected]>

* feat: make MockEthProvider more generic

Signed-off-by: Gregory Edison <[email protected]>

* test: add pool limit tests

Signed-off-by: Gregory Edison <[email protected]>

* fix: lints

Signed-off-by: Gregory Edison <[email protected]>

---------

Signed-off-by: Gregory Edison <[email protected]>

* test: update

Signed-off-by: Gregory Edison <[email protected]>

---------

Signed-off-by: Gregory Edison <[email protected]>
frisitano added a commit that referenced this pull request Aug 18, 2025
* feat: limit rollup fee in tx pool

Signed-off-by: Gregory Edison <[email protected]>

* fix: check rollup fee

Signed-off-by: Gregory Edison <[email protected]>

* feat: limit pool tx size (#317)

* feat: add maxTxPayloadBytesPerBlock to ScrollChainConfig

Signed-off-by: Gregory Edison <[email protected]>

* feat: limit pool max tx input bytes

Signed-off-by: Gregory Edison <[email protected]>

* test: set max_tx_payload_bytes_per_block

Signed-off-by: Gregory Edison <[email protected]>

* feat: make MockEthProvider more generic

Signed-off-by: Gregory Edison <[email protected]>

* test: add pool limit tests

Signed-off-by: Gregory Edison <[email protected]>

* fix: lints

Signed-off-by: Gregory Edison <[email protected]>

---------

Signed-off-by: Gregory Edison <[email protected]>

* test: update

Signed-off-by: Gregory Edison <[email protected]>

* feat: disallow L1 messages in tx pool

Signed-off-by: Gregory Edison <[email protected]>

* test: disallow L1 messages in tx pool

Signed-off-by: Gregory Edison <[email protected]>

---------

Signed-off-by: Gregory Edison <[email protected]>
Co-authored-by: frisitano <[email protected]>
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.

3 participants