medalla -> pyrmont (#2062)
This commit is contained in:
parent
6f476ca380
commit
040093a945
|
@ -6,7 +6,7 @@ import
|
||||||
const
|
const
|
||||||
SAFETY_DECAY* = 10'u64
|
SAFETY_DECAY* = 10'u64
|
||||||
|
|
||||||
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/specs/phase0/weak-subjectivity.md#calculating-the-weak-subjectivity-period
|
# https://github.com/ethereum/eth2.0-specs/blob/v1.0.0/specs/phase0/weak-subjectivity.md#calculating-the-weak-subjectivity-period
|
||||||
func compute_weak_subjectivity_period*(state: BeaconState): uint64 =
|
func compute_weak_subjectivity_period*(state: BeaconState): uint64 =
|
||||||
var weak_subjectivity_period = MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
var weak_subjectivity_period = MIN_VALIDATOR_WITHDRAWABILITY_DELAY
|
||||||
let validator_count = get_active_validator_indices_len(state, get_current_epoch(state))
|
let validator_count = get_active_validator_indices_len(state, get_current_epoch(state))
|
||||||
|
@ -16,7 +16,7 @@ func compute_weak_subjectivity_period*(state: BeaconState): uint64 =
|
||||||
weak_subjectivity_period += SAFETY_DECAY * validator_count div (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT)
|
weak_subjectivity_period += SAFETY_DECAY * validator_count div (2 * 100 * MIN_PER_EPOCH_CHURN_LIMIT)
|
||||||
return weak_subjectivity_period
|
return weak_subjectivity_period
|
||||||
|
|
||||||
# https://github.com/ethereum/eth2.0-specs/blob/v0.12.3/specs/phase0/weak-subjectivity.md#checking-for-stale-weak-subjectivity-checkpoint
|
# https://github.com/ethereum/eth2.0-specs/blob/v1.0.0/specs/phase0/weak-subjectivity.md#checking-for-stale-weak-subjectivity-checkpoint
|
||||||
func is_within_weak_subjectivity_period*(current_slot: Slot,
|
func is_within_weak_subjectivity_period*(current_slot: Slot,
|
||||||
ws_state: BeaconState,
|
ws_state: BeaconState,
|
||||||
ws_checkpoint: Checkpoint): bool =
|
ws_checkpoint: Checkpoint): bool =
|
||||||
|
|
|
@ -17,7 +17,7 @@ OPTS="h"
|
||||||
LONGOPTS="help,network:,build,run"
|
LONGOPTS="help,network:,build,run"
|
||||||
|
|
||||||
# default values
|
# default values
|
||||||
NETWORK="medalla"
|
NETWORK="pyrmont"
|
||||||
BUILD=0
|
BUILD=0
|
||||||
RUN=0
|
RUN=0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue