From 130b81bf55489827c67a46522e8851665f825915 Mon Sep 17 00:00:00 2001 From: Danny Ryan Date: Sun, 10 Oct 2021 10:47:59 -0400 Subject: [PATCH] remove notify_consensus_validated in accordance with POS_CONSENSUS_VALIDATED removal from eip 3675 --- setup.py | 3 --- specs/merge/beacon-chain.md | 23 +++-------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/setup.py b/setup.py index b20036fd2..3dcaaa44f 100644 --- a/setup.py +++ b/setup.py @@ -527,9 +527,6 @@ class NoopExecutionEngine(ExecutionEngine): def execute_payload(self: ExecutionEngine, execution_payload: ExecutionPayload) -> bool: 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: pass diff --git a/specs/merge/beacon-chain.md b/specs/merge/beacon-chain.md index b3d184855..1b56ca37c 100644 --- a/specs/merge/beacon-chain.md +++ b/specs/merge/beacon-chain.md @@ -31,7 +31,6 @@ - [Beacon chain state transition function](#beacon-chain-state-transition-function) - [Execution engine](#execution-engine) - [`execute_payload`](#execute_payload) - - [`notify_consensus_validated`](#notify_consensus_validated) - [Block processing](#block-processing) - [Execution payload processing](#execution-payload-processing) - [`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 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 Engine API may be used to implement them with an external execution engine. +The body of this function is implementation dependent. +The Engine API may be used to implement this and similarly defined functions via an external execution engine. #### `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 *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.