diff --git a/beacon_chain/consensus_object_pools/README.md b/beacon_chain/consensus_object_pools/README.md index b3350a489..14b0677b6 100644 --- a/beacon_chain/consensus_object_pools/README.md +++ b/beacon_chain/consensus_object_pools/README.md @@ -5,9 +5,9 @@ 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/consensus-specs/blob/v1.4.0/specs/phase0/p2p-interface.md#beacon_block -- aggregate attestations: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof +- aggregate attestations: https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/p2p-interface.md#beacon_aggregate_and_proof - unaggregated attestation: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#beacon_attestation_subnet_id -- voluntary exits: https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/p2p-interface.md#voluntary_exit +- voluntary exits: https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/p2p-interface.md#voluntary_exit - Attester slashings: https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/p2p-interface.md#attester_slashing - Proposer slashings: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#proposer_slashing diff --git a/beacon_chain/consensus_object_pools/blockchain_dag.nim b/beacon_chain/consensus_object_pools/blockchain_dag.nim index 61cf2389f..a8cc9531a 100644 --- a/beacon_chain/consensus_object_pools/blockchain_dag.nim +++ b/beacon_chain/consensus_object_pools/blockchain_dag.nim @@ -2676,7 +2676,7 @@ func aggregateAll*( # Aggregation spec requires non-empty collection # - https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04 # Consensus specs require at least one attesting index in attestation - # - https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#is_valid_indexed_attestation + # - https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#is_valid_indexed_attestation return err("aggregate: no attesting keys") let diff --git a/beacon_chain/gossip_processing/README.md b/beacon_chain/gossip_processing/README.md index ea59c6d0f..5547265de 100644 --- a/beacon_chain/gossip_processing/README.md +++ b/beacon_chain/gossip_processing/README.md @@ -14,7 +14,7 @@ Gossip validation is different from consensus verification in particular for blo - Attestations (unaggregated): https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/p2p-interface.md#attestation-subnets - Voluntary exits: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.4/specs/phase0/p2p-interface.md#voluntary_exit - Proposer slashings: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#proposer_slashing -- Attester slashing: https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#attester_slashing +- Attester slashing: https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/p2p-interface.md#attester_slashing There are multiple consumers of validated consensus objects: - a `ValidationResult.Accept` output triggers rebroadcasting in libp2p diff --git a/beacon_chain/libnimbus_lc/libnimbus_lc.h b/beacon_chain/libnimbus_lc/libnimbus_lc.h index 1ba736de8..dbcfb57cb 100644 --- a/beacon_chain/libnimbus_lc/libnimbus_lc.h +++ b/beacon_chain/libnimbus_lc/libnimbus_lc.h @@ -271,7 +271,7 @@ void ETHBeaconClockDestroy(ETHBeaconClock *beaconClock); * @return Slot number for the current wall clock time - If genesis has occurred. * @return `0` - If genesis is still pending. * - * @see https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#custom-types + * @see https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#custom-types */ ETH_RESULT_USE_CHECK int ETHBeaconClockGetSlot(const ETHBeaconClock *beaconClock); diff --git a/beacon_chain/libnimbus_lc/libnimbus_lc.nim b/beacon_chain/libnimbus_lc/libnimbus_lc.nim index 9b6780d4e..16d08864a 100644 --- a/beacon_chain/libnimbus_lc/libnimbus_lc.nim +++ b/beacon_chain/libnimbus_lc/libnimbus_lc.nim @@ -735,7 +735,7 @@ func ETHLightClientStoreGetFinalizedHeader( ## * Latest finalized header. ## ## See: - ## * https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/light-client/sync-protocol.md#modified-lightclientheader + ## * https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/light-client/sync-protocol.md#modified-lightclientheader addr store[].finalized_header func ETHLightClientStoreIsNextSyncCommitteeKnown( diff --git a/beacon_chain/networking/eth2_network.nim b/beacon_chain/networking/eth2_network.nim index 22aef2ecd..2e64a2127 100644 --- a/beacon_chain/networking/eth2_network.nim +++ b/beacon_chain/networking/eth2_network.nim @@ -2234,7 +2234,7 @@ proc getPersistentNetKeys*( func gossipId( data: openArray[byte], phase0Prefix, topic: string): seq[byte] = # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/p2p-interface.md#topics-and-messages - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/p2p-interface.md#topics-and-messages + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/p2p-interface.md#topics-and-messages const MESSAGE_DOMAIN_VALID_SNAPPY = [0x01'u8, 0x00, 0x00, 0x00] let messageDigest = withEth2Hash: h.update(MESSAGE_DOMAIN_VALID_SNAPPY) diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index 42d28aed5..bf23606a3 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -1863,7 +1863,7 @@ proc installMessageValidators(node: BeaconNode) = MsgSource.gossip, attesterSlashing))) # proposer_slashing - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/phase0/p2p-interface.md#proposer_slashing + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/p2p-interface.md#proposer_slashing node.network.addValidator( getProposerSlashingsTopic(digest), proc ( proposerSlashing: ProposerSlashing diff --git a/beacon_chain/spec/beaconstate.nim b/beacon_chain/spec/beaconstate.nim index 21505dddf..6a06adbeb 100644 --- a/beacon_chain/spec/beaconstate.nim +++ b/beacon_chain/spec/beaconstate.nim @@ -80,7 +80,7 @@ func get_validator_from_deposit*( effective_balance: 0.Gwei # [Modified in Electra:EIP7251] ) -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.7/specs/phase0/beacon-chain.md#compute_activation_exit_epoch +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#compute_activation_exit_epoch func compute_activation_exit_epoch*(epoch: Epoch): Epoch = ## Return the epoch during which validator activations and exits initiated in ## ``epoch`` take effect. @@ -270,7 +270,7 @@ func compute_consolidation_epoch_and_update_churn*( state.earliest_consolidation_epoch -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/electra/beacon-chain.md#modified-initiate_validator_exit +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#modified-initiate_validator_exit func initiate_validator_exit*( cfg: RuntimeConfig, state: var electra.BeaconState, index: ValidatorIndex, exit_queue_info: ExitQueueInfo, @@ -843,7 +843,7 @@ func get_attestation_participation_flag_indices( # TODO these duplicate some stuff in state_transition_epoch which uses TotalBalances # better to centralize around that if feasible -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#get_total_active_balance +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#get_total_active_balance func get_total_active_balance*(state: ForkyBeaconState, cache: var StateCache): Gwei = ## Return the combined effective balance of the active validators. ## Note: ``get_total_balance`` returns ``EFFECTIVE_BALANCE_INCREMENT`` Gwei @@ -859,7 +859,7 @@ func get_total_active_balance*(state: ForkyBeaconState, cache: var StateCache): cache.total_active_balance[epoch] = tab return tab -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#get_base_reward_per_increment +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/beacon-chain.md#get_base_reward_per_increment func get_base_reward_per_increment_sqrt( total_active_balance_sqrt: uint64): Gwei = EFFECTIVE_BALANCE_INCREMENT.Gwei * BASE_REWARD_FACTOR div @@ -1287,7 +1287,7 @@ template effective_balance_might_update*( balance + DOWNWARD_THRESHOLD < effective_balance or effective_balance + UPWARD_THRESHOLD < balance -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#effective-balances-updates +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#effective-balances-updates # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#updated-process_effective_balance_updates template get_effective_balance_update*( consensusFork: static ConsensusFork, balance: Gwei, diff --git a/beacon_chain/spec/crypto.nim b/beacon_chain/spec/crypto.nim index d51176076..4efac1688 100644 --- a/beacon_chain/spec/crypto.nim +++ b/beacon_chain/spec/crypto.nim @@ -220,7 +220,7 @@ func blsVerify*( ## to enforce correct usage. PublicKey(pubkey).verify(message, blscurve.Signature(signature)) -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#bls-signatures +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#bls-signatures proc blsVerify*( pubkey: ValidatorPubKey, message: openArray[byte], signature: CookedSig): bool = diff --git a/beacon_chain/spec/datatypes/altair.nim b/beacon_chain/spec/datatypes/altair.nim index b6afcb877..10b300810 100644 --- a/beacon_chain/spec/datatypes/altair.nim +++ b/beacon_chain/spec/datatypes/altair.nim @@ -40,7 +40,7 @@ static: doAssert ord(TIMELY_HEAD_FLAG_INDEX) == 2 const - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#incentivization-weights + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/beacon-chain.md#incentivization-weights TIMELY_SOURCE_WEIGHT* = 14 TIMELY_TARGET_WEIGHT* = 26 TIMELY_HEAD_WEIGHT* = 14 @@ -164,7 +164,7 @@ type NextSyncCommitteeBranch* = array[log2trunc(NEXT_SYNC_COMMITTEE_GINDEX), Eth2Digest] - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/altair/light-client/sync-protocol.md#lightclientheader + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/light-client/sync-protocol.md#lightclientheader LightClientHeader* = object beacon*: BeaconBlockHeader ## Beacon block header @@ -211,7 +211,7 @@ type # Slot at which the aggregate signature was created (untrusted) signature_slot*: Slot - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/altair/light-client/sync-protocol.md#lightclientoptimisticupdate + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/light-client/sync-protocol.md#lightclientoptimisticupdate LightClientOptimisticUpdate* = object # Header attested to by the sync committee attested_header*: LightClientHeader diff --git a/beacon_chain/spec/datatypes/base.nim b/beacon_chain/spec/datatypes/base.nim index 58e3445a1..262393062 100644 --- a/beacon_chain/spec/datatypes/base.nim +++ b/beacon_chain/spec/datatypes/base.nim @@ -226,7 +226,7 @@ type ForkDigest* = distinct array[4, byte] - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#forkdata + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#forkdata ForkData* = object current_version*: Version genesis_validators_root*: Eth2Digest @@ -442,7 +442,7 @@ type withdrawable_epoch*: Epoch ## When validator can withdraw funds - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#validator + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#validator ValidatorStatusCapella* = object # This is a validator without the expensive, immutable, append-only parts # serialized. They're represented in memory to allow in-place SSZ reading diff --git a/beacon_chain/spec/datatypes/capella.nim b/beacon_chain/spec/datatypes/capella.nim index 9cf3f8fad..144a10e50 100644 --- a/beacon_chain/spec/datatypes/capella.nim +++ b/beacon_chain/spec/datatypes/capella.nim @@ -40,7 +40,7 @@ type SignedBLSToExecutionChangeList* = List[SignedBLSToExecutionChange, Limit MAX_BLS_TO_EXECUTION_CHANGES] - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#withdrawal + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/beacon-chain.md#withdrawal Withdrawal* = object index*: WithdrawalIndex validator_index*: uint64 @@ -53,12 +53,12 @@ type from_bls_pubkey*: ValidatorPubKey to_execution_address*: ExecutionAddress - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/beacon-chain.md#signedblstoexecutionchange + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/beacon-chain.md#signedblstoexecutionchange SignedBLSToExecutionChange* = object message*: BLSToExecutionChange signature*: ValidatorSig - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/beacon-chain.md#historicalsummary + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/beacon-chain.md#historicalsummary HistoricalSummary* = object # `HistoricalSummary` matches the components of the phase0 # `HistoricalBatch` making the two hash_tree_root-compatible. @@ -685,13 +685,13 @@ func is_valid_light_client_header*( get_subtree_index(EXECUTION_PAYLOAD_GINDEX), header.beacon.body_root) -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/light-client/fork.md#upgrading-light-client-data +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/light-client/fork.md#upgrading-light-client-data func upgrade_lc_header_to_capella*( pre: altair.LightClientHeader): LightClientHeader = LightClientHeader( beacon: pre.beacon) -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/light-client/fork.md#upgrading-light-client-data +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/light-client/fork.md#upgrading-light-client-data func upgrade_lc_bootstrap_to_capella*( pre: altair.LightClientBootstrap): LightClientBootstrap = LightClientBootstrap( @@ -711,7 +711,7 @@ func upgrade_lc_update_to_capella*( sync_aggregate: pre.sync_aggregate, signature_slot: pre.signature_slot) -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/light-client/fork.md#upgrading-light-client-data +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/light-client/fork.md#upgrading-light-client-data func upgrade_lc_finality_update_to_capella*( pre: altair.LightClientFinalityUpdate): LightClientFinalityUpdate = LightClientFinalityUpdate( @@ -721,7 +721,7 @@ func upgrade_lc_finality_update_to_capella*( sync_aggregate: pre.sync_aggregate, signature_slot: pre.signature_slot) -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/light-client/fork.md#upgrading-light-client-data +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/light-client/fork.md#upgrading-light-client-data func upgrade_lc_optimistic_update_to_capella*( pre: altair.LightClientOptimisticUpdate): LightClientOptimisticUpdate = LightClientOptimisticUpdate( diff --git a/beacon_chain/spec/datatypes/deneb.nim b/beacon_chain/spec/datatypes/deneb.nim index 2bcd4f022..b8c0cfd9c 100644 --- a/beacon_chain/spec/datatypes/deneb.nim +++ b/beacon_chain/spec/datatypes/deneb.nim @@ -31,7 +31,7 @@ from kzg4844 import KzgCommitment, KzgProof export json_serialization, base, kzg4844 const - # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/deneb/polynomial-commitments.md#constants + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/deneb/polynomial-commitments.md#constants BYTES_PER_FIELD_ELEMENT = 32 BLS_MODULUS* = "52435875175126190479447740508185965837690552500527637822603658699938581184513".u256 @@ -53,7 +53,7 @@ type # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/deneb/polynomial-commitments.md#custom-types Blob* = array[BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_BLOB, byte] - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/p2p-interface.md#blobsidecar + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/deneb/p2p-interface.md#blobsidecar BlobSidecar* = object index*: BlobIndex ## Index of blob in block @@ -81,7 +81,7 @@ type block_root*: Eth2Digest index*: BlobIndex - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#executionpayload + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/deneb/beacon-chain.md#executionpayload ExecutionPayload* = object # Execution block header fields parent_hash*: Eth2Digest diff --git a/beacon_chain/spec/datatypes/eip7594.nim b/beacon_chain/spec/datatypes/eip7594.nim index 2ec8d4672..0bcef4ef3 100644 --- a/beacon_chain/spec/datatypes/eip7594.nim +++ b/beacon_chain/spec/datatypes/eip7594.nim @@ -9,7 +9,7 @@ import std/[sequtils], - "."/[altair, base, deneb], + "."/[altair, base, deneb], kzg4844/[kzg, kzg_abi] from std/strutils import join @@ -30,7 +30,7 @@ const KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH* = 4 type - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/_features/eip7594/polynomial-commitments-sampling.md#custom-types + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/_features/eip7594/polynomial-commitments-sampling.md#custom-types BLSFieldElement* = KzgBytes32 G2Point* = array[96, byte] PolynomialCoeff* = List[BLSFieldElement, FIELD_ELEMENTS_PER_EXT_BLOB] @@ -76,13 +76,13 @@ type block_root*: Eth2Digest index*: ColumnIndex - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/_features/eip7594/das-core.md#matrixentry + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/_features/eip7594/das-core.md#matrixentry MatrixEntry* = object cell*: Cell kzg_proof*: KzgProof column_index*: ColumnIndex row_index*: RowIndex - + # Not in spec, defined in order to compute custody subnets CscBits* = BitArray[DATA_COLUMN_SIDECAR_SUBNET_COUNT] @@ -93,7 +93,7 @@ type seq_number*: uint64 attnets*: AttnetBits syncnets*: SyncnetBits - custody_subnet_count*: CscCount + custody_subnet_count*: CscCount func shortLog*(v: DataColumnSidecar): auto = ( diff --git a/beacon_chain/spec/datatypes/electra.nim b/beacon_chain/spec/datatypes/electra.nim index 000b198cd..49d5b70ca 100644 --- a/beacon_chain/spec/datatypes/electra.nim +++ b/beacon_chain/spec/datatypes/electra.nim @@ -53,7 +53,7 @@ const NEXT_SYNC_COMMITTEE_GINDEX_ELECTRA* = 87.GeneralizedIndex type - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.5/specs/electra/beacon-chain.md#depositrequest + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#depositrequest DepositRequest* = object pubkey*: ValidatorPubKey withdrawal_credentials*: Eth2Digest @@ -152,7 +152,7 @@ type index*: uint64 amount*: Gwei - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.2/specs/electra/beacon-chain.md#pendingpartialwithdrawal + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#pendingpartialwithdrawal PendingPartialWithdrawal* = object index*: uint64 amount*: Gwei @@ -164,7 +164,7 @@ type validator_pubkey*: ValidatorPubKey amount*: Gwei - # https://github.com/ethereum/consensus-specs/blob/82133085a1295e93394ebdf71df8f2f6e0962588/specs/electra/beacon-chain.md#pendingconsolidation + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#pendingconsolidation PendingConsolidation* = object source_index*: uint64 target_index*: uint64 @@ -595,7 +595,7 @@ type AttestationCommitteeBits* = BitArray[MAX_COMMITTEES_PER_SLOT.int] - # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#attestation + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#attestation Attestation* = object aggregation_bits*: ElectraCommitteeValidatorsBits data*: AttestationData diff --git a/beacon_chain/spec/datatypes/phase0.nim b/beacon_chain/spec/datatypes/phase0.nim index 061cd690c..9be075355 100644 --- a/beacon_chain/spec/datatypes/phase0.nim +++ b/beacon_chain/spec/datatypes/phase0.nim @@ -75,7 +75,7 @@ type current_justified_checkpoint*: Checkpoint finalized_checkpoint*: Checkpoint - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#get_total_balance + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#get_total_balance TotalBalances* = object # The total effective balance of all active validators during the _current_ # epoch. @@ -221,7 +221,7 @@ type deposits*: List[Deposit, Limit MAX_DEPOSITS] voluntary_exits*: List[TrustedSignedVoluntaryExit, Limit MAX_VOLUNTARY_EXITS] - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#signedbeaconblock + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#signedbeaconblock SignedBeaconBlock* = object message*: BeaconBlock signature*: ValidatorSig diff --git a/beacon_chain/spec/helpers.nim b/beacon_chain/spec/helpers.nim index f2c25973f..2a7f002a6 100644 --- a/beacon_chain/spec/helpers.nim +++ b/beacon_chain/spec/helpers.nim @@ -192,7 +192,7 @@ func compute_signing_root*(ssz_object: auto, domain: Eth2Domain): Eth2Digest = ) hash_tree_root(domain_wrapped_object) -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.7/specs/phase0/beacon-chain.md#get_seed +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#get_seed func get_seed*( state: ForkyBeaconState, epoch: Epoch, domain_type: DomainType, mix: Eth2Digest): Eth2Digest = @@ -221,7 +221,7 @@ func has_flag*(flags: ParticipationFlags, flag_index: TimelyFlag): bool = let flag = ParticipationFlags(1'u8 shl ord(flag_index)) (flags and flag) == flag -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.4/specs/deneb/p2p-interface.md#check_blob_sidecar_inclusion_proof +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/deneb/p2p-interface.md#verify_blob_sidecar_inclusion_proof func verify_blob_sidecar_inclusion_proof*( blob_sidecar: BlobSidecar): Result[void, string] = let gindex = kzg_commitment_inclusion_proof_gindex(blob_sidecar.index) diff --git a/beacon_chain/spec/light_client_sync.nim b/beacon_chain/spec/light_client_sync.nim index e3f87f68d..ec042a05f 100644 --- a/beacon_chain/spec/light_client_sync.nim +++ b/beacon_chain/spec/light_client_sync.nim @@ -211,7 +211,7 @@ func apply_light_client_update( didProgress = true didProgress -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update type ForceUpdateResult* = enum NoUpdate, diff --git a/beacon_chain/spec/network.nim b/beacon_chain/spec/network.nim index 9db4db163..7120d4f33 100644 --- a/beacon_chain/spec/network.nim +++ b/beacon_chain/spec/network.nim @@ -89,7 +89,7 @@ func getAttestationTopic*(forkDigest: ForkDigest, ## For subscribing and unsubscribing to/from a subnet. eth2Prefix(forkDigest) & "beacon_attestation_" & $(subnetId) & "/ssz_snappy" -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/p2p-interface.md#topics-and-messages +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/p2p-interface.md#topics-and-messages func getSyncCommitteeTopic*(forkDigest: ForkDigest, subcommitteeIdx: SyncSubcommitteeIndex): string = ## For subscribing and unsubscribing to/from a subnet. diff --git a/beacon_chain/spec/state_transition_block.nim b/beacon_chain/spec/state_transition_block.nim index bf9753d37..e54481767 100644 --- a/beacon_chain/spec/state_transition_block.nim +++ b/beacon_chain/spec/state_transition_block.nim @@ -13,7 +13,7 @@ # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/bellatrix/beacon-chain.md#block-processing # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/capella/beacon-chain.md#block-processing # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/deneb/beacon-chain.md#block-processing -# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.1/specs/electra/beacon-chain.md#block-processing +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/electra/beacon-chain.md#block-processing # # The entry point is `process_block` which is at the bottom of this file. # @@ -128,7 +128,7 @@ func process_eth1_data( state.eth1_data = body.eth1_data ok() -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#is_slashable_validator +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#is_slashable_validator func is_slashable_validator(validator: Validator, epoch: Epoch): bool = # Check if ``validator`` is slashable. (not validator.slashed) and @@ -644,7 +644,7 @@ type proposer_slashings*: Gwei attester_slashings*: Gwei -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#operations +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#operations # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#modified-process_operations # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.3/specs/electra/beacon-chain.md#operations proc process_operations( diff --git a/beacon_chain/spec/state_transition_epoch.nim b/beacon_chain/spec/state_transition_epoch.nim index d608c1290..1415640cd 100644 --- a/beacon_chain/spec/state_transition_epoch.nim +++ b/beacon_chain/spec/state_transition_epoch.nim @@ -8,7 +8,7 @@ {.push raises: [].} # State transition - epoch processing, as described in -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#epoch-processing +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#epoch-processing # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#epoch-processing # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/bellatrix/beacon-chain.md#epoch-processing # https://github.com/ethereum/consensus-specs/blob/v1.3.0/specs/capella/beacon-chain.md#epoch-processing @@ -40,7 +40,7 @@ export extras, phase0, altair logScope: topics = "consens" # Accessors that implement the max condition in `get_total_balance`: -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#get_total_balance +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#get_total_balance template current_epoch*(v: TotalBalances): Gwei = max(EFFECTIVE_BALANCE_INCREMENT.Gwei, v.current_epoch_raw) template previous_epoch*(v: TotalBalances): Gwei = @@ -1084,7 +1084,7 @@ func process_slashings*(state: var ForkyBeaconState, total_balance: Gwei) = total_balance) decrease_balance(state, vidx, penalty) -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#eth1-data-votes-updates +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#eth1-data-votes-updates func process_eth1_data_reset*(state: var ForkyBeaconState) = let next_epoch = get_current_epoch(state) + 1 @@ -1203,7 +1203,7 @@ template compute_inactivity_update( min(cfg.INACTIVITY_SCORE_RECOVERY_RATE, inactivity_score) inactivity_score -# https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#inactivity-scores +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/beacon-chain.md#inactivity-scores func process_inactivity_updates*( cfg: RuntimeConfig, state: var (altair.BeaconState | bellatrix.BeaconState | @@ -1430,7 +1430,7 @@ proc process_epoch*( # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/beacon-chain.md#rewards-and-penalties process_rewards_and_penalties(cfg, state, info) # [Modified in Altair] - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/beacon-chain.md#registry-updates + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#registry-updates ? process_registry_updates(cfg, state, cache) # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#slashings @@ -1446,7 +1446,7 @@ proc process_epoch*( ok() -# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/capella/beacon-chain.md#epoch-processing +# https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/capella/beacon-chain.md#epoch-processing proc process_epoch*( cfg: RuntimeConfig, state: var (capella.BeaconState | deneb.BeaconState), @@ -1473,7 +1473,7 @@ proc process_epoch*( process_inactivity_updates(cfg, state, info) - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/altair/beacon-chain.md#rewards-and-penalties + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/altair/beacon-chain.md#rewards-and-penalties process_rewards_and_penalties(cfg, state, info) # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#registry-updates diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index fd4a249ad..d232a3512 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -1596,7 +1596,7 @@ proc signAndSendAggregate( shufflingRef, slot, committee_index, selectionProof): return - # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/validator.md#construct-aggregate + # https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/validator.md#construct-aggregate # https://github.com/ethereum/consensus-specs/blob/v1.4.0/specs/phase0/validator.md#aggregateandproof var msg = phase0.SignedAggregateAndProof( diff --git a/docs/the_nimbus_book/src/web3signer.md b/docs/the_nimbus_book/src/web3signer.md index 2ec45d2e5..ec94f9e28 100644 --- a/docs/the_nimbus_book/src/web3signer.md +++ b/docs/the_nimbus_book/src/web3signer.md @@ -155,6 +155,6 @@ Since the generalized index of a particular field may change in a hard-fork, in ``` Nimbus automatically computes the generalized index depending on the currently active fork. -The remote signer is expected to verify the incoming Merkle proof through the standardized [is_valid_merkle_branch](https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.6/specs/phase0/beacon-chain.md#is_valid_merkle_branch) function by utilizing a similar automatic mapping mechanism for the generalized index. +The remote signer is expected to verify the incoming Merkle proof through the standardized [is_valid_merkle_branch](https://github.com/ethereum/consensus-specs/blob/v1.5.0-alpha.6/specs/phase0/beacon-chain.md#is_valid_merkle_branch) function by utilizing a similar automatic mapping mechanism for the generalized index. You can instruct Nimbus to use the verifying Web3Signer protocol by either supplying the `--verifying-web3-signer` command-line option or by creating a remote keystore file in the format described above. You can use the command-line option `--proven-block-property` once or multiple times to enumerate the properties of the block for which Merkle proofs will be supplied.