mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-02 04:03:35 +00:00
resolve merge conflicts between untstable and release-v7.0.0
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
pub use proto_array::{DisallowedReOrgOffsets, ReOrgThreshold};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::time::Duration;
|
||||
use types::{Checkpoint, Epoch};
|
||||
use std::str::FromStr;
|
||||
use std::{collections::HashSet, sync::LazyLock, time::Duration};
|
||||
use types::{Checkpoint, Epoch, Hash256};
|
||||
|
||||
pub const DEFAULT_RE_ORG_HEAD_THRESHOLD: ReOrgThreshold = ReOrgThreshold(20);
|
||||
pub const DEFAULT_RE_ORG_PARENT_THRESHOLD: ReOrgThreshold = ReOrgThreshold(160);
|
||||
@@ -19,6 +20,12 @@ pub const FORK_CHOICE_LOOKAHEAD_FACTOR: u32 = 24;
|
||||
/// Default sync tolerance epochs.
|
||||
pub const DEFAULT_SYNC_TOLERANCE_EPOCHS: u64 = 2;
|
||||
|
||||
/// Invalid block root to be banned from processing and importing on Holesky network by default.
|
||||
pub static INVALID_HOLESKY_BLOCK_ROOT: LazyLock<Hash256> = LazyLock::new(|| {
|
||||
Hash256::from_str("2db899881ed8546476d0b92c6aa9110bea9a4cd0dbeb5519eb0ea69575f1f359")
|
||||
.expect("valid block root")
|
||||
});
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)]
|
||||
pub struct ChainConfig {
|
||||
/// Maximum number of slots to skip when importing an attestation.
|
||||
@@ -104,6 +111,11 @@ pub struct ChainConfig {
|
||||
pub block_publishing_delay: Option<Duration>,
|
||||
/// Artificial delay for data column publishing. For PeerDAS testing only.
|
||||
pub data_column_publishing_delay: Option<Duration>,
|
||||
/// Block roots of "banned" blocks which Lighthouse will refuse to import.
|
||||
///
|
||||
/// On Holesky there is a block which is added to this set by default but which can be removed
|
||||
/// by using `--invalid-block-roots ""`.
|
||||
pub invalid_block_roots: HashSet<Hash256>,
|
||||
}
|
||||
|
||||
impl Default for ChainConfig {
|
||||
@@ -142,6 +154,7 @@ impl Default for ChainConfig {
|
||||
sync_tolerance_epochs: DEFAULT_SYNC_TOLERANCE_EPOCHS,
|
||||
block_publishing_delay: None,
|
||||
data_column_publishing_delay: None,
|
||||
invalid_block_roots: HashSet::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user