From 9725d15a3e7c1350b243cd933625eacf7461ab5f Mon Sep 17 00:00:00 2001 From: tersec Date: Thu, 26 Aug 2021 08:21:52 +0000 Subject: [PATCH] update spec references from eth2.0-specs to consensus-specs and to v1.1.0-beta.2 (#2822) --- README.md | 2 +- beacon_chain/consensus_object_pools/README.md | 12 ++-- .../consensus_object_pools/spec_cache.nim | 18 +++--- beacon_chain/eth1/eth1_monitor.nim | 8 +-- beacon_chain/fork_choice/README.md | 2 +- beacon_chain/gossip_processing/README.md | 12 ++-- beacon_chain/spec/datatypes/altair.nim | 41 ++++++------ beacon_chain/spec/datatypes/base.nim | 64 +++++++++---------- beacon_chain/spec/signatures_batch.nim | 2 +- beacon_chain/spec/state_transition_block.nim | 32 +++++----- beacon_chain/spec/validator.nim | 24 +++---- docs/attestation_flow.md | 12 ++-- docs/block_flow.md | 8 +-- .../src/01_introduction.md | 2 +- .../src/03_nbc_nimbus_beacon_chain.md | 4 +- ncli/README.md | 2 +- tests/official/test_fixture_rewards.nim | 2 +- tests/test_zero_signature.nim | 4 +- tests/testblockutil.nim | 2 +- 19 files changed, 126 insertions(+), 127 deletions(-) diff --git a/README.md b/README.md index fe9be2d8e..1b3cdb63b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ The [Quickstart](https://nimbus.guide/quick-start.html) in particular will help ## Related projects * [status-im/nimbus-eth1](https://github.com/status-im/nimbus-eth1/): Nimbus for Ethereum 1 -* [ethereum/eth2.0-specs](https://github.com/ethereum/eth2.0-specs/tree/v1.0.1#phase-0): Serenity specification that this project implements +* [ethereum/consensus-specs](https://github.com/ethereum/consensus-specs/tree/v1.0.1#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/consensus_object_pools/README.md b/beacon_chain/consensus_object_pools/README.md index 49e0e5de5..0c784e3fd 100644 --- a/beacon_chain/consensus_object_pools/README.md +++ b/beacon_chain/consensus_object_pools/README.md @@ -4,12 +4,12 @@ This folder holds the various consensus object pools needed for a blockchain cli Object in those pools have passed the "gossip validation" filter according to specs: -- blocks: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_block -- aggregate attestations: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof -- unaggregate attestation: https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_attestation_subnet_id -- voluntary exits https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#voluntary_exit -- Attester slashings https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#attester_slashing -- Proposer slashins https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#proposer_slashing +- blocks: https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_block +- aggregate attestations: https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof +- unaggregate attestation: https://github.com/ethereum/consensus-specs/blob/v1.0.1/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.0.1/specs/phase0/p2p-interface.md#attester_slashing +- Proposer slashins https://github.com/ethereum/consensus-specs/blob/v1.0.1/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 371ea088e..fa5ccddb4 100644 --- a/beacon_chain/consensus_object_pools/spec_cache.nim +++ b/beacon_chain/consensus_object_pools/spec_cache.nim @@ -22,7 +22,7 @@ export func count_active_validators*(epochInfo: EpochRef): uint64 = epochInfo.shuffled_active_validator_indices.lenu64 -# https://github.com/ethereum/eth2.0-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#get_committee_count_per_slot +# https://github.com/ethereum/consensus-specs/blob/v1.0.1/specs/phase0/beacon-chain.md#get_committee_count_per_slot func get_committee_count_per_slot*(epochInfo: EpochRef): uint64 = get_committee_count_per_slot(count_active_validators(epochInfo)) @@ -30,7 +30,7 @@ iterator get_committee_indices*(epochRef: EpochRef): CommitteeIndex = for i in 0'u64..