Name | Value |
---|---|
MAX_BYTES_PER_TRANSACTION_PAYLOAD | 2**20 |
MAX_APPLICATION_TRANSACTIONS | 2**14 |
BYTES_PER_LOGS_BLOOM | 2**8 (= 256) |
BLOCK_ROOTS_FOR_EVM_SIZE | 2**8 (= 256) |
BeaconState
Note: BeaconState
fields remain unchanged other than the removal of eth1_data_votes
and addition of application_state_root
. The latter stores the root hash of ethereum application state.
BeaconBlockBody
Note: BeaconBlockBody
fields remain unchanged other than the addition of application_payload
.
Transaction
Application transaction fields structured as an SSZ object for inclusion in an ApplicationPayload
contained within a BeaconBlock
.
ApplicationPayload
The application payload included in a BeaconBlock
.
ApplicationState
Let class ApplicationState
be the abstract class representing ethereum application state.
BeaconChainData
get_application_state
Let get_application_state(application_state_root: Bytes32) -> ApplicationState
be the function that given the root hash returns a copy of ethereum application state. The body of the function is implementation dependant.
Let application_state_transition(application_state: ApplicationState, beacon_chain_data: BeaconChainData, application_payload: ApplicationPayload) -> None
be the transition function of ethereum application state. The body of the function is implementation dependant.
Note: application_state_transition
must throw AssertionError
if either transition or post-transition verifications has failed.
Note: one of potential implementations of this function is delegating the call to eth2_insertBlock.
process_application_payload
Notes:
get_eth1_data
Let get_eth1_data(application_state_root: Bytes32) -> Eth1Data
be the function that returns the Eth1Data
obtained from the application state specified by application_state_root
.
Note: This is a function of the state of the beacon chain deposit contract. It can be read from the eth1 state and/or logs.
is_valid_eth1_data
Used by fork-choice handler, on_block
, to
on_block
Note: The only modification is the addition of the Eth1Data
validity assumption.
All validator responsibilities remain unchanged other than those noted below. Namely, the modification of Eth1Data
and the addition of ApplicationPayload
.
BeaconBlockBody
The block.body.eth1_data
field is for block proposers to publish recent Eth1 data. This recent data contains deposit root (as calculated by the get_deposit_root()
method of the deposit contract) and deposit count after processing of the parent
block. The fork choice verifies Eth1 data of a block, then state.eth1_data
updates immediately allowing new deposits to be processed. Each deposit in block.body.deposits
must verify against state.eth1_data.eth1_deposit_root
.
get_eth1_data
Let get_eth1_data(application_state_root: Bytes32) -> Eth1Data
be the function that returns the Eth1Data
obtained from the application state specified by application_state_root
.
Note: This is a function of the state of the beacon chain deposit contract. It can be read from the eth1 state and/or logs.
block.body.eth1_data = get_eth1_data(state.application_state_root)
.produce_application_payload
Let produce_application_payload(parent_hash: Bytes32, beacon_chain_data: BeaconChainData) -> ApplicationPayload
be the function that produces new instance of application payload.
Note: one of potential implementations of this function is delegating the call to eth2_produceBlock.
randao_reveal
be block.body.randao_reveal
of the block that is being producedblock.body.application_payload = get_application_payload(state, parent, randao_reveal)
where:TBD