Skip to content

Add CI fixes to holesky-rescue #7071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 4, 2025
Merged
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
5 changes: 4 additions & 1 deletion beacon_node/beacon_chain/src/block_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1785,8 +1785,11 @@ pub fn check_block_is_finalized_checkpoint_or_descendant<
// If we have a split block newer than finalization then we also ban blocks which are not
// descended from that split block.
let split = chain.store.get_split_info();
let is_descendant_from_split_block =
split.slot == 0 || fork_choice.is_descendant(split.block_root, block.parent_root());

if fork_choice.is_finalized_checkpoint_or_descendant(block.parent_root())
&& fork_choice.is_descendant(split.block_root, block.parent_root())
&& is_descendant_from_split_block
{
Ok(block)
} else {
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/http_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ metrics = { workspace = true }
network = { workspace = true }
operation_pool = { workspace = true }
parking_lot = { workspace = true }
proto_array = { workspace = true }
rand = { workspace = true }
safe_arith = { workspace = true }
sensitive_url = { workspace = true }
Expand All @@ -51,6 +50,7 @@ warp_utils = { workspace = true }
[dev-dependencies]
genesis = { workspace = true }
logging = { workspace = true }
proto_array = { workspace = true }
serde_json = { workspace = true }

[[test]]
Expand Down
29 changes: 0 additions & 29 deletions beacon_node/http_api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4603,34 +4603,6 @@ pub fn serve<T: BeaconChainTypes>(
},
);

let post_lighthouse_fork_choice_invalidate = warp::path("lighthouse")
.and(warp::path("fork_choice"))
.and(warp::path("invalidate"))
.and(warp::path::end())
.and(task_spawner_filter.clone())
.and(chain_filter.clone())
.and(warp_utils::json::json())
.then(
|task_spawner: TaskSpawner<T::EthSpec>,
chain: Arc<BeaconChain<T>>,
block_root: Hash256| {
task_spawner.blocking_json_task(Priority::P0, move || {
let invalidation =
proto_array::InvalidationOperation::InvalidateOne { block_root };
chain
.canonical_head
.fork_choice_write_lock()
.on_invalid_execution_payload(&invalidation)
.map_err(|e| {
warp_utils::reject::custom_server_error(format!(
"not invalidated due to error: {e:?}"
))
})?;
Ok("invalidated")
})
},
);

// GET lighthouse/analysis/block_rewards
let get_lighthouse_block_rewards = warp::path("lighthouse")
.and(warp::path("analysis"))
Expand Down Expand Up @@ -4992,7 +4964,6 @@ pub fn serve<T: BeaconChainTypes>(
.uor(post_validator_liveness_epoch)
.uor(post_lighthouse_liveness)
.uor(post_lighthouse_database_reconstruct)
.uor(post_lighthouse_fork_choice_invalidate)
.uor(post_lighthouse_block_rewards)
.uor(post_lighthouse_ui_validator_metrics)
.uor(post_lighthouse_ui_validator_info)
Expand Down
5 changes: 3 additions & 2 deletions beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1541,9 +1541,10 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
let state_from_disk = self.load_hot_state(state_root, update_cache)?;

if let Some((mut state, block_root)) = state_from_disk {
state.update_tree_hash_cache()?;
state.build_all_caches(&self.spec)?;

if update_cache {
state.update_tree_hash_cache()?;
state.build_all_caches(&self.spec)?;
self.state_cache
.lock()
.put_state(*state_root, block_root, &state)?;
Expand Down
11 changes: 10 additions & 1 deletion book/src/help_bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ Options:
Specifies the verbosity level used when emitting logs to the terminal.
[default: info] [possible values: info, debug, trace, warn, error,
crit]
--disable-attesting
Turn off attestation related APIs so that we have some hope of
producing blocks
--discovery-port <PORT>
The UDP port that discovery will listen on. Defaults to `port`
--discovery-port6 <PORT>
Expand Down Expand Up @@ -385,12 +388,18 @@ Options:
Number of validators per chunk stored on disk.
--slots-per-restore-point <SLOT_COUNT>
DEPRECATED. This flag has no effect.
--state-cache-headroom <N>
Minimum number of states to cull from the state cache when it gets
full [default: 1]
--state-cache-size <STATE_CACHE_SIZE>
Specifies the size of the state cache [default: 128]
Specifies the size of the state cache [default: 32]
--suggested-fee-recipient <SUGGESTED-FEE-RECIPIENT>
Emergency fallback fee recipient for use in case the validator client
does not have one configured. You should set this flag on the
validator client instead of (or in addition to) setting it here.
--sync-tolerance-epochs <sync-tolerance-epochs>
If the beacon node is within this many epochs from the head, we
declare it to be synced regardless of the network sync state
-t, --testnet-dir <DIR>
Path to directory containing eth2_testnet specs. Defaults to a
hard-coded Lighthouse testnet. Only effective if there is no existing
Expand Down
2 changes: 2 additions & 0 deletions book/src/help_vc.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ Flags:
If this flag is set, Lighthouse will query the Beacon Node for only
block headers during proposals and will sign over headers. Useful for
outsourcing execution payload construction during proposals.
--disable-attesting
Disable everything except block proposals
--disable-auto-discover
If present, do not attempt to discover new validators in the
validators-dir. Validators will need to be manually added to the
Expand Down
20 changes: 16 additions & 4 deletions consensus/proto_array/src/proto_array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,15 @@ impl ProtoArray {
|| latest_valid_ancestor_is_descendant
{
match &node.execution_status {
ExecutionStatus::Valid(hash) | ExecutionStatus::Optimistic(hash) => {
// It's illegal for an execution client to declare that some previously-valid block
// is now invalid. This is a consensus failure on their behalf.
ExecutionStatus::Valid(hash) => {
return Err(Error::ValidExecutionStatusBecameInvalid {
block_root: node.root,
payload_block_hash: *hash,
})
}
ExecutionStatus::Optimistic(hash) => {
invalidated_indices.insert(index);
node.execution_status = ExecutionStatus::Invalid(*hash);

Expand Down Expand Up @@ -589,9 +597,13 @@ impl ProtoArray {
if let Some(parent_index) = node.parent {
if invalidated_indices.contains(&parent_index) {
match &node.execution_status {
ExecutionStatus::Valid(hash)
| ExecutionStatus::Optimistic(hash)
| ExecutionStatus::Invalid(hash) => {
ExecutionStatus::Valid(hash) => {
return Err(Error::ValidExecutionStatusBecameInvalid {
block_root: node.root,
payload_block_hash: *hash,
})
}
ExecutionStatus::Optimistic(hash) | ExecutionStatus::Invalid(hash) => {
node.execution_status = ExecutionStatus::Invalid(*hash)
}
ExecutionStatus::Irrelevant(_) => {
Expand Down
Loading