mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-30 19:23:50 +00:00
Remove TTD flags and safe-slots-to-import-* (#6489)
* Delete SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY * Update fork choice tests * Remove TTD related flags * Add deprecation warning * Remove more dead code * Delete EF on_merge_block tests * Remove even more dead code * Address Mac's review comments
This commit is contained in:
@@ -114,7 +114,6 @@ pub struct ChainSpec {
|
||||
/*
|
||||
* Fork choice
|
||||
*/
|
||||
pub safe_slots_to_update_justified: u64,
|
||||
pub proposer_score_boost: Option<u64>,
|
||||
pub reorg_head_weight_threshold: Option<u64>,
|
||||
pub reorg_parent_weight_threshold: Option<u64>,
|
||||
@@ -157,7 +156,6 @@ pub struct ChainSpec {
|
||||
pub terminal_total_difficulty: Uint256,
|
||||
pub terminal_block_hash: ExecutionBlockHash,
|
||||
pub terminal_block_hash_activation_epoch: Epoch,
|
||||
pub safe_slots_to_import_optimistically: u64,
|
||||
|
||||
/*
|
||||
* Capella hard fork params
|
||||
@@ -705,7 +703,6 @@ impl ChainSpec {
|
||||
/*
|
||||
* Fork choice
|
||||
*/
|
||||
safe_slots_to_update_justified: 8,
|
||||
proposer_score_boost: Some(40),
|
||||
reorg_head_weight_threshold: Some(20),
|
||||
reorg_parent_weight_threshold: Some(160),
|
||||
@@ -756,7 +753,6 @@ impl ChainSpec {
|
||||
.expect("terminal_total_difficulty is a valid integer"),
|
||||
terminal_block_hash: ExecutionBlockHash::zero(),
|
||||
terminal_block_hash_activation_epoch: Epoch::new(u64::MAX),
|
||||
safe_slots_to_import_optimistically: 128u64,
|
||||
|
||||
/*
|
||||
* Capella hard fork params
|
||||
@@ -886,7 +882,6 @@ impl ChainSpec {
|
||||
inactivity_penalty_quotient: u64::checked_pow(2, 25).expect("pow does not overflow"),
|
||||
min_slashing_penalty_quotient: 64,
|
||||
proportional_slashing_multiplier: 2,
|
||||
safe_slots_to_update_justified: 2,
|
||||
// Altair
|
||||
epochs_per_sync_committee_period: Epoch::new(8),
|
||||
altair_fork_version: [0x01, 0x00, 0x00, 0x01],
|
||||
@@ -1026,7 +1021,6 @@ impl ChainSpec {
|
||||
/*
|
||||
* Fork choice
|
||||
*/
|
||||
safe_slots_to_update_justified: 8,
|
||||
proposer_score_boost: Some(40),
|
||||
reorg_head_weight_threshold: Some(20),
|
||||
reorg_parent_weight_threshold: Some(160),
|
||||
@@ -1077,7 +1071,6 @@ impl ChainSpec {
|
||||
.expect("terminal_total_difficulty is a valid integer"),
|
||||
terminal_block_hash: ExecutionBlockHash::zero(),
|
||||
terminal_block_hash_activation_epoch: Epoch::new(u64::MAX),
|
||||
safe_slots_to_import_optimistically: 128u64,
|
||||
|
||||
/*
|
||||
* Capella hard fork params
|
||||
@@ -1212,9 +1205,6 @@ pub struct Config {
|
||||
pub terminal_block_hash: ExecutionBlockHash,
|
||||
#[serde(default = "default_terminal_block_hash_activation_epoch")]
|
||||
pub terminal_block_hash_activation_epoch: Epoch,
|
||||
#[serde(default = "default_safe_slots_to_import_optimistically")]
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub safe_slots_to_import_optimistically: u64,
|
||||
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
min_genesis_active_validator_count: u64,
|
||||
@@ -1425,10 +1415,6 @@ fn default_terminal_block_hash_activation_epoch() -> Epoch {
|
||||
Epoch::new(u64::MAX)
|
||||
}
|
||||
|
||||
fn default_safe_slots_to_import_optimistically() -> u64 {
|
||||
128u64
|
||||
}
|
||||
|
||||
fn default_subnets_per_node() -> u8 {
|
||||
2u8
|
||||
}
|
||||
@@ -1649,7 +1635,6 @@ impl Config {
|
||||
terminal_total_difficulty: spec.terminal_total_difficulty,
|
||||
terminal_block_hash: spec.terminal_block_hash,
|
||||
terminal_block_hash_activation_epoch: spec.terminal_block_hash_activation_epoch,
|
||||
safe_slots_to_import_optimistically: spec.safe_slots_to_import_optimistically,
|
||||
|
||||
min_genesis_active_validator_count: spec.min_genesis_active_validator_count,
|
||||
min_genesis_time: spec.min_genesis_time,
|
||||
@@ -1751,7 +1736,6 @@ impl Config {
|
||||
terminal_total_difficulty,
|
||||
terminal_block_hash,
|
||||
terminal_block_hash_activation_epoch,
|
||||
safe_slots_to_import_optimistically,
|
||||
min_genesis_active_validator_count,
|
||||
min_genesis_time,
|
||||
genesis_fork_version,
|
||||
@@ -1851,7 +1835,6 @@ impl Config {
|
||||
terminal_total_difficulty,
|
||||
terminal_block_hash,
|
||||
terminal_block_hash_activation_epoch,
|
||||
safe_slots_to_import_optimistically,
|
||||
gossip_max_size,
|
||||
min_epochs_for_block_requests,
|
||||
max_chunk_size,
|
||||
@@ -2103,7 +2086,6 @@ mod yaml_tests {
|
||||
#TERMINAL_TOTAL_DIFFICULTY: 115792089237316195423570985008687907853269984665640564039457584007913129638911
|
||||
#TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000001
|
||||
#TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551614
|
||||
#SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY: 2
|
||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 16384
|
||||
MIN_GENESIS_TIME: 1606824000
|
||||
GENESIS_FORK_VERSION: 0x00000000
|
||||
@@ -2152,7 +2134,6 @@ mod yaml_tests {
|
||||
check_default!(terminal_total_difficulty);
|
||||
check_default!(terminal_block_hash);
|
||||
check_default!(terminal_block_hash_activation_epoch);
|
||||
check_default!(safe_slots_to_import_optimistically);
|
||||
check_default!(bellatrix_fork_version);
|
||||
check_default!(gossip_max_size);
|
||||
check_default!(min_epochs_for_block_requests);
|
||||
|
||||
@@ -27,8 +27,6 @@ pub struct BasePreset {
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub hysteresis_upward_multiplier: u64,
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub safe_slots_to_update_justified: u64,
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub min_deposit_amount: u64,
|
||||
#[serde(with = "serde_utils::quoted_u64")]
|
||||
pub max_effective_balance: u64,
|
||||
@@ -90,7 +88,6 @@ impl BasePreset {
|
||||
hysteresis_quotient: spec.hysteresis_quotient,
|
||||
hysteresis_downward_multiplier: spec.hysteresis_downward_multiplier,
|
||||
hysteresis_upward_multiplier: spec.hysteresis_upward_multiplier,
|
||||
safe_slots_to_update_justified: spec.safe_slots_to_update_justified,
|
||||
min_deposit_amount: spec.min_deposit_amount,
|
||||
max_effective_balance: spec.max_effective_balance,
|
||||
effective_balance_increment: spec.effective_balance_increment,
|
||||
|
||||
Reference in New Issue
Block a user