From e0a6f58abe4dabb39ffed90f423ce3597838621d Mon Sep 17 00:00:00 2001 From: tersec Date: Fri, 31 Jul 2020 09:59:14 +0000 Subject: [PATCH] convert 10 v0.12.1 spec refs to v0.12.2 (#1406) --- README.md | 2 +- beacon_chain/attestation_aggregation.nim | 2 +- beacon_chain/beacon_node.nim | 2 +- beacon_chain/block_pools/candidate_chains.nim | 2 +- beacon_chain/eth2_network.nim | 2 +- beacon_chain/spec/presets/v0_12_2/mainnet.nim | 2 +- beacon_chain/spec/presets/v0_12_2/minimal.nim | 4 ++-- beacon_chain/spec/state_transition.nim | 2 +- beacon_chain/validator_duties.nim | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index a3630217e..7028c90ee 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ You can find complete information about running a beacon node and operating as a ## Related projects * [status-im/nimbus](https://github.com/status-im/nimbus/): Nimbus for Ethereum 1 -* [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs/tree/v0.12.1#phase-0): Serenity specification that this project implements +* [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs/tree/v0.12.2#phase-0): Serenity specification that this project implements You can check where the beacon chain fits in the Ethereum ecosystem our Two-Point-Oh series: https://our.status.im/tag/two-point-oh/ diff --git a/beacon_chain/attestation_aggregation.nim b/beacon_chain/attestation_aggregation.nim index b73e9dd0b..14b2ebbc9 100644 --- a/beacon_chain/attestation_aggregation.nim +++ b/beacon_chain/attestation_aggregation.nim @@ -47,7 +47,7 @@ proc aggregate_attestations*( # TODO for testing purposes, refactor this into the condition check # and just calculation - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/validator.md#aggregation-selection + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/validator.md#aggregation-selection if not is_aggregator(state, slot, index, slot_signature, cache): return none(AggregateAndProof) diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index 804a02718..12f083a3a 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -769,7 +769,7 @@ proc installAttestationHandlers(node: BeaconNode) = var attestationSubscriptions: seq[Future[void]] = @[] - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/p2p-interface.md#attestations-and-aggregation + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/p2p-interface.md#attestations-and-aggregation for it in 0'u64 ..< ATTESTATION_SUBNET_COUNT.uint64: closureScope: let ci = it diff --git a/beacon_chain/block_pools/candidate_chains.nim b/beacon_chain/block_pools/candidate_chains.nim index 3ac01c484..eeba0402d 100644 --- a/beacon_chain/block_pools/candidate_chains.nim +++ b/beacon_chain/block_pools/candidate_chains.nim @@ -116,7 +116,7 @@ func getAncestorAt*(blck: BlockRef, slot: Slot): BlockRef = blck = blck.parent func get_ancestor*(blck: BlockRef, slot: Slot): BlockRef = - ## https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/fork-choice.md#get_ancestor + ## https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/fork-choice.md#get_ancestor ## Return ancestor at slot, or nil if queried block is older var blck = blck diff --git a/beacon_chain/eth2_network.nim b/beacon_chain/eth2_network.nim index 171e423e7..a1c656f01 100644 --- a/beacon_chain/eth2_network.nim +++ b/beacon_chain/eth2_network.nim @@ -1136,7 +1136,7 @@ proc getPersistentNetKeys*( KeyPair(seckey: privKey, pubkey: privKey.getKey().tryGet()) func gossipId(data: openArray[byte]): string = - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/p2p-interface.md#topics-and-messages + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/p2p-interface.md#topics-and-messages base64.encode(Base64Url, sha256.digest(data).data) func msgIdProvider(m: messages.Message): string = diff --git a/beacon_chain/spec/presets/v0_12_2/mainnet.nim b/beacon_chain/spec/presets/v0_12_2/mainnet.nim index 8bd35ca7c..a9b760e93 100644 --- a/beacon_chain/spec/presets/v0_12_2/mainnet.nim +++ b/beacon_chain/spec/presets/v0_12_2/mainnet.nim @@ -146,7 +146,7 @@ const # Fork choice # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/configs/mainnet.yaml#L32 + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/configs/mainnet/phase0.yaml#L32 SAFE_SLOTS_TO_UPDATE_JUSTIFIED*: uint64 = 8 # 96 seconds # Validators diff --git a/beacon_chain/spec/presets/v0_12_2/minimal.nim b/beacon_chain/spec/presets/v0_12_2/minimal.nim index c3a5aaf81..75e450f0d 100644 --- a/beacon_chain/spec/presets/v0_12_2/minimal.nim +++ b/beacon_chain/spec/presets/v0_12_2/minimal.nim @@ -53,7 +53,7 @@ const # Time parameters # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/configs/minimal.yaml#L77 + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/configs/minimal/phase0.yaml#L80 # Changed: Faster to spin up testnets, but does not give validator # reasonable warning time for genesis @@ -134,7 +134,7 @@ const # Validators # --------------------------------------------------------------- - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/configs/minimal.yaml#L38 + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/configs/minimal/phase0.yaml#L38 # Changed ETH1_FOLLOW_DISTANCE* {.intdefine.}: uint64 = 16 # blocks diff --git a/beacon_chain/spec/state_transition.nim b/beacon_chain/spec/state_transition.nim index 2a2afcaa4..51d32633e 100644 --- a/beacon_chain/spec/state_transition.nim +++ b/beacon_chain/spec/state_transition.nim @@ -247,7 +247,7 @@ proc state_transition*( var cache = StateCache() state_transition(preset, state, signedBlock, cache, flags, rollback) -# https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/validator.md#preparing-for-a-beaconblock +# https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/validator.md#preparing-for-a-beaconblock # TODO There's more to do here - the spec has helpers that deal set up some of # the fields in here! proc makeBeaconBlock*( diff --git a/beacon_chain/validator_duties.nim b/beacon_chain/validator_duties.nim index 914aba08b..a9eceb08b 100644 --- a/beacon_chain/validator_duties.nim +++ b/beacon_chain/validator_duties.nim @@ -316,7 +316,7 @@ proc handleAttestations(node: BeaconNode, head: BlockRef, slot: Slot) = # We need to run attestations exactly for the slot that we're attesting to. # In case blocks went missing, this means advancing past the latest block # using empty slots as fillers. - # https://github.com/ethereum/eth2.0-specs/blob/v0.12.1/specs/phase0/validator.md#validator-assignments + # https://github.com/ethereum/eth2.0-specs/blob/v0.12.2/specs/phase0/validator.md#validator-assignments # TODO we could cache the validator assignment since it's valid for the entire # epoch since it doesn't change, but that has to be weighed against # the complexity of handling forks correctly - instead, we use an adapted