Merge pull request #2660 from ethereum/remove-consensus-validated
remove notify_consensus_validated
This commit is contained in:
commit
c3594d4cb0
3
setup.py
3
setup.py
|
@ -527,9 +527,6 @@ class NoopExecutionEngine(ExecutionEngine):
|
||||||
def execute_payload(self: ExecutionEngine, execution_payload: ExecutionPayload) -> bool:
|
def execute_payload(self: ExecutionEngine, execution_payload: ExecutionPayload) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def notify_consensus_validated(self: ExecutionEngine, block_hash: Hash32, valid: bool) -> None:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def notify_forkchoice_updated(self: ExecutionEngine, head_block_hash: Hash32, finalized_block_hash: Hash32) -> None:
|
def notify_forkchoice_updated(self: ExecutionEngine, head_block_hash: Hash32, finalized_block_hash: Hash32) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
- [Beacon chain state transition function](#beacon-chain-state-transition-function)
|
- [Beacon chain state transition function](#beacon-chain-state-transition-function)
|
||||||
- [Execution engine](#execution-engine)
|
- [Execution engine](#execution-engine)
|
||||||
- [`execute_payload`](#execute_payload)
|
- [`execute_payload`](#execute_payload)
|
||||||
- [`notify_consensus_validated`](#notify_consensus_validated)
|
|
||||||
- [Block processing](#block-processing)
|
- [Block processing](#block-processing)
|
||||||
- [Execution payload processing](#execution-payload-processing)
|
- [Execution payload processing](#execution-payload-processing)
|
||||||
- [`is_valid_gas_limit`](#is_valid_gas_limit)
|
- [`is_valid_gas_limit`](#is_valid_gas_limit)
|
||||||
|
@ -234,13 +233,11 @@ 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 function `self.notify_consensus_validated` which signals that the beacon block containing the execution payload
|
|
||||||
is valid with respect to the consensus rule set
|
|
||||||
|
|
||||||
*Note*: `execute_payload` and `notify_consensus_validated` are functions accessed through the `EXECUTION_ENGINE` module which instantiates the `ExecutionEngine` protocol.
|
*Note*: `execute_payload` is a function accessed through the `EXECUTION_ENGINE` module which instantiates the `ExecutionEngine` protocol.
|
||||||
|
|
||||||
The body of each of these functions is implementation dependent.
|
The body of this function is implementation dependent.
|
||||||
The Engine API may be used to implement them with an external execution engine.
|
The Engine API may be used to implement this and similarly defined functions via an external execution engine.
|
||||||
|
|
||||||
#### `execute_payload`
|
#### `execute_payload`
|
||||||
|
|
||||||
|
@ -252,20 +249,6 @@ def execute_payload(self: ExecutionEngine, execution_payload: ExecutionPayload)
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `notify_consensus_validated`
|
|
||||||
|
|
||||||
```python
|
|
||||||
def notify_consensus_validated(self: ExecutionEngine, block_hash: Hash32, valid: bool) -> None:
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
The inputs to this function depend on the result of the state transition. A call to `notify_consensus_validated` must be made after the [`state_transition`](../phase0/beacon-chain.md#beacon-chain-state-transition-function) function finishes. The value of the `valid` parameter must be set as follows:
|
|
||||||
|
|
||||||
* `True` if `state_transition` function call succeeds
|
|
||||||
* `False` if `state_transition` function call fails
|
|
||||||
|
|
||||||
*Note*: The call of the `notify_consensus_validated` function with `valid = True` maps on the `POS_CONSENSUS_VALIDATED` event defined in the [EIP-3675](https://eips.ethereum.org/EIPS/eip-3675#definitions).
|
|
||||||
|
|
||||||
### Block processing
|
### Block processing
|
||||||
|
|
||||||
*Note*: The call to the `process_execution_payload` must happen before the call to the `process_randao` as the former depends on the `randao_mix` computed with the reveal of the previous block.
|
*Note*: The call to the `process_execution_payload` must happen before the call to the `process_randao` as the former depends on the `randao_mix` computed with the reveal of the previous block.
|
||||||
|
|
Loading…
Reference in New Issue