mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-01 03:44:30 +00:00
deprecate disallowed-offsets config for re-orgs (#9449)
https://github.com/ethereum/consensus-specs/pull/5348. As per discussions in issue we no longer need to support `disallowed-offsets` for pre-Fulu forks. Co-Authored-By: hopinheimer <knmanas6@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use account_utils::{STDIN_INPUTS_FLAG, read_input_from_user};
|
||||
use beacon_chain::chain_config::{
|
||||
DEFAULT_PREPARE_PAYLOAD_LOOKAHEAD_FACTOR, DisallowedReOrgOffsets, INVALID_HOLESKY_BLOCK_ROOT,
|
||||
DEFAULT_PREPARE_PAYLOAD_LOOKAHEAD_FACTOR, INVALID_HOLESKY_BLOCK_ROOT,
|
||||
};
|
||||
use beacon_chain::custody_context::NodeCustodyType;
|
||||
use beacon_chain::graffiti_calculator::GraffitiOrigin;
|
||||
@@ -771,19 +771,10 @@ pub fn get_config<E: EthSpec>(
|
||||
warn!("The proposer-reorg-parent-threshold flag is deprecated");
|
||||
}
|
||||
|
||||
if let Some(disallowed_offsets_str) =
|
||||
clap_utils::parse_optional::<String>(cli_args, "proposer-reorg-disallowed-offsets")?
|
||||
if clap_utils::parse_optional::<String>(cli_args, "proposer-reorg-disallowed-offsets")?
|
||||
.is_some()
|
||||
{
|
||||
let disallowed_offsets = disallowed_offsets_str
|
||||
.split(',')
|
||||
.map(|s| {
|
||||
s.parse()
|
||||
.map_err(|e| format!("invalid disallowed-offsets: {e:?}"))
|
||||
})
|
||||
.collect::<Result<Vec<u64>, _>>()?;
|
||||
client_config.chain.re_org_disallowed_offsets =
|
||||
DisallowedReOrgOffsets::new::<E>(disallowed_offsets)
|
||||
.map_err(|e| format!("invalid disallowed-offsets: {e:?}"))?;
|
||||
warn!("The proposer-reorg-disallowed-offsets flag is deprecated");
|
||||
}
|
||||
|
||||
client_config.chain.prepare_payload_lookahead =
|
||||
|
||||
Reference in New Issue
Block a user