2

Many blockchains have block size limits. But I am confused when it comes to Ethereum.

On one hand, I read that its block size is flexible. But on the other hand, I strongly suspect there must be a limit because otherwise overall network capacity would be impossible to handle.

2 Answers 2

1

Yes. It's not capped by the number of transactions per se, but by the amount of gas.

An Ethereum block has a maximum of 30 million units of gas.

So, in theory, if a call to a smart contract consumes almost 30 million units of gas, then maybe only that transaction would "fill" the whole block and be the only transaction in that block.

I use the example of a smart contract call/transaction because a regular transaction only consumes about 21,000 gas. So, you could fit a lot of regular transactions in a block. But when it comes to calls/transactions to smart contracts, the amount of those transactions that can fit in a single block depends on the gas that each call to the smart contract consumes.

For more details, check here:

https://www.blocknative.com/blog/ethereum-transaction-gas-limit#:~:text=The%20maximum%20size%20of%20a,limit%2C%20is%2030%20million%20gas.

1

Adding to @Jeremy's answer, EIP-1559:

expands/contracts block sizes to deal with transient congestion

Ethereum blocks are flexible because designs them to be 50% full (currently 15 million units of gas). Blocks can use more than 15M gas (up to 30M), but it will cost more to get a transaction included in the blockchain; when blocks use less than 15M gas, transaction costs decrease.

The block gas limit is Ethereum's block size. Currently, the maximum is 30M gas and the target is 15M gas.

1
  • "The block gas limit is Ethereum's block size. Currently, the maximum is 30M gas and the target is 15M gas." Is this stated anywhere in the Ethereum protocol code base? Sep 4, 2022 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.