1
1
# beacon_chain
2
- # Copyright (c) 2018-2024 Status Research & Development GmbH
2
+ # Copyright (c) 2018-2025 Status Research & Development GmbH
3
3
# Licensed and distributed under either of
4
4
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
5
5
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
@@ -136,7 +136,7 @@ func compute_activation_exit_epoch*(epoch: Epoch): Epoch =
136
136
# # ``epoch`` take effect.
137
137
epoch + 1 + MAX_SEED_LOOKAHEAD
138
138
139
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8 /specs/phase0/beacon-chain.md#get_validator_churn_limit
139
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/phase0/beacon-chain.md#get_validator_churn_limit
140
140
func get_validator_churn_limit * (
141
141
cfg: RuntimeConfig , state: ForkyBeaconState , cache: var StateCache ):
142
142
uint64 =
@@ -247,7 +247,7 @@ func get_balance_churn_limit(
247
247
)
248
248
churn - churn mod EFFECTIVE_BALANCE_INCREMENT .Gwei
249
249
250
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0 /specs/electra/beacon-chain.md#new-get_activation_exit_churn_limit
250
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/electra/beacon-chain.md#new-get_activation_exit_churn_limit
251
251
func get_activation_exit_churn_limit * (
252
252
cfg: RuntimeConfig , state: electra.BeaconState | fulu.BeaconState , cache: var StateCache ):
253
253
Gwei =
@@ -398,9 +398,9 @@ func get_proposer_reward(state: ForkyBeaconState, whistleblower_reward: Gwei): G
398
398
else :
399
399
{.fatal : " invalid BeaconState type" .}
400
400
401
- # https://github.com/ethereum/consensus-specs/blob/v1.4 .0-beta.7 /specs/phase0/beacon-chain.md#slash_validator
401
+ # https://github.com/ethereum/consensus-specs/blob/v1.5 .0-alpha.10 /specs/phase0/beacon-chain.md#slash_validator
402
402
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#modified-slash_validator
403
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8 /specs/bellatrix/beacon-chain.md#modified-slash_validator
403
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/bellatrix/beacon-chain.md#modified-slash_validator
404
404
proc slash_validator * (
405
405
cfg: RuntimeConfig , state: var ForkyBeaconState ,
406
406
slashed_index: ValidatorIndex , pre_exit_queue_info: ExitQueueInfo ,
@@ -599,7 +599,7 @@ func is_eligible_for_activation*(
599
599
# Has not yet been activated
600
600
validator.activation_epoch == FAR_FUTURE_EPOCH
601
601
602
- # https://github.com/ethereum/consensus-specs/blob/v1.4.0 /specs/phase0/beacon-chain.md#is_valid_indexed_attestation
602
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/phase0/beacon-chain.md#is_valid_indexed_attestation
603
603
proc is_valid_indexed_attestation * (
604
604
state: ForkyBeaconState ,
605
605
# phase0.SomeIndexedAttestation | electra.SomeIndexedAttestation:
@@ -806,7 +806,7 @@ func check_attestation_target_epoch(
806
806
807
807
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#attestations
808
808
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#modified-process_attestation
809
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8 /specs/deneb/beacon-chain.md#modified-process_attestation
809
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/deneb/beacon-chain.md#modified-process_attestation
810
810
func check_attestation_inclusion (
811
811
consensusFork: static ConsensusFork , attestation_slot: Slot ,
812
812
current_slot: Slot ): Result [void , cstring ] =
@@ -908,7 +908,7 @@ func get_attestation_participation_flag_indices(
908
908
# TODO these duplicate some stuff in state_transition_epoch which uses TotalBalances
909
909
# better to centralize around that if feasible
910
910
911
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.8 /specs/phase0/beacon-chain.md#get_total_active_balance
911
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/phase0/beacon-chain.md#get_total_active_balance
912
912
func get_total_active_balance * (state: ForkyBeaconState , cache: var StateCache ): Gwei =
913
913
# # Return the combined effective balance of the active validators.
914
914
# # Note: ``get_total_balance`` returns ``EFFECTIVE_BALANCE_INCREMENT`` Gwei
@@ -935,7 +935,7 @@ func get_base_reward_per_increment*(
935
935
get_base_reward_per_increment_sqrt (
936
936
integer_squareroot (distinctBase (total_active_balance)))
937
937
938
- # https://github.com/ethereum/consensus-specs/blob/v1.4.0 /specs/altair/beacon-chain.md#get_base_reward
938
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/altair/beacon-chain.md#get_base_reward
939
939
func get_base_reward (
940
940
state: altair.BeaconState | bellatrix.BeaconState | capella.BeaconState |
941
941
deneb.BeaconState | electra.BeaconState | fulu.BeaconState ,
@@ -1050,7 +1050,7 @@ proc check_attestation*(
1050
1050
1051
1051
ok ()
1052
1052
1053
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.9 /specs/capella/beacon-chain.md#new-process_bls_to_execution_change
1053
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/capella/beacon-chain.md#new-process_bls_to_execution_change
1054
1054
proc check_bls_to_execution_change * (
1055
1055
genesisFork: Fork ,
1056
1056
state: capella.BeaconState | deneb.BeaconState | electra.BeaconState |
@@ -1297,7 +1297,7 @@ func has_eth1_withdrawal_credential*(validator: Validator): bool =
1297
1297
# # Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential.
1298
1298
validator.withdrawal_credentials.data[0 ] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
1299
1299
1300
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0 /specs/electra/beacon-chain.md#new-has_execution_withdrawal_credential
1300
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/electra/beacon-chain.md#new-has_execution_withdrawal_credential
1301
1301
func has_execution_withdrawal_credential * (validator: Validator ): bool =
1302
1302
# # Check if ``validator`` has a 0x01 or 0x02 prefixed withdrawal credential.
1303
1303
has_compounding_withdrawal_credential (validator) or
@@ -1358,7 +1358,7 @@ func queue_excess_active_balance(
1358
1358
signature: ValidatorSig .infinity,
1359
1359
slot: GENESIS_SLOT ))
1360
1360
1361
- # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.7 /specs/electra/beacon-chain.md#new-switch_to_compounding_validator
1361
+ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.10 /specs/electra/beacon-chain.md#new-switch_to_compounding_validator
1362
1362
func switch_to_compounding_validator * (
1363
1363
state: var (electra.BeaconState | fulu.BeaconState ),
1364
1364
index: ValidatorIndex ) =
0 commit comments