Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions anchor/client/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,4 +532,15 @@ pub struct Node {

#[clap(flatten)]
pub logging_flags: FileLoggingFlags,

#[clap(
long,
help = "Enable parallel querying and scoring of attestation data across multiple beacon nodes. \
When enabled, Anchor queries all configured beacon nodes simultaneously and selects \
the attestation data with the highest score based on checkpoint epochs and head block \
proximity. Only useful when multiple beacon nodes are configured via --beacon-nodes. \
Disabled by default.",
display_order = 0
)]
pub with_weighted_attestation_data: bool,
}
5 changes: 5 additions & 0 deletions anchor/client/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ pub struct Config {
pub operator_dg: bool,
/// Number of epochs to monitor for twins after grace period
pub operator_dg_wait_epochs: u64,
/// Enable attestation data scoring across multiple beacon nodes
pub with_weighted_attestation_data: bool,
/// Whether to check for matching checkpoint roots in QBFT.
pub strict_mfp: bool,
}
Expand Down Expand Up @@ -123,6 +125,7 @@ impl Config {
disable_latency_measurement_service: false,
operator_dg: false,
operator_dg_wait_epochs: 2,
with_weighted_attestation_data: false,
strict_mfp: false,
}
}
Expand Down Expand Up @@ -279,6 +282,8 @@ pub fn from_cli(cli_args: &Node, global_config: GlobalConfig) -> Result<Config,
config.processor.queue_size.insert(queue, size);
}

config.with_weighted_attestation_data = cli_args.with_weighted_attestation_data;

Ok(config)
}

Expand Down
1 change: 1 addition & 0 deletions anchor/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ impl Client {
beacon_nodes.clone(),
executor.clone(),
spec.clone(),
config.with_weighted_attestation_data,
);

// We use `SLOTS_PER_EPOCH` as the capacity of the block notification channel, because
Expand Down
Loading
Loading