or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing
xxxxxxxxxx
Executable beacon chain spec
Beacon chain
Configuration
Execution
Updated containers
Updated
BeaconState
Note:
BeaconState
fields remain unchanged other than the removal ofeth1_data_votes
and addition ofapplication_state_root
. The latter stores the root hash of ethereum application state.Extended
BeaconBlockBody
Note:
BeaconBlockBody
fields remain unchanged other than the addition ofapplication_payload
.New containers
Transaction
Application transaction fields structured as an SSZ object for inclusion in an
ApplicationPayload
contained within aBeaconBlock
.ApplicationPayload
The application payload included in a
BeaconBlock
.Helper functions
Block processing
Eth1 data
Application payload
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.Application state transition function
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 throwAssertionError
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
Fork choice
Notes:
Helpers
get_eth1_data
Let
get_eth1_data(application_state_root: Bytes32) -> Eth1Data
be the function that returns theEth1Data
obtained from the application state specified byapplication_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
, toUpdated fork-choice handlers
on_block
Note: The only modification is the addition of the
Eth1Data
validity assumption.Validator
Beacon chain responsibilities
All validator responsibilities remain unchanged other than those noted below. Namely, the modification of
Eth1Data
and the addition ofApplicationPayload
.Block proposal
Constructing the
BeaconBlockBody
Eth1 Data
The
block.body.eth1_data
field is for block proposers to publish recent Eth1 data. This recent data contains deposit root (as calculated by theget_deposit_root()
method of the deposit contract) and deposit count after processing of theparent
block. The fork choice verifies Eth1 data of a block, thenstate.eth1_data
updates immediately allowing new deposits to be processed. Each deposit inblock.body.deposits
must verify againststate.eth1_data.eth1_deposit_root
.get_eth1_data
Let
get_eth1_data(application_state_root: Bytes32) -> Eth1Data
be the function that returns theEth1Data
obtained from the application state specified byapplication_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)
.Application Payload
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
beblock.body.randao_reveal
of the block that is being producedblock.body.application_payload = get_application_payload(state, parent, randao_reveal)
where:Network Upgrade
TBD