Skip to content

Commit

Permalink
specify the max blobs per block with each payload
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Jun 12, 2024
1 parent 43d96cf commit 0ed74fb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions specs/electra/fork-choice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Electra -- Fork Choice

## Table of contents
<!-- TOC -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

- [Introduction](#introduction)
- [Containers](#containers)
- [Helpers](#helpers)
- [Extended `PayloadAttributes`](#extended-payloadattributes)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->

## Introduction

This is the modification of the fork choice accompanying the Electra upgrade.

## Containers

## Helpers

### Extended `PayloadAttributes`

`PayloadAttributes` is extended with the maximum number of blobs per block.

```python
@dataclass
class PayloadAttributes(object):
timestamp: uint64
prev_randao: Bytes32
suggested_fee_recipient: ExecutionAddress
withdrawals: Sequence[Withdrawal]
parent_beacon_block_root: Root
max_blobs_per_block: uint64 # [New in Electra]
```
1 change: 1 addition & 0 deletions specs/electra/validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def prepare_execution_payload(state: BeaconState,
suggested_fee_recipient=suggested_fee_recipient,
withdrawals=withdrawals,
parent_beacon_block_root=hash_tree_root(state.latest_block_header),
max_blobs_per_block=MAX_BLOBS_PER_BLOCK, # [New in Electra]
)
return execution_engine.notify_forkchoice_updated(
head_block_hash=parent_hash,
Expand Down

0 comments on commit 0ed74fb

Please sign in to comment.