Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Oct 23, 2024
1 parent 3dce0db commit 606c590
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Validity of these values is guaranteed from the consensus layer, much like how w

For a genesis block with no existing parent, the value should be set according to the agreed specification for the target blob count given by that genesis block's protocol rule set.

`excess_blob_gas` in the block now holds _normalized_ excess blob gas accumulating `((blob_gas_used-target_blob_gas)/T) * EXCESS_BLOB_GAS_NORMALIZATION_FACTOR`. We choose `EXCESS_BLOB_GAS_NORMALIZATION_FACTOR` to `100E6` and this makes our choice of `NORMALIZED_UPDATE_FRACTION` as `3338477 * 100E6 // 393216 = 849018605`.
`excess_blob_gas` in the block now holds _normalized_ excess blob gas accumulating `((blob_gas_used-target_blob_gas)/T) * EXCESS_BLOB_GAS_NORMALIZATION_FACTOR`. We choose `EXCESS_BLOB_GAS_NORMALIZATION_FACTOR` to `100E6` and this makes our choice of `NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION` as `3338477 * 100E6 // 393216 = 849018605`.

At the fork block (where parent.timestamp < FORK_TIMESTAMP), we convert parent's accumulated `excess_blob_gas` to the normalized `excess_blob_gas` to be used in this block's `excess_blob_gas` accumulator.

Expand All @@ -86,13 +86,13 @@ def calc_excess_blob_gas(block: Header) -> int:
parentExcessBlobGas = block.excess_blob_gas
targetBlobGas = block.target_blob_count * GAS_PER_BLOB

return (parentExcessBlobGas + (block.blob_gas_used - targetBlobGas) * 100E6 // NORMALIZED_UPDATE_FRACTION)
return (parentExcessBlobGas + (block.blob_gas_used - targetBlobGas) * 100E6 // NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION)

def get_base_fee_per_blob_gas(parent: Header) -> int:
return fake_exponential(
MIN_BASE_FEE_PER_BLOB_GAS,
parent.excess_blob_gas,
NORMALIZED_UPDATE_FRACTION
NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION
)
```

Expand Down

0 comments on commit 606c590

Please sign in to comment.