base_fee_per_gas to uint256

This commit is contained in:
Danny Ryan 2021-10-11 16:25:01 -06:00
parent c3594d4cb0
commit e5bbbc5191
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
2 changed files with 3 additions and 5 deletions

View File

@ -144,8 +144,6 @@ class BeaconState(Container):
#### `ExecutionPayload` #### `ExecutionPayload`
*Note*: The `base_fee_per_gas` field is serialized in little-endian.
```python ```python
class ExecutionPayload(Container): class ExecutionPayload(Container):
# Execution block header fields # Execution block header fields
@ -160,7 +158,7 @@ class ExecutionPayload(Container):
gas_used: uint64 gas_used: uint64
timestamp: uint64 timestamp: uint64
extra_data: ByteList[MAX_EXTRA_DATA_BYTES] extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
base_fee_per_gas: Bytes32 # base fee introduced in EIP-1559, little-endian serialized base_fee_per_gas: uint256
# Extra payload fields # Extra payload fields
block_hash: Hash32 # Hash of execution block block_hash: Hash32 # Hash of execution block
transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD] transactions: List[Transaction, MAX_TRANSACTIONS_PER_PAYLOAD]
@ -182,7 +180,7 @@ class ExecutionPayloadHeader(Container):
gas_used: uint64 gas_used: uint64
timestamp: uint64 timestamp: uint64
extra_data: ByteList[MAX_EXTRA_DATA_BYTES] extra_data: ByteList[MAX_EXTRA_DATA_BYTES]
base_fee_per_gas: Bytes32 base_fee_per_gas: uint256
# Extra payload fields # Extra payload fields
block_hash: Hash32 # Hash of execution block block_hash: Hash32 # Hash of execution block
transactions_root: Root transactions_root: Root

View File

@ -33,7 +33,7 @@ def get_sample_genesis_execution_payload_header(spec,
random=eth1_block_hash, random=eth1_block_hash,
block_number=0, block_number=0,
gas_limit=30000000, gas_limit=30000000,
base_fee_per_gas=spec.Bytes32('0x00ca9a3b00000000000000000000000000000000000000000000000000000000'), base_fee_per_gas=1000000000,
block_hash=eth1_block_hash, block_hash=eth1_block_hash,
transactions_root=spec.Root(b'\x56' * 32), transactions_root=spec.Root(b'\x56' * 32),
) )