11

Why is there block gas limit? Should it just be the sum of gas limit used by each transactions inside the block? Why do we need an extra field for it instead of calculate it?

2 Answers 2

5

The gas limit of a block defines the maximum amount of gas that all the transactions inside the block are allowed to consume. Its purpose is to keep propagation and transaction time of the block at a minimum, thereby making the network decentralized. The gas limit of a block is not fixed, it can be adjusted by the miners by some factor. It also protects the nodes from attackers who could make an effective infinite transaction loop.

https://github.com/ethereum/wiki/wiki/Design-Rationale#gas-and-fees http://gavwood.com/Paper.pdf

1

On Ethereum, the number of pending transactions that can fit into the upcoming block depends on how many units of gas each transaction in the block might spend. When miners create new blocks, the total sum of the transaction gas limits in the block must be less than the block’s gas limit.

Since the London hard fork, each block has a target size of 15 million units of gas but the actual size of a block will vary depending on network demand. The maximum size of a block, or the block gas limit, is 30 million gas.

source :

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

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.