diff --git a/beacon_node/store/src/partial_beacon_state.rs b/beacon_node/store/src/partial_beacon_state.rs index ad52bc5b8..12c562849 100644 --- a/beacon_node/store/src/partial_beacon_state.rs +++ b/beacon_node/store/src/partial_beacon_state.rs @@ -110,7 +110,7 @@ where pub next_withdrawal_index: u64, #[cfg(feature = "withdrawals")] #[superstruct(only(Capella, Eip4844))] - pub latest_withdrawal_validator_index: u64, + pub next_withdrawal_validator_index: u64, } /// Implement the conversion function from BeaconState -> PartialBeaconState. @@ -213,7 +213,7 @@ impl PartialBeaconState { inactivity_scores, latest_execution_payload_header, next_withdrawal_index, - latest_withdrawal_validator_index + next_withdrawal_validator_index ] ), #[cfg(not(feature = "withdrawals"))] @@ -245,7 +245,7 @@ impl PartialBeaconState { inactivity_scores, latest_execution_payload_header, next_withdrawal_index, - latest_withdrawal_validator_index + next_withdrawal_validator_index ] ), #[cfg(not(feature = "withdrawals"))] @@ -463,7 +463,7 @@ impl TryInto> for PartialBeaconState { inactivity_scores, latest_execution_payload_header, next_withdrawal_index, - latest_withdrawal_validator_index + next_withdrawal_validator_index ] ), #[cfg(not(feature = "withdrawals"))] @@ -493,7 +493,7 @@ impl TryInto> for PartialBeaconState { inactivity_scores, latest_execution_payload_header, next_withdrawal_index, - latest_withdrawal_validator_index + next_withdrawal_validator_index ] ), #[cfg(not(feature = "withdrawals"))] diff --git a/consensus/state_processing/src/per_block_processing/process_operations.rs b/consensus/state_processing/src/per_block_processing/process_operations.rs index cc8be937d..9b24be39e 100644 --- a/consensus/state_processing/src/per_block_processing/process_operations.rs +++ b/consensus/state_processing/src/per_block_processing/process_operations.rs @@ -286,8 +286,6 @@ pub fn process_exits( /// /// Returns `Ok(())` if the validation and state updates completed successfully. Otherwise returs /// an `Err` describing the invalid object or cause of failure. -/// -/// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#new-process_bls_to_execution_change #[cfg(all(feature = "withdrawals", feature = "withdrawals-processing"))] pub fn process_bls_to_execution_changes<'a, T: EthSpec, Payload: AbstractExecPayload>( state: &mut BeaconState, diff --git a/consensus/state_processing/src/upgrade/capella.rs b/consensus/state_processing/src/upgrade/capella.rs index e4e8ed853..ad106a842 100644 --- a/consensus/state_processing/src/upgrade/capella.rs +++ b/consensus/state_processing/src/upgrade/capella.rs @@ -60,7 +60,7 @@ pub fn upgrade_to_capella( #[cfg(feature = "withdrawals")] next_withdrawal_index: 0, #[cfg(feature = "withdrawals")] - latest_withdrawal_validator_index: 0, + next_withdrawal_validator_index: 0, // Caches total_active_balance: pre.total_active_balance, committee_caches: mem::take(&mut pre.committee_caches), diff --git a/consensus/state_processing/src/upgrade/eip4844.rs b/consensus/state_processing/src/upgrade/eip4844.rs index 8ef3a21b1..478024f17 100644 --- a/consensus/state_processing/src/upgrade/eip4844.rs +++ b/consensus/state_processing/src/upgrade/eip4844.rs @@ -67,7 +67,7 @@ pub fn upgrade_to_eip4844( #[cfg(feature = "withdrawals")] next_withdrawal_index: pre.next_withdrawal_index, #[cfg(feature = "withdrawals")] - latest_withdrawal_validator_index: 0, + next_withdrawal_validator_index: 0, // Caches total_active_balance: pre.total_active_balance, committee_caches: mem::take(&mut pre.committee_caches), diff --git a/consensus/types/src/beacon_state.rs b/consensus/types/src/beacon_state.rs index 0243aa832..66125c297 100644 --- a/consensus/types/src/beacon_state.rs +++ b/consensus/types/src/beacon_state.rs @@ -300,7 +300,7 @@ where pub next_withdrawal_index: u64, #[cfg(feature = "withdrawals")] #[superstruct(only(Capella, Eip4844))] - pub latest_withdrawal_validator_index: u64, + pub next_withdrawal_validator_index: u64, // Caching (not in the spec) #[serde(skip_serializing, skip_deserializing)]