Skip to content

Commit 4c29b0b

Browse files
committed
specify the max blobs per block when building a payload
1 parent 43d96cf commit 4c29b0b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

specs/electra/fork-choice.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Electra -- Fork Choice
2+
3+
## Table of contents
4+
<!-- TOC -->
5+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
6+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
7+
8+
- [Introduction](#introduction)
9+
- [Containers](#containers)
10+
- [Helpers](#helpers)
11+
- [Extended `PayloadAttributes`](#extended-payloadattributes)
12+
13+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
14+
<!-- /TOC -->
15+
16+
## Introduction
17+
18+
This is the modification of the fork choice accompanying the Electra upgrade.
19+
20+
## Containers
21+
22+
## Helpers
23+
24+
### Extended `PayloadAttributes`
25+
26+
`PayloadAttributes` is extended with the maximum number of blobs per block.
27+
28+
```python
29+
@dataclass
30+
class PayloadAttributes(object):
31+
timestamp: uint64
32+
prev_randao: Bytes32
33+
suggested_fee_recipient: ExecutionAddress
34+
withdrawals: Sequence[Withdrawal]
35+
parent_beacon_block_root: Root
36+
max_blobs_per_block: uint64 # [New in Electra]
37+
```

specs/electra/validator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def prepare_execution_payload(state: BeaconState,
139139
suggested_fee_recipient=suggested_fee_recipient,
140140
withdrawals=withdrawals,
141141
parent_beacon_block_root=hash_tree_root(state.latest_block_header),
142+
max_blobs_per_block=MAX_BLOBS_PER_BLOCK, # [New in Electra]
142143
)
143144
return execution_engine.notify_forkchoice_updated(
144145
head_block_hash=parent_hash,

0 commit comments

Comments
 (0)