Apply suggestions from code review

Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
This commit is contained in:
Mikhail Kalinin 2021-09-22 17:45:26 +06:00 committed by GitHub
parent b530e01761
commit 18bfe3555f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -239,7 +239,7 @@ The implementation-dependent `ExecutionEngine` protocol encapsulates the executi
* a state object `self.execution_state` of type `ExecutionState` * a state object `self.execution_state` of type `ExecutionState`
* a state transition function `self.execute_payload` which applies changes to the `self.execution_state` * a state transition function `self.execute_payload` which applies changes to the `self.execution_state`
* a method `self.consensus_validated` which notifies that the block holding the execution payload * a method `self.consensus_validated` which signals that the beacon block containing the execution payload
is valid with respect to the consensus rule set is valid with respect to the consensus rule set
#### `execute_payload` #### `execute_payload`

View File

@ -35,6 +35,7 @@ The following methods are added to the `ExecutionEngine` protocol for use in the
#### `forkchoice_updated` #### `forkchoice_updated`
This method performs two actions *atomically*:
* Re-organizes the execution payload chain and corresponding state to make `head_block_hash` the head. * Re-organizes the execution payload chain and corresponding state to make `head_block_hash` the head.
* Applies finality to the execution state: it irreversibly persists the chain of all execution payloads * Applies finality to the execution state: it irreversibly persists the chain of all execution payloads
and corresponding state, up to and including `finalized_block_hash`. and corresponding state, up to and including `finalized_block_hash`.

View File

@ -42,7 +42,7 @@ The following methods are added to the `ExecutionEngine` protocol for use as a v
#### `prepare_payload` #### `prepare_payload`
Given the set of execution payload attributes initiates a process of building an execution payload Given the set of execution payload attributes, `prepare_payload` initiates a process of building an execution payload
on top of the execution chain tip identified by `parent_hash`. on top of the execution chain tip identified by `parent_hash`.
```python ```python
@ -59,7 +59,7 @@ def prepare_payload(self: ExecutionEngine,
#### `get_payload` #### `get_payload`
Given the `payload_id` returns the most recent version of the execution payload that Given the `payload_id`, `get_payload` returns the most recent version of the execution payload that
has been built since the corresponding call to `prepare_payload` method. has been built since the corresponding call to `prepare_payload` method.
```python ```python
@ -83,7 +83,7 @@ All validator responsibilities remain unchanged other than those noted below. Na
##### ExecutionPayload ##### ExecutionPayload
To obtain an execution payload a proposer of a block must take the following actions: To obtain an execution payload, the proposer of a block must take the following actions:
1. Set `payload_id = prepare_execution_payload(state, pow_chain, fee_recipient, execution_engine)`, where: 1. Set `payload_id = prepare_execution_payload(state, pow_chain, fee_recipient, execution_engine)`, where:
* `state` is the state for which `is_proposer(state, validator_index)` returns `True` * `state` is the state for which `is_proposer(state, validator_index)` returns `True`