How Ethereum block sizes work
An explainer showing how the block sizes work in Ethereum, and what is the maximum number of transactions in a block.
- Ethereum has a limit in each block for amount of gas used.
- Blocks are generated every 12 secs
- Before the London Ethereum blockchain upgrade, there was a fixed size block. The London upgrade introcued variable size blocks.
- There is a target of 15 million gas, but a maximum block size of 30 million (double the target block size).
- If a block has more than 15 million gas then the base fee will increase for the next block, and if it is less than 15 million the fee will reduce for the next block. This is how it tries to keep the target always at 15,000,000.
- There are four main things that contribute to gas usage in the EVM - memory usage, storage usage, transactional data, and what opcodes are run. See my guide on optimizing (reducing) gas usage in Solidity
- Eth transfers cost 21k gas (so this means a theoretical limit of just over 1400 transfers). But smart contract calls can be much more expensive (100,000 gas usage isnβt uncommon, even a million+ is not rare)
Spotted a typo or have a suggestion to make this crypto dev article better? Please let me know!
Previous post
π Solidity Auditing online quiz
Learn how to audit smart contracts by looking at some example code and trying to find the bugs
β½ Solidity Gas Optimizations Guide
How to optimize and reduce gas usage in your smart contracts in Solidity
π§ͺ Guide to testing with Foundry
Guide to adding testing for your Solidity contracts, using the Foundry and Forge tools
π Guide to UTXO
UTXO and the UTXO set (used by blockchains such as Bitcoin) explained
π Solidity Assembly Guide
Introduction guide to using assembly in your Solidity smart contracts
π¦ Ethereum EOF format explained
Information explaining what the upcoming Ethereum EOF format is all about