Skip to content

Commit 261322c

Browse files
committed
Merge remote-tracking branch 'origin/stable' into unstable
2 parents d59e340 + ced49dd commit 261322c

File tree

29 files changed

+353
-259
lines changed

29 files changed

+353
-259
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ resolver = "2"
9393

9494
[workspace.package]
9595
edition = "2024"
96-
version = "8.0.0"
96+
version = "8.0.1"
9797

9898
[workspace.dependencies]
9999
account_utils = { path = "common/account_utils" }

beacon_node/beacon_chain/src/block_verification.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,11 +1428,11 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
14281428
// Spawn the payload verification future as a new task, but don't wait for it to complete.
14291429
// The `payload_verification_future` will be awaited later to ensure verification completed
14301430
// successfully.
1431-
let current_span = Span::current();
14321431
let payload_verification_handle = chain
14331432
.task_executor
14341433
.spawn_handle(
1435-
payload_verification_future.instrument(current_span),
1434+
payload_verification_future
1435+
.instrument(debug_span!("execution_payload_verification")),
14361436
"execution_payload_verification",
14371437
)
14381438
.ok_or(BeaconChainError::RuntimeShutdown)?;

beacon_node/beacon_chain/src/builder.rs

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ use std::time::Duration;
4040
use store::{Error as StoreError, HotColdDB, ItemStore, KeyValueStoreOp};
4141
use task_executor::{ShutdownReason, TaskExecutor};
4242
use tracing::{debug, error, info};
43+
use types::data_column_custody_group::CustodyIndex;
4344
use types::{
44-
BeaconBlock, BeaconState, BlobSidecarList, ChainSpec, DataColumnSidecarList, Epoch, EthSpec,
45-
FixedBytesExtended, Hash256, Signature, SignedBeaconBlock, Slot,
45+
BeaconBlock, BeaconState, BlobSidecarList, ChainSpec, ColumnIndex, DataColumnSidecarList,
46+
Epoch, EthSpec, FixedBytesExtended, Hash256, Signature, SignedBeaconBlock, Slot,
4647
};
4748

4849
/// An empty struct used to "witness" all the `BeaconChainTypes` traits. It has no user-facing
@@ -102,6 +103,7 @@ pub struct BeaconChainBuilder<T: BeaconChainTypes> {
102103
task_executor: Option<TaskExecutor>,
103104
validator_monitor_config: Option<ValidatorMonitorConfig>,
104105
node_custody_type: NodeCustodyType,
106+
ordered_custody_column_indices: Option<Vec<CustodyIndex>>,
105107
rng: Option<Box<dyn RngCore + Send>>,
106108
}
107109

@@ -141,6 +143,7 @@ where
141143
task_executor: None,
142144
validator_monitor_config: None,
143145
node_custody_type: NodeCustodyType::Fullnode,
146+
ordered_custody_column_indices: None,
144147
rng: None,
145148
}
146149
}
@@ -647,6 +650,16 @@ where
647650
self
648651
}
649652

653+
/// Sets the ordered custody column indices for this node.
654+
/// This is used to determine the data columns the node is required to custody.
655+
pub fn ordered_custody_column_indices(
656+
mut self,
657+
ordered_custody_column_indices: Vec<ColumnIndex>,
658+
) -> Self {
659+
self.ordered_custody_column_indices = Some(ordered_custody_column_indices);
660+
self
661+
}
662+
650663
/// Sets the `BeaconChain` event handler backend.
651664
///
652665
/// For example, provide `ServerSentEventHandler` as a `handler`.
@@ -740,6 +753,9 @@ where
740753
.genesis_state_root
741754
.ok_or("Cannot build without a genesis state root")?;
742755
let validator_monitor_config = self.validator_monitor_config.unwrap_or_default();
756+
let ordered_custody_column_indices = self
757+
.ordered_custody_column_indices
758+
.ok_or("Cannot build without ordered custody column indices")?;
743759
let rng = self.rng.ok_or("Cannot build without an RNG")?;
744760
let beacon_proposer_cache: Arc<Mutex<BeaconProposerCache>> = <_>::default();
745761

@@ -942,11 +958,16 @@ where
942958
custody,
943959
self.node_custody_type,
944960
head_epoch,
961+
ordered_custody_column_indices,
945962
&self.spec,
946963
)
947964
} else {
948965
(
949-
CustodyContext::new(self.node_custody_type, &self.spec),
966+
CustodyContext::new(
967+
self.node_custody_type,
968+
ordered_custody_column_indices,
969+
&self.spec,
970+
),
950971
None,
951972
)
952973
};
@@ -1220,7 +1241,9 @@ fn build_data_columns_from_blobs<E: EthSpec>(
12201241
#[cfg(test)]
12211242
mod test {
12221243
use super::*;
1223-
use crate::test_utils::{EphemeralHarnessType, get_kzg};
1244+
use crate::test_utils::{
1245+
EphemeralHarnessType, generate_data_column_indices_rand_order, get_kzg,
1246+
};
12241247
use ethereum_hashing::hash;
12251248
use genesis::{
12261249
DEFAULT_ETH1_BLOCK_HASH, generate_deterministic_keypairs, interop_genesis_state,
@@ -1272,6 +1295,9 @@ mod test {
12721295
.expect("should configure testing slot clock")
12731296
.shutdown_sender(shutdown_tx)
12741297
.rng(Box::new(StdRng::seed_from_u64(42)))
1298+
.ordered_custody_column_indices(
1299+
generate_data_column_indices_rand_order::<MinimalEthSpec>(),
1300+
)
12751301
.build()
12761302
.expect("should build");
12771303

0 commit comments

Comments
 (0)