From 1236e8e1fa8c9ba235f316f6739aa55672ffcd45 Mon Sep 17 00:00:00 2001 From: Justin Date: Fri, 15 Mar 2019 13:53:24 +0000 Subject: [PATCH] Update 0_beacon-chain.md --- specs/core/0_beacon-chain.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/specs/core/0_beacon-chain.md b/specs/core/0_beacon-chain.md index 36d45b31b..ff8b09071 100644 --- a/specs/core/0_beacon-chain.md +++ b/specs/core/0_beacon-chain.md @@ -595,6 +595,7 @@ The types are defined topologically to aid in facilitating an executable version 'validator_registry': [Validator], 'validator_balances': ['uint64'], 'validator_registry_update_epoch': 'uint64', + 'validator_registry_update_slashed_balances': 'uint64', # Randomness and committees 'latest_randao_mixes': ['bytes32', LATEST_RANDAO_MIXES_LENGTH], @@ -2116,6 +2117,7 @@ def update_validator_registry(state: BeaconState) -> None: exit_validator(state, index) state.validator_registry_update_epoch = current_epoch + state.validator_registry_update_slashed_balances = total_at_end ``` Run the following function: @@ -2164,7 +2166,7 @@ def process_slashings(state: BeaconState) -> None: total_balance = get_total_balance(state, active_validator_indices) # Compute `total_penalties` - total_at_start = state.latest_slashed_balances[(current_epoch + 1) % LATEST_SLASHED_EXIT_LENGTH] + total_at_start = state.validator_registry_update_slashed_balances total_at_end = state.latest_slashed_balances[current_epoch % LATEST_SLASHED_EXIT_LENGTH] total_penalties = total_at_end - total_at_start