From 40669da486ff070449b703d696c965e05c2860f1 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 21 Feb 2023 18:03:42 +1100 Subject: [PATCH] Modify some Capella comments (#4015) * Modify comment to only include 4844 Capella only modifies per epoch processing by adding `process_historical_summaries_update`, which does not change the realization of justification or finality. Whilst 4844 does not currently modify realization, the spec is not yet final enough to say that it never will. * Clarify address change verification comment The verification of the address change doesn't really have anything to do with the current epoch. I think this was just a copy-paste from a function like `verify_exit`. --- consensus/fork_choice/src/fork_choice.rs | 4 ++-- .../per_block_processing/verify_bls_to_execution_change.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/consensus/fork_choice/src/fork_choice.rs b/consensus/fork_choice/src/fork_choice.rs index 85e43945c..590e151a8 100644 --- a/consensus/fork_choice/src/fork_choice.rs +++ b/consensus/fork_choice/src/fork_choice.rs @@ -857,8 +857,8 @@ where (parent_justified, parent_finalized) } else { let justification_and_finalization_state = match block { - // FIXME: verify this is correct for Capella/Eip4844 because - // epoch processing changes in Capella.. + // TODO(eip4844): Ensure that the final specification + // does not substantially modify per epoch processing. BeaconBlockRef::Eip4844(_) | BeaconBlockRef::Capella(_) | BeaconBlockRef::Merge(_) diff --git a/consensus/state_processing/src/per_block_processing/verify_bls_to_execution_change.rs b/consensus/state_processing/src/per_block_processing/verify_bls_to_execution_change.rs index 15a856c40..bb2679925 100644 --- a/consensus/state_processing/src/per_block_processing/verify_bls_to_execution_change.rs +++ b/consensus/state_processing/src/per_block_processing/verify_bls_to_execution_change.rs @@ -10,8 +10,8 @@ fn error(reason: Invalid) -> BlockOperationError { BlockOperationError::invalid(reason) } -/// Indicates if a `BlsToExecutionChange` is valid to be included in a block in the current epoch of the given -/// state. +/// Indicates if a `BlsToExecutionChange` is valid to be included in a block, +/// where the block is being applied to the given `state`. /// /// Returns `Ok(())` if the `SignedBlsToExecutionChange` is valid, otherwise indicates the reason for invalidity. pub fn verify_bls_to_execution_change(