Skip to content

Commit 0764e1a

Browse files
committed
rename to base fee per blob gas
1 parent dba374a commit 0764e1a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

EIPS/eip-4844.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Compared to full data sharding, this EIP has a reduced cap on the number of thes
4949
| `POINT_EVALUATION_PRECOMPILE_GAS` | `50000` |
5050
| `MAX_BLOB_GAS_PER_BLOCK` | `786432` |
5151
| `TARGET_BLOB_GAS_PER_BLOCK` | `393216` |
52-
| `MIN_BLOB_BASE_FEE_PER_GAS` | `1` |
52+
| `MIN_BASE_FEE_PER_BLOB_GAS` | `1` |
5353
| `BLOB_BASE_FEE_UPDATE_FRACTION` | `3338477` |
5454
| `GAS_PER_BLOB` | `2**17` |
5555
| `HASH_OPCODE_BYTE` | `Bytes1(0x49)` |
@@ -169,14 +169,14 @@ We use the `excess_blob_gas` header field to store persistent data needed to com
169169

170170
```python
171171
def calc_blob_fee(header: Header, tx: Transaction) -> int:
172-
return get_total_blob_gas(tx) * get_blob_base_fee_per_gas(header)
172+
return get_total_blob_gas(tx) * get_base_fee_per_blob_gas(header)
173173

174174
def get_total_blob_gas(tx: Transaction) -> int:
175175
return GAS_PER_BLOB * len(tx.blob_versioned_hashes)
176176

177-
def get_blob_base_fee_per_gas(header: Header) -> int:
177+
def get_base_fee_per_blob_gas(header: Header) -> int:
178178
return fake_exponential(
179-
MIN_BLOB_BASE_FEE_PER_GAS,
179+
MIN_BASE_FEE_PER_BLOB_GAS,
180180
header.excess_blob_gas,
181181
BLOB_BASE_FEE_UPDATE_FRACTION
182182
)
@@ -276,7 +276,7 @@ def validate_block(block: Block) -> None:
276276
assert h[0] == VERSIONED_HASH_VERSION_KZG
277277

278278
# ensure that the user was willing to at least pay the current blob base fee
279-
assert tx.max_fee_per_blob_gas >= get_blob_base_fee_per_gas(block.header)
279+
assert tx.max_fee_per_blob_gas >= get_base_fee_per_blob_gas(block.header)
280280

281281
# keep track of total blob gas spent in the block
282282
blob_gas_used += get_total_blob_gas(tx)
@@ -383,18 +383,18 @@ However, the point evaluation happens inside a finite field, and it is only well
383383

384384
In the interest of not adding another precompile, we return the modulus and the polynomial degree directly from the point evaluation precompile. It can then be used by the caller. It is also "free" in that the caller can just ignore this part of the return value without incurring an extra cost -- systems that remain upgradable for the foreseeable future will likely use this route for now.
385385

386-
### Blob base fee per gas update rule
386+
### Base fee per blob gas update rule
387387

388-
The blob base fee per gas update rule is intended to approximate the formula `blob_base_fee_per_gas = MIN_BLOB_BASE_FEE_PER_GAS * e**(excess_blob_gas / BLOB_BASE_FEE_UPDATE_FRACTION)`,
388+
The base fee per blob gas update rule is intended to approximate the formula `base_fee_per_blob_gas = MIN_BASE_FEE_PER_BLOB_GAS * e**(excess_blob_gas / BLOB_BASE_FEE_UPDATE_FRACTION)`,
389389
where `excess_blob_gas` is the total "extra" amount of blob gas that the chain has consumed relative to the "targeted" number (`TARGET_BLOB_GAS_PER_BLOCK` per block).
390-
Like EIP-1559, it's a self-correcting formula: as the excess goes higher, the `blob_base_fee_per_gas` increases exponentially, reducing usage and eventually forcing the excess back down.
390+
Like EIP-1559, it's a self-correcting formula: as the excess goes higher, the `base_fee_per_blob_gas` increases exponentially, reducing usage and eventually forcing the excess back down.
391391

392392
The block-by-block behavior is roughly as follows.
393393
If block `N` consumes `X` blob gas, then in block `N+1` `excess_blob_gas` increases by `X - TARGET_BLOB_GAS_PER_BLOCK`,
394-
and so the `blob_base_fee_per_gas` of block `N+1` increases by a factor of `e**((X - TARGET_BLOB_GAS_PER_BLOCK) / BLOB_BASE_FEE_UPDATE_FRACTION)`.
394+
and so the `base_fee_per_blob_gas` of block `N+1` increases by a factor of `e**((X - TARGET_BLOB_GAS_PER_BLOCK) / BLOB_BASE_FEE_UPDATE_FRACTION)`.
395395
Hence, it has a similar effect to the existing EIP-1559, but is more "stable" in the sense that it responds in the same way to the same total usage regardless of how it's distributed.
396396

397-
The parameter `BLOB_BASE_FEE_UPDATE_FRACTION` controls the maximum rate of change of the blob base fee per gas. It is chosen to target a maximum change rate of `e**(TARGET_BLOB_GAS_PER_BLOCK / BLOB_BASE_FEE_UPDATE_FRACTION) ≈ 1.125` per block.
397+
The parameter `BLOB_BASE_FEE_UPDATE_FRACTION` controls the maximum rate of change of the base fee per blob gas. It is chosen to target a maximum change rate of `e**(TARGET_BLOB_GAS_PER_BLOCK / BLOB_BASE_FEE_UPDATE_FRACTION) ≈ 1.125` per block.
398398

399399
### Throughput
400400

@@ -417,7 +417,7 @@ By only broadcasting announcements for blob transactions, receiving nodes will h
417417
allowing them to throttle throughput to an acceptable level.
418418
[EIP-5793](./eip-5793.md) will give further fine-grained control to nodes by extending the `NewPooledTransactionHashes` announcement messages to include the transaction type and size.
419419

420-
In addition, we recommend including a 1.1x blob base fee per gas bump requirement to the mempool transaction replacement rules.
420+
In addition, we recommend including a 1.1x base fee per blob gas bump requirement to the mempool transaction replacement rules.
421421

422422
## Test Cases
423423

0 commit comments

Comments
 (0)