Improve single-node testnet support and Arc NetworkConfig/ChainSpec (#6396)

* Arc ChainSpec and NetworkConfig

* Fix release tests

* Fix lint

* Merge remote-tracking branch 'origin/unstable' into single-node-testnet
This commit is contained in:
Michael Sproul
2024-09-24 10:16:18 +10:00
committed by GitHub
parent d84df5799c
commit 1447eeb40b
66 changed files with 340 additions and 250 deletions

View File

@@ -242,6 +242,7 @@ mod tests {
use execution_layer::test_utils::{DEFAULT_CLIENT_VERSION, DEFAULT_ENGINE_CAPABILITIES};
use execution_layer::EngineCapabilities;
use slog::info;
use std::sync::Arc;
use std::sync::LazyLock;
use std::time::Duration;
use types::{ChainSpec, Graffiti, Keypair, MinimalEthSpec, GRAFFITI_BYTES_LEN};
@@ -253,7 +254,7 @@ mod tests {
fn get_harness(
validator_count: usize,
spec: ChainSpec,
spec: Arc<ChainSpec>,
chain_config: Option<ChainConfig>,
) -> BeaconChainHarness<EphemeralHarnessType<MinimalEthSpec>> {
let harness = BeaconChainHarness::builder(MinimalEthSpec)
@@ -272,7 +273,7 @@ mod tests {
#[tokio::test]
async fn check_graffiti_without_el_version_support() {
let spec = test_spec::<MinimalEthSpec>();
let spec = Arc::new(test_spec::<MinimalEthSpec>());
let harness = get_harness(VALIDATOR_COUNT, spec, None);
// modify execution engine so it doesn't support engine_getClientVersionV1 method
let mock_execution_layer = harness.mock_execution_layer.as_ref().unwrap();
@@ -313,7 +314,7 @@ mod tests {
#[tokio::test]
async fn check_graffiti_with_el_version_support() {
let spec = test_spec::<MinimalEthSpec>();
let spec = Arc::new(test_spec::<MinimalEthSpec>());
let harness = get_harness(VALIDATOR_COUNT, spec, None);
let found_graffiti_bytes = harness.chain.graffiti_calculator.get_graffiti(None).await.0;
@@ -355,7 +356,7 @@ mod tests {
#[tokio::test]
async fn check_graffiti_with_validator_specified_value() {
let spec = test_spec::<MinimalEthSpec>();
let spec = Arc::new(test_spec::<MinimalEthSpec>());
let harness = get_harness(VALIDATOR_COUNT, spec, None);
let graffiti_str = "nice graffiti bro";