Skip to content

Commit f258cba

Browse files
authored
some v1.5.0-alpha.4 consensus spec URL updates (#6485)
1 parent 904318c commit f258cba

19 files changed

+44
-44
lines changed

beacon_chain/fork_choice/fork_choice.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ proc get_head*(self: var ForkChoice,
373373
self.checkpoints.justified.balances,
374374
self.checkpoints.proposer_boost_root)
375375

376-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/fork_choice/safe-block.md#get_safe_beacon_block_root
376+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/fork_choice/safe-block.md#get_safe_beacon_block_root
377377
func get_safe_beacon_block_root*(self: ForkChoice): Eth2Digest =
378378
# Use most recent justified block as a stopgap
379379
self.checkpoints.justified.checkpoint.root

beacon_chain/libnimbus_lc/libnimbus_lc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ typedef struct ETHBeaconBlockHeader ETHBeaconBlockHeader;
695695
*
696696
* @return Beacon block header.
697697
*
698-
* @see https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#beaconblockheader
698+
* @see https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/beacon-chain.md#beaconblockheader
699699
*/
700700
ETH_RESULT_USE_CHECK
701701
const ETHBeaconBlockHeader *ETHLightClientHeaderGetBeacon(

beacon_chain/libnimbus_lc/libnimbus_lc.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -841,7 +841,7 @@ proc ETHLightClientHeaderCopyBeaconRoot(
841841
## * Pointer to a copy of the given header's beacon block root.
842842
##
843843
## See:
844-
## * https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#hash_tree_root
844+
## * https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/beacon-chain.md#hash_tree_root
845845
discard cfg # Future-proof against new fields, see `get_lc_execution_root`.
846846
let root = Eth2Digest.new()
847847
root[] = header[].beacon.hash_tree_root()

beacon_chain/networking/eth2_network.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ type
176176
MounterProc* = proc(network: Eth2Node) {.gcsafe, raises: [].}
177177
MessageContentPrinter* = proc(msg: pointer): string {.gcsafe, raises: [].}
178178

179-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#goodbye
179+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/p2p-interface.md#goodbye
180180
DisconnectionReason* = enum
181181
# might see other values on the wire!
182182
ClientShutDown = 1
@@ -2556,7 +2556,7 @@ proc updateStabilitySubnetMetadata*(node: Eth2Node, attnets: AttnetBits) =
25562556
node.metadata.attnets = attnets
25572557

25582558
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/p2p-interface.md#attestation-subnet-subscription
2559-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.4/specs/phase0/p2p-interface.md#attestation-subnet-bitfield
2559+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/p2p-interface.md#attestation-subnet-bitfield
25602560
let res = node.discovery.updateRecord({
25612561
enrAttestationSubnetsField: SSZ.encode(node.metadata.attnets)
25622562
})

beacon_chain/nimbus_beacon_node.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ proc installMessageValidators(node: BeaconNode) =
17891789
let digest = forkDigests[].atConsensusFork(consensusFork)
17901790

17911791
# beacon_block
1792-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.1/specs/phase0/p2p-interface.md#beacon_block
1792+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/p2p-interface.md#beacon_block
17931793
node.network.addValidator(
17941794
getBeaconBlocksTopic(digest), proc (
17951795
signedBlock: consensusFork.SignedBeaconBlock

beacon_chain/spec/beaconstate.nim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func get_validator_churn_limit*(
9696
count_active_validators(
9797
state, state.get_current_epoch(), cache) div cfg.CHURN_LIMIT_QUOTIENT)
9898

99-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#new-get_validator_activation_churn_limit
99+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/deneb/beacon-chain.md#new-get_validator_activation_churn_limit
100100
func get_validator_activation_churn_limit*(
101101
cfg: RuntimeConfig, state: deneb.BeaconState | electra.BeaconState,
102102
cache: var StateCache): uint64 =
@@ -270,7 +270,7 @@ func compute_consolidation_epoch_and_update_churn*(
270270

271271
state.earliest_consolidation_epoch
272272

273-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#updated--initiate_validator_exit
273+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/beacon-chain.md#modified-initiate_validator_exit
274274
func initiate_validator_exit*(
275275
cfg: RuntimeConfig, state: var electra.BeaconState,
276276
index: ValidatorIndex, exit_queue_info: ExitQueueInfo,
@@ -326,7 +326,7 @@ func get_whistleblower_reward*(
326326
validator_effective_balance: Gwei): Gwei =
327327
validator_effective_balance div WHISTLEBLOWER_REWARD_QUOTIENT
328328

329-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.0/specs/electra/beacon-chain.md#updated-slash_validator
329+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/beacon-chain.md#modified-slash_validator
330330
func get_whistleblower_reward*(
331331
state: electra.BeaconState, validator_effective_balance: Gwei): Gwei =
332332
validator_effective_balance div WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA
@@ -407,7 +407,7 @@ func get_initial_beacon_block*(state: phase0.HashedBeaconState):
407407
phase0.TrustedSignedBeaconBlock(
408408
message: message, root: hash_tree_root(message))
409409

410-
# https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/altair/beacon-chain.md#initialize-state-for-pure-altair-testnets-and-test-vectors
410+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/altair/beacon-chain.md#initialize-state-for-pure-altair-testnets-and-test-vectors
411411
func get_initial_beacon_block*(state: altair.HashedBeaconState):
412412
altair.TrustedSignedBeaconBlock =
413413
# The genesis block is implicitly trusted
@@ -1128,7 +1128,7 @@ proc process_attestation*(
11281128

11291129
ok(proposer_reward)
11301130

1131-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#get_next_sync_committee_indices
1131+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/altair/beacon-chain.md#get_next_sync_committee_indices
11321132
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#modified-get_next_sync_committee_indices
11331133
func get_next_sync_committee_keys(
11341134
state: altair.BeaconState | bellatrix.BeaconState | capella.BeaconState |
@@ -1173,7 +1173,7 @@ func get_next_sync_committee_keys(
11731173
i += 1'u64
11741174
res
11751175

1176-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/beacon-chain.md#has_eth1_withdrawal_credential
1176+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/capella/beacon-chain.md#has_eth1_withdrawal_credential
11771177
func has_eth1_withdrawal_credential*(validator: Validator): bool =
11781178
## Check if ``validator`` has an 0x01 prefixed "eth1" withdrawal credential.
11791179
validator.withdrawal_credentials.data[0] == ETH1_ADDRESS_WITHDRAWAL_PREFIX
@@ -1195,7 +1195,7 @@ func has_execution_withdrawal_credential*(validator: Validator): bool =
11951195
has_compounding_withdrawal_credential(validator) or
11961196
has_eth1_withdrawal_credential(validator)
11971197

1198-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/beacon-chain.md#is_fully_withdrawable_validator
1198+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/capella/beacon-chain.md#is_fully_withdrawable_validator
11991199
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#updated-is_fully_withdrawable_validator
12001200
func is_fully_withdrawable_validator(
12011201
fork: static ConsensusFork, validator: Validator, balance: Gwei,

beacon_chain/spec/datatypes/base.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ type
304304
HashedValidatorPubKey* = object
305305
value*: ptr HashedValidatorPubKeyItem
306306

307-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#validator
307+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/beacon-chain.md#validator
308308
Validator* = object
309309
pubkeyData*{.serializedFieldName: "pubkey".}: HashedValidatorPubKey
310310

@@ -363,7 +363,7 @@ type
363363
message*: VoluntaryExit
364364
signature*: TrustedSig
365365

366-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#beaconblockheader
366+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/phase0/beacon-chain.md#beaconblockheader
367367
BeaconBlockHeader* = object
368368
slot*: Slot
369369
proposer_index*: uint64 # `ValidatorIndex` after validation

beacon_chain/spec/datatypes/capella.nim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const
3232
# This index is rooted in `BeaconBlockBody`.
3333
# The first member (`randao_reveal`) is 16, subsequent members +1 each.
3434
# If there are ever more than 16 members in `BeaconBlockBody`, indices change!
35-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/ssz/merkle-proofs.md
35+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/ssz/merkle-proofs.md
3636
# execution_payload
3737
EXECUTION_PAYLOAD_GINDEX* = 25.GeneralizedIndex
3838

@@ -124,7 +124,7 @@ type
124124
ExecutionBranch* =
125125
array[log2trunc(EXECUTION_PAYLOAD_GINDEX), Eth2Digest]
126126

127-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/light-client/sync-protocol.md#modified-lightclientheader
127+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/capella/light-client/sync-protocol.md#modified-lightclientheader
128128
LightClientHeader* = object
129129
beacon*: BeaconBlockHeader
130130
## Beacon block header
@@ -358,7 +358,7 @@ type
358358
state_root*: Eth2Digest
359359
body*: TrustedBeaconBlockBody
360360

361-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#beaconblockbody
361+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/capella/beacon-chain.md#beaconblockbody
362362
BeaconBlockBody* = object
363363
randao_reveal*: ValidatorSig
364364
eth1_data*: Eth1Data
@@ -699,7 +699,7 @@ func upgrade_lc_bootstrap_to_capella*(
699699
current_sync_committee: pre.current_sync_committee,
700700
current_sync_committee_branch: pre.current_sync_committee_branch)
701701

702-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/light-client/fork.md#upgrading-light-client-data
702+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/capella/light-client/fork.md#upgrading-light-client-data
703703
func upgrade_lc_update_to_capella*(
704704
pre: altair.LightClientUpdate): LightClientUpdate =
705705
LightClientUpdate(

beacon_chain/spec/datatypes/constants.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ const
8787
UNSET_DEPOSIT_REQUESTS_START_INDEX*: uint64 = not 0'u64
8888
FULL_EXIT_REQUEST_AMOUNT*: uint64 = 0
8989

90-
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#withdrawal-prefixes
90+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/electra/beacon-chain.md#withdrawal-prefixes
9191
COMPOUNDING_WITHDRAWAL_PREFIX* = 0x02

beacon_chain/spec/datatypes/deneb.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ type
167167
## Current sync committee corresponding to `header.beacon.state_root`
168168
current_sync_committee_branch*: altair.CurrentSyncCommitteeBranch
169169

170-
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/altair/light-client/sync-protocol.md#lightclientupdate
170+
# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.4/specs/altair/light-client/sync-protocol.md#lightclientupdate
171171
LightClientUpdate* = object
172172
attested_header*: LightClientHeader
173173
## Header attested to by the sync committee

0 commit comments

Comments
 (0)