Skip to content

Commit

Permalink
some more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Oct 23, 2024
1 parent 8295581 commit 18115ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EIPS/eip-7742.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,14 @@ For a genesis block with no existing parent, the value should be set according t
| - | - |
| `EXCESS_BLOB_GAS_NORMALIZATION_FACTOR` | `100E6` |
| `NORMALIZED_BLOB_BASE_FEE_UPDATE_FRACTION` | `849018605` |
| `OLD_TARGET_BLOB_GAS_PER_BLOCK` | `393216` |

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.

```python
def calc_excess_blob_gas(block: Header) -> int:
if(block.parent.timestamp < FORK_TIMESTAMP)
normalizedParentExcessBlobGas = block.parent.excess_blob_gas * EXCESS_BLOB_GAS_NORMALIZATION_FACTOR // TARGET_BLOB_GAS_PER_BLOCK
normalizedParentExcessBlobGas = block.parent.excess_blob_gas * EXCESS_BLOB_GAS_NORMALIZATION_FACTOR // OLD_TARGET_BLOB_GAS_PER_BLOCK
blockTargetBlobGas = TARGET_BLOB_GAS_PER_BLOCK
else
normalizedParentExcessBlobGas = block.parent.excess_blob_gas
Expand Down

0 comments on commit 18115ae

Please sign in to comment.