mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-30 11:24:31 +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:
@@ -1375,12 +1375,7 @@ pub fn cli_app() -> Command {
|
||||
.long("proposer-reorg-disallowed-offsets")
|
||||
.action(ArgAction::Set)
|
||||
.value_name("N1,N2,...")
|
||||
.help("Comma-separated list of integer offsets which can be used to avoid \
|
||||
proposing reorging blocks at certain slots. An offset of N means that \
|
||||
reorging proposals will not be attempted at any slot such that \
|
||||
`slot % SLOTS_PER_EPOCH == N`. By default only re-orgs at offset 0 will be \
|
||||
avoided. Any offsets supplied with this flag will impose additional \
|
||||
restrictions.")
|
||||
.help("DEPRECATED. This flag has no effect.")
|
||||
.conflicts_with("disable-proposer-reorgs")
|
||||
.display_order(0)
|
||||
)
|
||||
|
||||
@@ -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