mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
Merge remote-tracking branch 'origin/unstable' into tree-states
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
FROM rust:1.68.2-bullseye AS builder
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get install -y cmake libclang-dev protobuf-compiler
|
||||
COPY . lighthouse
|
||||
|
||||
# Build lighthouse directly with a cargo build command, bypassing the Makefile.
|
||||
RUN cd lighthouse && LD_LIBRARY_PATH=/lighthouse/testing/antithesis/libvoidstar/ RUSTFLAGS="-Cpasses=sancov-module -Cllvm-args=-sanitizer-coverage-level=3 -Cllvm-args=-sanitizer-coverage-trace-pc-guard -Ccodegen-units=1 -Cdebuginfo=2 -L/lighthouse/testing/antithesis/libvoidstar/ -lvoidstar" cargo build --release --manifest-path lighthouse/Cargo.toml --target x86_64-unknown-linux-gnu --features modern --verbose --bin lighthouse
|
||||
# build lcli binary directly with cargo install command, bypassing the makefile
|
||||
RUN cargo install --path /lighthouse/lcli --force --locked
|
||||
|
||||
FROM ubuntu:latest
|
||||
RUN apt-get update && apt-get -y upgrade && apt-get install -y --no-install-recommends \
|
||||
libssl-dev \
|
||||
ca-certificates \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# create and move the libvoidstar file
|
||||
RUN mkdir libvoidstar
|
||||
COPY --from=builder /lighthouse/testing/antithesis/libvoidstar/libvoidstar.so /usr/lib/libvoidstar.so
|
||||
|
||||
# set the env variable to avoid having to always set it
|
||||
ENV LD_LIBRARY_PATH=/usr/lib
|
||||
# move the lighthouse binary and lcli binary
|
||||
COPY --from=builder /lighthouse/target/x86_64-unknown-linux-gnu/release/lighthouse /usr/local/bin/lighthouse
|
||||
COPY --from=builder /lighthouse/target/release/lcli /usr/local/bin/lcli
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@ use beacon_chain::{
|
||||
obtain_indexed_attestation_and_committees_per_slot, VerifiedAttestation,
|
||||
},
|
||||
test_utils::{BeaconChainHarness, EphemeralHarnessType},
|
||||
BeaconChainTypes, CachedHead, NotifyExecutionLayer,
|
||||
BeaconChainTypes, CachedHead, ChainConfig, NotifyExecutionLayer,
|
||||
};
|
||||
use execution_layer::{json_structures::JsonPayloadStatusV1Status, PayloadStatusV1};
|
||||
use serde::Deserialize;
|
||||
@@ -303,6 +303,10 @@ impl<E: EthSpec> Tester<E> {
|
||||
let harness = BeaconChainHarness::builder(E::default())
|
||||
.spec(spec.clone())
|
||||
.keypairs(vec![])
|
||||
.chain_config(ChainConfig {
|
||||
reconstruct_historic_states: true,
|
||||
..ChainConfig::default()
|
||||
})
|
||||
.genesis_state_ephemeral_store(case.anchor_state.clone())
|
||||
.mock_execution_layer()
|
||||
.recalculate_fork_times_with_genesis(0)
|
||||
|
||||
@@ -204,16 +204,6 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
let account1 = ethers_core::types::Address::from_slice(&hex::decode(ACCOUNT1).unwrap());
|
||||
let account2 = ethers_core::types::Address::from_slice(&hex::decode(ACCOUNT2).unwrap());
|
||||
|
||||
/*
|
||||
* Check the transition config endpoint.
|
||||
*/
|
||||
for ee in [&self.ee_a, &self.ee_b] {
|
||||
ee.execution_layer
|
||||
.exchange_transition_configuration(&self.spec)
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the terminal block hash from both pairs, check it's equal.
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@ pub use execution_layer::test_utils::{
|
||||
pub use validator_client::Config as ValidatorConfig;
|
||||
|
||||
/// The global timeout for HTTP requests to the beacon node.
|
||||
const HTTP_TIMEOUT: Duration = Duration::from_secs(4);
|
||||
const HTTP_TIMEOUT: Duration = Duration::from_secs(8);
|
||||
/// The timeout for a beacon node to start up.
|
||||
const STARTUP_TIMEOUT: Duration = Duration::from_secs(60);
|
||||
|
||||
@@ -115,6 +115,14 @@ pub fn testing_client_config() -> ClientConfig {
|
||||
genesis_time: now,
|
||||
};
|
||||
|
||||
// Simulator tests expect historic states to be available for post-run checks.
|
||||
client_config.chain.reconstruct_historic_states = true;
|
||||
|
||||
// Specify a constant count of beacon processor workers. Having this number
|
||||
// too low can cause annoying HTTP timeouts, especially on Github runners
|
||||
// with 2 logical CPUs.
|
||||
client_config.beacon_processor.max_workers = 4;
|
||||
|
||||
client_config
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,6 @@ serde_derive = "1.0.116"
|
||||
serde_yaml = "0.8.13"
|
||||
eth2_network_config = { path = "../../common/eth2_network_config" }
|
||||
serde_json = "1.0.58"
|
||||
zip = "0.5.13"
|
||||
zip = "0.6"
|
||||
lazy_static = "1.4.0"
|
||||
parking_lot = "0.12.0"
|
||||
parking_lot = "0.12.0"
|
||||
|
||||
@@ -51,7 +51,7 @@ mod tests {
|
||||
|
||||
/// If the we are unable to reach the Web3Signer HTTP API within this time out then we will
|
||||
/// assume it failed to start.
|
||||
const UPCHECK_TIMEOUT: Duration = Duration::from_secs(20);
|
||||
const UPCHECK_TIMEOUT: Duration = Duration::from_secs(30);
|
||||
|
||||
/// Set to `false` to send the Web3Signer logs to the console during tests. Logs are useful when
|
||||
/// debugging.
|
||||
|
||||
Reference in New Issue
Block a user