73 lines
2.0 KiB
Markdown
73 lines
2.0 KiB
Markdown
# EIP-4788 -- The Beacon Chain
|
|
|
|
## 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)
|
|
- [Extended Containers](#extended-containers)
|
|
- [`ExecutionPayload`](#executionpayload)
|
|
- [`ExecutionPayloadHeader`](#executionpayloadheader)
|
|
|
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
|
<!-- /TOC -->
|
|
|
|
## Introduction
|
|
|
|
TODO
|
|
|
|
## Containers
|
|
|
|
### Extended Containers
|
|
|
|
#### `ExecutionPayload`
|
|
|
|
```python
|
|
class ExecutionPayload(Container):
|
|
# Execution block header fields
|
|
parent_hash: Hash32
|
|
fee_recipient: ExecutionAddress # 'beneficiary' in the yellow paper
|
|
state_root: Bytes32
|
|
receipts_root: Bytes32
|
|
logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM]
|
|
prev_randao: Bytes32 # 'difficulty' in the yellow paper
|
|
block_number: uint64 # 'number' in the yellow paper
|
|
gas_limit: uint64
|
|
gas_used: uint64
|
|
timestamp: uint64
|
|
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
|
base_fee_per_gas: uint256
|
|
# Extra payload fields
|
|
block_hash: Hash32 # Hash of execution block
|
|
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
|
|
withdrawals: List[Withdrawal, MAX_WITHDRAWALS_PER_PAYLOAD]
|
|
parent_beacon_block_root: Root # [New in EIP-4788]
|
|
```
|
|
|
|
#### `ExecutionPayloadHeader`
|
|
|
|
```python
|
|
class ExecutionPayloadHeader(Container):
|
|
# Execution block header fields
|
|
parent_hash: Hash32
|
|
fee_recipient: ExecutionAddress
|
|
state_root: Bytes32
|
|
receipts_root: Bytes32
|
|
logs_bloom: ByteVector[BYTES_PER_LOGS_BLOOM]
|
|
prev_randao: Bytes32
|
|
block_number: uint64
|
|
gas_limit: uint64
|
|
gas_used: uint64
|
|
timestamp: uint64
|
|
extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
|
|
base_fee_per_gas: uint256
|
|
# Extra payload fields
|
|
block_hash: Hash32 # Hash of execution block
|
|
transactions_root: Root
|
|
withdrawals_root: Root
|
|
parent_beacon_block_root: Root # [New in EIP-4788]
|
|
```
|