diff --git a/beacon_chain/eth1/merkle_minimal.nim b/beacon_chain/eth1/merkle_minimal.nim index 3ddcf9bf0..13d4de333 100644 --- a/beacon_chain/eth1/merkle_minimal.nim +++ b/beacon_chain/eth1/merkle_minimal.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2018-2021 Status Research & Development GmbH +# Copyright (c) 2018-2022 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -7,7 +7,7 @@ {.push raises: [Defect].} -# https://github.com/ethereum/consensus-specs/blob/v1.1.5/tests/core/pyspec/eth2spec/utils/merkle_minimal.py +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/tests/core/pyspec/eth2spec/utils/merkle_minimal.py # Merkle tree helpers # --------------------------------------------------------------- diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index 239615a22..ff63a028f 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2018-2021 Status Research & Development GmbH +# Copyright (c) 2018-2022 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -1822,12 +1822,12 @@ proc newBeaconSwitch*(config: BeaconNodeConf, seckey: PrivateKey, .withTcpTransport({ServerFlags.ReuseAddr}) .build() -# https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/phase0/p2p-interface.md#configuration +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/specs/phase0/p2p-interface.md#configuration # https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/merge/p2p-interface.md#configuration func maxGossipMaxSize(): auto {.compileTime.} = max(GOSSIP_MAX_SIZE, GOSSIP_MAX_SIZE_MERGE) -# https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/phase0/p2p-interface.md#configuration +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/specs/phase0/p2p-interface.md#configuration # https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/merge/p2p-interface.md#configuration template gossipMaxSize(T: untyped): uint32 = const maxSize = static: diff --git a/beacon_chain/spec/helpers.nim b/beacon_chain/spec/helpers.nim index 0b70cd7f7..e205a2bfc 100644 --- a/beacon_chain/spec/helpers.nim +++ b/beacon_chain/spec/helpers.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2018-2021 Status Research & Development GmbH +# Copyright (c) 2018-2022 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -48,7 +48,7 @@ template epoch*(slot: Slot): Epoch = template isEpoch*(slot: Slot): bool = (slot mod SLOTS_PER_EPOCH) == 0 -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#generalized_index_sibling +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#generalized_index_sibling template generalized_index_sibling*( index: GeneralizedIndex): GeneralizedIndex = index xor 1.GeneralizedIndex @@ -61,12 +61,12 @@ template generalized_index_sibling_right( index: GeneralizedIndex): GeneralizedIndex = index or 1.GeneralizedIndex -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#generalized_index_parent +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#generalized_index_parent template generalized_index_parent*( index: GeneralizedIndex): GeneralizedIndex = index shr 1 -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#merkle-multiproofs +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#merkle-multiproofs iterator get_branch_indices*( tree_index: GeneralizedIndex): GeneralizedIndex = ## Get the generalized indices of the sister chunks along the path @@ -76,7 +76,7 @@ iterator get_branch_indices*( yield generalized_index_sibling(index) index = generalized_index_parent(index) -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#merkle-multiproofs +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#merkle-multiproofs iterator get_path_indices*( tree_index: GeneralizedIndex): GeneralizedIndex = ## Get the generalized indices of the chunks along the path @@ -86,7 +86,7 @@ iterator get_path_indices*( yield index index = generalized_index_parent(index) -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#merkle-multiproofs +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#merkle-multiproofs func get_helper_indices*( indices: openArray[GeneralizedIndex]): seq[GeneralizedIndex] = ## Get the generalized indices of all "extra" chunks in the tree needed @@ -107,7 +107,7 @@ func get_helper_indices*( res.sort(SortOrder.Descending) res -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#merkle-multiproofs +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#merkle-multiproofs func check_multiproof_acceptable*( indices: openArray[GeneralizedIndex]): Result[void, string] = # Check that proof verification won't allocate excessive amounts of memory. @@ -259,7 +259,7 @@ func calculate_multi_merkle_root*( calculate_multi_merkle_root_impl( leaves, proof, indices, get_helper_indices(indices)) -# https://github.com/ethereum/consensus-specs/blob/v1.1.6/ssz/merkle-proofs.md#merkle-multiproofs +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/ssz/merkle-proofs.md#merkle-multiproofs func verify_merkle_multiproof*( leaves: openArray[Eth2Digest], proof: openArray[Eth2Digest], diff --git a/beacon_chain/spec/light_client_sync.nim b/beacon_chain/spec/light_client_sync.nim index 22e974c0c..2d7ef45cd 100644 --- a/beacon_chain/spec/light_client_sync.nim +++ b/beacon_chain/spec/light_client_sync.nim @@ -4,7 +4,7 @@ import datatypes/altair, helpers -# https://github.com/ethereum/consensus-specs/blob/v1.1.7/specs/altair/sync-protocol.md#get_active_header +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/specs/altair/sync-protocol.md#get_active_header func get_active_header(update: LightClientUpdate): BeaconBlockHeader = # The "active header" is the header that the update is trying to convince # us to accept. If a finalized header is present, it's the finalized diff --git a/beacon_chain/spec/signatures_batch.nim b/beacon_chain/spec/signatures_batch.nim index 989a8b710..9a9f57176 100644 --- a/beacon_chain/spec/signatures_batch.nim +++ b/beacon_chain/spec/signatures_batch.nim @@ -103,7 +103,7 @@ proc aggregateAttesters( # Aggregation spec requires non-empty collection # - https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04 # Eth2 spec requires at least one attesting index in attestation - # - https://github.com/ethereum/consensus-specs/blob/v1.1.5/specs/phase0/beacon-chain.md#is_valid_indexed_attestation + # - https://github.com/ethereum/consensus-specs/blob/v1.1.8/specs/phase0/beacon-chain.md#is_valid_indexed_attestation return err("aggregateAttesters: no attesting indices") var attestersAgg{.noInit.}: AggregatePublicKey diff --git a/tests/consensus_spec/altair/test_fixture_sync_protocol.nim b/tests/consensus_spec/altair/test_fixture_sync_protocol.nim index 9144517b9..8145551ef 100644 --- a/tests/consensus_spec/altair/test_fixture_sync_protocol.nim +++ b/tests/consensus_spec/altair/test_fixture_sync_protocol.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2021 Status Research & Development GmbH +# Copyright (c) 2021-2022 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -149,7 +149,7 @@ suite "Ethereum Foundation - Altair - Unittests - Sync protocol" & preset(): store.finalized_header == pre_store_finalized_header store.best_valid_update.get == update - # https://github.com/ethereum/consensus-specs/blob/v1.1.7/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py#L93-L154 + # https://github.com/ethereum/consensus-specs/blob/v1.1.8/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py#L93-L154 test "process_light_client_update_timeout": var forked = assignClone(genesisState[]) template state: untyped {.inject.} = forked[].altairData.data @@ -217,7 +217,7 @@ suite "Ethereum Foundation - Altair - Unittests - Sync protocol" & preset(): store.best_valid_update.get == update store.finalized_header == pre_store_finalized_header - # https://github.com/ethereum/consensus-specs/blob/v1.1.7/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py#L157-L224 + # https://github.com/ethereum/consensus-specs/blob/v1.1.8/tests/core/pyspec/eth2spec/test/altair/unittests/test_sync_protocol.py#L157-L224 test "process_light_client_update_finality_updated": var forked = assignClone(genesisState[]) template state: untyped {.inject.} = forked[].altairData.data diff --git a/tests/mocking/mock_blocks.nim b/tests/mocking/mock_blocks.nim index f5210df82..5e6db1446 100644 --- a/tests/mocking/mock_blocks.nim +++ b/tests/mocking/mock_blocks.nim @@ -1,5 +1,5 @@ # beacon_chain -# Copyright (c) 2018-2021 Status Research & Development GmbH +# Copyright (c) 2018-2022 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). # * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0). @@ -16,7 +16,7 @@ import # Routines for mocking blocks # --------------------------------------------------------------- -# https://github.com/ethereum/consensus-specs/blob/v1.1.5/tests/core/pyspec/eth2spec/test/helpers/block.py#L26-L35 +# https://github.com/ethereum/consensus-specs/blob/v1.1.8/tests/core/pyspec/eth2spec/test/helpers/block.py#L26-L35 func apply_randao_reveal(state: ForkyBeaconState, blck: var ForkySignedBeaconBlock) = doAssert state.slot <= blck.message.slot let