clarified language around start_up (#303)
This commit is contained in:
parent
0f8166c693
commit
b554204688
|
@ -592,7 +592,7 @@ Every deposit, of size between `MIN_DEPOSIT` and `MAX_DEPOSIT`, emits an `Eth1De
|
||||||
|
|
||||||
### `ChainStart` log
|
### `ChainStart` log
|
||||||
|
|
||||||
When sufficiently many full deposits have been made the deposit contract emits the `ChainStart` log. The beacon chain may then be initialized by calling the `on_startup` function (defined below) where:
|
When sufficiently many full deposits have been made the deposit contract emits the `ChainStart` log. The beacon chain state may then be initialized by calling the `get_initial_beacon_state` function (defined below) where:
|
||||||
|
|
||||||
* `genesis_time` equals `time` in the `ChainStart` log
|
* `genesis_time` equals `time` in the `ChainStart` log
|
||||||
* `processed_pow_receipt_root` equals `receipt_root` in the `ChainStart` log
|
* `processed_pow_receipt_root` equals `receipt_root` in the `ChainStart` log
|
||||||
|
@ -1076,10 +1076,10 @@ A valid block with slot `INITIAL_SLOT_NUMBER` (a "genesis block") has the follow
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`STARTUP_STATE_ROOT` is the root of the initial state, computed by running the following code:
|
`STARTUP_STATE_ROOT` (in the above "genesis block") is generated from the `get_initial_beacon_state` function below. When enough full deposits have been made to the deposit contract and the `ChainStart` log has been emitted, `get_initial_beacon_state` will execute to compute the `ssz_tree_hash` of `BeaconState`.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def on_startup(initial_validator_deposits: List[Deposit],
|
def get_initial_beacon_state(initial_validator_deposits: List[Deposit],
|
||||||
genesis_time: int,
|
genesis_time: int,
|
||||||
processed_pow_receipt_root: Hash32) -> BeaconState:
|
processed_pow_receipt_root: Hash32) -> BeaconState:
|
||||||
state = BeaconState(
|
state = BeaconState(
|
||||||
|
|
Loading…
Reference in New Issue