From 47a6045b053d2ea9e0b686ca6b1dcc1b7442752d Mon Sep 17 00:00:00 2001 From: tersec Date: Wed, 29 Sep 2021 23:43:28 +0000 Subject: [PATCH] update a dozen spec URLs (#2929) --- beacon_chain/consensus_object_pools/README.md | 2 +- beacon_chain/consensus_object_pools/spec_cache.nim | 2 +- beacon_chain/eth1/merkle_minimal.nim | 2 +- beacon_chain/spec/beaconstate.nim | 6 +++--- beacon_chain/spec/datatypes/phase0.nim | 2 +- beacon_chain/spec/presets/mainnet/altair_preset.nim | 2 +- beacon_chain/spec/state_transition_block.nim | 2 +- beacon_chain/spec/state_transition_epoch.nim | 2 +- beacon_chain/spec/validator.nim | 2 +- beacon_chain/validators/validator_pool.nim | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/beacon_chain/consensus_object_pools/README.md b/beacon_chain/consensus_object_pools/README.md index 15a3254f5..9eea4859c 100644 --- a/beacon_chain/consensus_object_pools/README.md +++ b/beacon_chain/consensus_object_pools/README.md @@ -9,7 +9,7 @@ to specs: - unaggregated attestation: https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/p2p-interface.md#beacon_attestation_subnet_id - voluntary exits: https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#voluntary_exit - Attester slashings: https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/p2p-interface.md#attester_slashing -- Proposer slashings: https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#proposer_slashing +- Proposer slashings: https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/p2p-interface.md#proposer_slashing After "gossip validation" the consensus objects can be rebroadcasted as they are optimistically good, however for internal processing further verification is needed. For blocks, this means verifying state transition and all contained cryptographic signatures (instead of just the proposer signature). diff --git a/beacon_chain/consensus_object_pools/spec_cache.nim b/beacon_chain/consensus_object_pools/spec_cache.nim index 94064662f..08bd756c3 100644 --- a/beacon_chain/consensus_object_pools/spec_cache.nim +++ b/beacon_chain/consensus_object_pools/spec_cache.nim @@ -114,7 +114,7 @@ func get_attesting_indices*(epochRef: EpochRef, for idx in get_attesting_indices(epochRef, data, bits): result.add(idx) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#is_valid_indexed_attestation +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#is_valid_indexed_attestation proc is_valid_indexed_attestation*( fork: Fork, genesis_validators_root: Eth2Digest, epochRef: EpochRef, diff --git a/beacon_chain/eth1/merkle_minimal.nim b/beacon_chain/eth1/merkle_minimal.nim index fec62eaec..9b7bf6861 100644 --- a/beacon_chain/eth1/merkle_minimal.nim +++ b/beacon_chain/eth1/merkle_minimal.nim @@ -7,7 +7,7 @@ {.push raises: [Defect].} -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/tests/core/pyspec/eth2spec/utils/merkle_minimal.py +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/tests/core/pyspec/eth2spec/utils/merkle_minimal.py # Merkle tree helpers # --------------------------------------------------------------- diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 20e299617..83bb3466d 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -302,7 +302,7 @@ proc initialize_hashed_beacon_state_from_eth1*( phase0.HashedBeaconState( data: genesisState[], root: hash_tree_root(genesisState[])) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#genesis-block +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#genesis-block func get_initial_beacon_block*(state: phase0.BeaconState): phase0.TrustedSignedBeaconBlock = # The genesis block is implicitly trusted @@ -314,7 +314,7 @@ func get_initial_beacon_block*(state: phase0.BeaconState): phase0.TrustedSignedBeaconBlock( message: message, root: hash_tree_root(message)) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#get_block_root_at_slot +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#get_block_root_at_slot func get_block_root_at_slot*(state: SomeBeaconState, slot: Slot): Eth2Digest = ## Return the block root at a recent ``slot``. @@ -332,7 +332,7 @@ func get_block_root*(state: SomeBeaconState, epoch: Epoch): Eth2Digest = ## Return the block root at the start of a recent ``epoch``. get_block_root_at_slot(state, compute_start_slot_at_epoch(epoch)) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#get_total_balance +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#get_total_balance template get_total_balance( state: SomeBeaconState, validator_indices: untyped): Gwei = ## Return the combined effective balance of the ``indices``. diff --git a/beacon_chain/spec/datatypes/phase0.nim b/beacon_chain/spec/datatypes/phase0.nim index 21eb9ccd1..93bb04893 100644 --- a/beacon_chain/spec/datatypes/phase0.nim +++ b/beacon_chain/spec/datatypes/phase0.nim @@ -33,7 +33,7 @@ import json_serialization/types as jsonTypes type - # https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#beaconstate + # https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#beaconstate BeaconState* = object # Versioning genesis_time*: uint64 diff --git a/beacon_chain/spec/presets/mainnet/altair_preset.nim b/beacon_chain/spec/presets/mainnet/altair_preset.nim index 9a2630469..4450649b0 100644 --- a/beacon_chain/spec/presets/mainnet/altair_preset.nim +++ b/beacon_chain/spec/presets/mainnet/altair_preset.nim @@ -1,5 +1,5 @@ # Mainnet preset - Altair -# https://github.com/ethereum/consensus-specs/blob/v1.1.0-beta.5/presets/mainnet/altair.yaml +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/presets/mainnet/altair.yaml const # Updated penalty values # --------------------------------------------------------------- diff --git a/beacon_chain/spec/state_transition_block.nim b/beacon_chain/spec/state_transition_block.nim index e06716f09..cb511477f 100644 --- a/beacon_chain/spec/state_transition_block.nim +++ b/beacon_chain/spec/state_transition_block.nim @@ -123,7 +123,7 @@ func is_slashable_validator(validator: Validator, epoch: Epoch): bool = (validator.activation_epoch <= epoch) and (epoch < validator.withdrawable_epoch) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#proposer-slashings +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#proposer-slashings proc check_proposer_slashing*( state: var SomeBeaconState, proposer_slashing: SomeProposerSlashing, flags: UpdateFlags): diff --git a/beacon_chain/spec/state_transition_epoch.nim b/beacon_chain/spec/state_transition_epoch.nim index b182327b0..683c3b914 100644 --- a/beacon_chain/spec/state_transition_epoch.nim +++ b/beacon_chain/spec/state_transition_epoch.nim @@ -971,7 +971,7 @@ proc process_epoch*( process_inactivity_updates(cfg, state) # [New in Altair] - # https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#rewards-and-penalties-1 + # https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#rewards-and-penalties-1 process_rewards_and_penalties( cfg, state, total_active_balance, unslashed_participating_balances) diff --git a/beacon_chain/spec/validator.nim b/beacon_chain/spec/validator.nim index 987a5131f..80877b7da 100644 --- a/beacon_chain/spec/validator.nim +++ b/beacon_chain/spec/validator.nim @@ -319,7 +319,7 @@ func compute_shuffled_index*( cur_idx_permuted -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#compute_proposer_index +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/beacon-chain.md#compute_proposer_index func compute_proposer_index(state: SomeBeaconState, indices: seq[ValidatorIndex], seed: Eth2Digest): Option[ValidatorIndex] = ## Return from ``indices`` a random index sampled by effective balance. diff --git a/beacon_chain/validators/validator_pool.nim b/beacon_chain/validators/validator_pool.nim index 54b39f8f2..10c580a78 100644 --- a/beacon_chain/validators/validator_pool.nim +++ b/beacon_chain/validators/validator_pool.nim @@ -203,7 +203,7 @@ proc sign*( else: await signWithRemoteValidator(v, signing_root) -# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/validator.md#randao-reveal +# https://github.com/ethereum/consensus-specs/blob/v1.1.0/specs/phase0/validator.md#randao-reveal func genRandaoReveal*(k: ValidatorPrivKey, fork: Fork, genesis_validators_root: Eth2Digest, slot: Slot): CookedSig =