From 97966d825a8933c2e37610afd83e1f12fe3a9767 Mon Sep 17 00:00:00 2001 From: fradamt Date: Mon, 25 Mar 2024 12:23:19 +0100 Subject: [PATCH] small fixes --- specs/_features/eip7251/beacon-chain.md | 6 +++--- specs/_features/eip7251/fork.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specs/_features/eip7251/beacon-chain.md b/specs/_features/eip7251/beacon-chain.md index 70186b600..47bff097a 100644 --- a/specs/_features/eip7251/beacon-chain.md +++ b/specs/_features/eip7251/beacon-chain.md @@ -764,7 +764,7 @@ def apply_deposit(state: BeaconState, else: # Increase balance by deposit amount index = ValidatorIndex(validator_pubkeys.index(pubkey)) - state.pending_balance_deposits.append(PendingBalanceDeposit(index, amount)) # [Modified in EIP-7251] + state.pending_balance_deposits.append(PendingBalanceDeposit(index=amount, amount=amount)) # [Modified in EIP-7251] ``` #### Modified `add_validator_to_registry` @@ -775,13 +775,13 @@ def add_validator_to_registry(state: BeaconState, withdrawal_credentials: Bytes32, amount: uint64) -> None: index = get_index_for_new_validator(state) - validator = get_validator_from_deposit(pubkey, withdrawal_credentials, amount) + validator = get_validator_from_deposit(pubkey, withdrawal_credentials) set_or_append_list(state.validators, index, validator) set_or_append_list(state.balances, index, 0) # [Modified in EIP7251] set_or_append_list(state.previous_epoch_participation, index, ParticipationFlags(0b0000_0000)) set_or_append_list(state.current_epoch_participation, index, ParticipationFlags(0b0000_0000)) set_or_append_list(state.inactivity_scores, index, uint64(0)) - state.pending_balance_deposits.append(PendingBalanceDeposit(index, amount)) # [New in EIP7251] + state.pending_balance_deposits.append(PendingBalanceDeposit(index=index, amount=amount)) # [New in EIP7251] ``` ###### Updated `get_validator_from_deposit` diff --git a/specs/_features/eip7251/fork.md b/specs/_features/eip7251/fork.md index 2e501fc6b..277e43862 100644 --- a/specs/_features/eip7251/fork.md +++ b/specs/_features/eip7251/fork.md @@ -141,5 +141,5 @@ def queue_excess_active_balance(state: BeaconState): if has_compounding_withdrawal_credential(validator) and balance > MAX_EFFECTIVE_BALANCE: excess_balance = balance - MAX_EFFECTIVE_BALANCE state.balances[index] = balance - excess_balance - state.pending_balance_deposits.append(PendingBalanceDeposit(index, excess_balance)) + state.pending_balance_deposits.append(PendingBalanceDeposit(index=index, amount=excess_balance)) ```