Skip to content

Commit 137a132

Browse files
authored
Update EIP-7976: Increase floor data cost to 64/64
Merged by EIP-Bot.
1 parent 13695a8 commit 137a132

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

EIPS/eip-7976.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
eip: 7976
33
title: Increase Calldata Floor Cost
4-
description: Increase the calldata floor cost to 15/60 gas per byte to reduce maximum block size
4+
description: Increase the calldata floor cost to 64/64 gas per byte to reduce maximum block size
55
author: Toni Wahrstätter (@nerolation)
66
discussions-to: https://ethereum-magicians.org/t/eip-7976-further-increase-calldata-cost/24597
77
status: Draft
@@ -13,13 +13,13 @@ requires: 7623
1313

1414
## Abstract
1515

16-
This EIP proposes an adjustment to calldata pricing by raising the floor cost from 10/40 to 15/60 gas per zero/non-zero calldata byte. This reduces the worst-case block size by ~33% with minimal impact.
16+
This EIP proposes an adjustment to calldata pricing by raising the floor cost from 10/40 to 64/64 gas per calldata byte. This reduces the worst-case block size by ~37% with minimal impact.
1717

1818
## Motivation
1919

20-
While [EIP-7623](./eip-7623.md) successfully reduced the maximum possible block size by introducing a floor cost of 10/40 gas per byte for data-heavy transactions, continued increases in gas limit demands further optimization. The current floor cost still permits relatively large data-heavy payloads that contribute to block size variance.
20+
While [EIP-7623](./eip-7623.md) successfully reduced the maximum possible block size by introducing a floor cost of 10/40 gas per byte for data-heavy transactions, continued increases in gas limit demands further optimization. The current floor cost still permits relatively large data-heavy payloads that contribute to block size variance. With 64/64 pricing, a 10 MiB uncompressed execution payload would require ~671M gas instead of ~105M gas under 10/40 pricing, providing significant headroom for gas limit increases.
2121

22-
By increasing the floor cost to 15/60 gas per byte, this proposal aims to:
22+
By increasing the floor cost to 64/64 gas per byte, this proposal aims to:
2323

2424
- Further reduce the maximum possible block size for data-heavy transactions
2525
- Create additional headroom for potential block gas limit increases
@@ -31,10 +31,12 @@ By increasing the floor cost to 15/60 gas per byte, this proposal aims to:
3131
| Parameter | Value |
3232
| ---------------------------- | ----- |
3333
| `STANDARD_TOKEN_COST` | `4` |
34-
| `TOTAL_COST_FLOOR_PER_TOKEN` | `15` |
34+
| `TOTAL_COST_FLOOR_PER_TOKEN` | `16` |
3535

3636
Let `tokens_in_calldata = zero_bytes_in_calldata + nonzero_bytes_in_calldata * 4`.
3737

38+
Let `floor_tokens_in_calldata = (zero_bytes_in_calldata + nonzero_bytes_in_calldata) * 4`.
39+
3840
Let `isContractCreation` be a boolean indicating the respective event.
3941

4042
Let `execution_gas_used` be the gas used for EVM execution with the gas refund subtracted.
@@ -51,20 +53,20 @@ tx.gasUsed = (
5153
STANDARD_TOKEN_COST * tokens_in_calldata
5254
+ execution_gas_used
5355
+ isContractCreation * (32000 + INITCODE_WORD_COST * words(calldata)),
54-
TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata
56+
TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata
5557
)
5658
)
5759
```
5860

59-
Any transaction with a gas limit below `21000 + TOTAL_COST_FLOOR_PER_TOKEN * tokens_in_calldata` or below its intrinsic gas cost (take the maximum of these two calculations) is considered invalid. This limitation exists because transactions must cover the floor price of their calldata without relying on the execution of the transaction. There are valid cases where `gasUsed` will be below this floor price, but the floor price needs to be reserved in the transaction gas limit.
61+
Any transaction with a gas limit below `21000 + TOTAL_COST_FLOOR_PER_TOKEN * floor_tokens_in_calldata` or below its intrinsic gas cost (take the maximum of these two calculations) is considered invalid. This limitation exists because transactions must cover the floor price of their calldata without relying on the execution of the transaction. There are valid cases where `gasUsed` will be below this floor price, but the floor price needs to be reserved in the transaction gas limit.
6062

6163
## Rationale
6264

63-
With [EIP-7623](./eip-7623.md)'s implementation, data-heavy transactions cost 10/40 gas per zero/non-zero byte, reducing the maximum possible EL payload size to approximately 1.07 MB (`45s_000_000/40`). This EIP further reduces this to approximately 0.72 MB (`45_000_000/60`) for non zero bytes and maintains proportional costs for non-zero bytes.
65+
With [EIP-7623](./eip-7623.md)'s implementation, data-heavy transactions cost 10/40 gas per zero/non-zero byte, reducing the maximum possible EL payload size to approximately 1.07 MB (`45_000_000/40`). This EIP further reduces this to approximately 0.67 MB (`45_000_000/64`).
6466

65-
By increasing calldata costs from 10/40 to 15/60 gas per byte for data-heavy transactions, this EIP provides:
67+
By increasing calldata costs from 10/40 to 64/64 gas per byte for data-heavy transactions, this EIP provides:
6668

67-
- **Enhanced block size reduction**: Maximum data-heavy payload size drops by ~33%.
69+
- **Enhanced block size reduction**: Maximum data-heavy payload size drops by ~37%.
6870
- **Maintained user experience**: Regular users engaging in DeFi, token transfers, and other EVM-heavy operations remain unaffected
6971
- **Better blob incentivization**: Higher calldata costs further encourage migration to blob usage for data availability
7072

@@ -80,17 +82,17 @@ This is a backwards incompatible gas repricing that requires a scheduled network
8082

8183
Wallet developers and node operators MUST update gas estimation handling to accommodate the new calldata cost rules. Specifically:
8284

83-
1. **Wallets**: Wallets using `eth_estimateGas` MUST be updated to ensure that they correctly account for the updated `TOTAL_COST_FLOOR_PER_TOKEN` parameter of 15. Failure to do so could result in underestimating gas, leading to failed transactions.
85+
1. **Wallets**: Wallets using `eth_estimateGas` MUST be updated to ensure that they correctly account for the updated `TOTAL_COST_FLOOR_PER_TOKEN` parameter of 16. Failure to do so could result in underestimating gas, leading to failed transactions.
8486

8587
2. **Node Software**: RPC methods such as `eth_estimateGas` MUST incorporate the updated formula for gas calculation with the new floor cost values.
8688

8789
Users can maintain their usual workflows without modification, as wallet and RPC updates will handle these changes.
8890

8991
## Test Cases
9092

91-
Testing for this EIP should verify the correct application of the new calldata cost floor of 15/60 gas per zero/non-zero byte:
93+
Testing for this EIP should verify the correct application of the new calldata cost floor of 64/64 gas per byte:
9294

93-
1. **Data-heavy transactions**: Verify transactions with minimal EVM execution pay the floor cost of 15 gas per calldata token
95+
1. **Data-heavy transactions**: Verify transactions with minimal EVM execution pay the floor cost of 64 gas per calldata byte
9496
2. **EVM-heavy transactions**: Confirm transactions with significant computation continue using standard 4/16 gas per byte
9597
3. **Edge cases**: Test transactions at the boundary where execution gas equals or exceeds the floor cost
9698
4. **Gas estimation**: Validate that `eth_estimateGas` correctly accounts for the new `TOTAL_COST_FLOOR_PER_TOKEN` value

0 commit comments

Comments
 (0)