Skip to content

Revert "miner: limit block size to eth protocol msg size (#2696)"#3039

Merged
zzzckck merged 1 commit intobnb-chain:developfrom
buddh0:remove-block-size-limit
Apr 21, 2025
Merged

Revert "miner: limit block size to eth protocol msg size (#2696)"#3039
zzzckck merged 1 commit intobnb-chain:developfrom
buddh0:remove-block-size-limit

Conversation

@buddh0
Copy link
Contributor

@buddh0 buddh0 commented Apr 21, 2025

This reverts commit a28262b.

Description

Revert "miner: limit block size to eth protocol msg size (#2696)"

Rationale

Two Changes Recently:

  1. EIP-7623 Implementation
    Increased the gas cost of zero bytes from 4 to 10 gas, following EIP-7623.

  2. Gas Limit Reduction:
    The BSC gas limit is reduced from 140M to 35M.

Estimating the Maximum BSC Block Size

With the increased zero byte cost and reduced block gas limit, the maximum block size is significantly reduced, even without enforcing an explicit size cap.

  • A simple transfer transaction (21,000 gas base) with payload fully filled with zero bytes (~128KB) now costs:
    21000 + (128*1024 - 110)*10 = 1,330,620 gas ≈ 1.33M
  • Therefore, a 35M gas block can include at most:
    35M / 1.33M ≈ 26.3 ≈ 27 transactions
  • Additionally, up to 6 blobs can be included in a block.
  • So the maximum theoretical block size is:
    (27 + 6) * 128KB = 4.125MB

Conclusion

With this configuration, the maximum block size is now ~4.1MB, well below the previous soft cap of 10MB.
As a result, we no longer need to enforce the 10MB block size limit.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

@buddh0 buddh0 marked this pull request as ready for review April 21, 2025 08:18
@zzzckck zzzckck merged commit c6ef049 into bnb-chain:develop Apr 21, 2025
7 checks passed
galaio pushed a commit to galaio/bsc that referenced this pull request May 29, 2025
galaio pushed a commit to galaio/bsc that referenced this pull request May 29, 2025
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.

4 participants