update consensus layer spec ref URLs to v1.2.0-rc.3 (#4143)
This commit is contained in:
parent
ad63bba446
commit
56720dd808
|
@ -756,7 +756,7 @@ proc validateAggregate*(
|
|||
|
||||
return ok((attesting_indices, sig))
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.2/specs/phase0/p2p-interface.md#attester_slashing
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/p2p-interface.md#attester_slashing
|
||||
proc validateAttesterSlashing*(
|
||||
pool: ExitPool, attester_slashing: AttesterSlashing):
|
||||
Result[void, ValidationError] =
|
||||
|
|
|
@ -137,7 +137,7 @@ const
|
|||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#attesting
|
||||
attestationSlotOffset* = TimeDiff(nanoseconds:
|
||||
NANOSECONDS_PER_SLOT.int64 div INTERVALS_PER_SLOT)
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#broadcast-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#broadcast-aggregate
|
||||
aggregateSlotOffset* = TimeDiff(nanoseconds:
|
||||
NANOSECONDS_PER_SLOT.int64 * 2 div INTERVALS_PER_SLOT)
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/validator.md#prepare-sync-committee-message
|
||||
|
|
|
@ -388,7 +388,7 @@ type
|
|||
message*: BeaconBlockHeader
|
||||
signature*: TrustedSig
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#aggregateandproof
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#aggregateandproof
|
||||
AggregateAndProof* = object
|
||||
aggregator_index*: uint64 # `ValidatorIndex` after validation
|
||||
aggregate*: Attestation
|
||||
|
|
|
@ -376,13 +376,13 @@ type
|
|||
DOMAIN_CONTRIBUTION_AND_PROOF*: DomainType
|
||||
# PARTICIPATION_FLAG_WEIGHTS
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#constants
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#constants
|
||||
TARGET_AGGREGATORS_PER_COMMITTEE*: uint64
|
||||
RANDOM_SUBNETS_PER_VALIDATOR*: uint64
|
||||
EPOCHS_PER_RANDOM_SUBNET_SUBSCRIPTION*: uint64
|
||||
ATTESTATION_SUBNET_COUNT*: uint64
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/altair/validator.md#constants
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/validator.md#constants
|
||||
TARGET_AGGREGATORS_PER_SYNC_SUBCOMMITTEE*: uint64
|
||||
SYNC_COMMITTEE_SUBNET_COUNT*: uint64
|
||||
|
||||
|
|
|
@ -510,7 +510,7 @@ template name*(cfg: RuntimeConfig): string =
|
|||
else:
|
||||
const_preset
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.2/specs/phase0/p2p-interface.md#configuration
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/p2p-interface.md#configuration
|
||||
func MIN_EPOCHS_FOR_BLOCK_REQUESTS*(cfg: RuntimeConfig): uint64 =
|
||||
cfg.MIN_VALIDATOR_WITHDRAWABILITY_DELAY + cfg.CHURN_LIMIT_QUOTIENT div 2
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Minimal preset - Phase0
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.2/presets/minimal/phase0.yaml
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/presets/minimal/phase0.yaml
|
||||
|
||||
const
|
||||
#
|
||||
|
@ -7,11 +7,11 @@ const
|
|||
# ---------------------------------------------------------------
|
||||
# [customized] Just 4 committees for slot for testing purposes
|
||||
MAX_COMMITTEES_PER_SLOT* {.intdefine.}: uint64 = 4
|
||||
# [customized] unsecure, but fast
|
||||
# [customized] insecure, but fast
|
||||
TARGET_COMMITTEE_SIZE*: uint64 = 4
|
||||
# 2**11 (= 2,048)
|
||||
MAX_VALIDATORS_PER_COMMITTEE*: uint64 = 2048
|
||||
# [customized] Faster, but unsecure.
|
||||
# [customized] Faster, but insecure.
|
||||
SHUFFLE_ROUND_COUNT*: uint64 = 10
|
||||
# 4
|
||||
HYSTERESIS_QUOTIENT*: uint64 = 4
|
||||
|
|
|
@ -1140,7 +1140,7 @@ proc signAndSendAggregate(
|
|||
shufflingRef, slot, committee_index, selectionProof):
|
||||
return
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#construct-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#construct-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#aggregateandproof
|
||||
var
|
||||
msg = SignedAggregateAndProof(
|
||||
|
@ -1494,7 +1494,7 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} =
|
|||
|
||||
updateValidatorMetrics(node) # the important stuff is done, update the vanity numbers
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#broadcast-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#broadcast-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/validator.md#broadcast-sync-committee-contribution
|
||||
# Wait 2 / 3 of the slot time to allow messages to propagate, then collect
|
||||
# the result in aggregates
|
||||
|
|
|
@ -301,7 +301,7 @@ proc getAttestationSignature*(v: AttachedValidator, fork: Fork,
|
|||
let request = Web3SignerRequest.init(fork, genesis_validators_root, data)
|
||||
await v.signData(request)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#broadcast-aggregate
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/phase0/validator.md#broadcast-aggregate
|
||||
proc getAggregateAndProofSignature*(v: AttachedValidator,
|
||||
fork: Fork,
|
||||
genesis_validators_root: Eth2Digest,
|
||||
|
@ -320,7 +320,7 @@ proc getAggregateAndProofSignature*(v: AttachedValidator,
|
|||
fork, genesis_validators_root, aggregate_and_proof)
|
||||
await v.signData(request)
|
||||
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/altair/validator.md#prepare-sync-committee-message
|
||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/validator.md#prepare-sync-committee-message
|
||||
proc getSyncCommitteeMessage*(v: AttachedValidator,
|
||||
fork: Fork,
|
||||
genesis_validators_root: Eth2Digest,
|
||||
|
|
Loading…
Reference in New Issue