Skip to content

Commit 45baf40

Browse files
committed
Merge branch 'unstable' of https://github.com/sigp/lighthouse into patch-1
2 parents e3e831d + 5ce1619 commit 45baf40

File tree

186 files changed

+625
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

186 files changed

+625
-475
lines changed

Cargo.lock

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ as the canonical staking deposit contract address.
4141
The [Lighthouse Book](https://lighthouse-book.sigmaprime.io) contains information for users and
4242
developers.
4343

44-
The Lighthouse team maintains a blog at [lighthouse-blog.sigmaprime.io][blog] which contains periodical
44+
The Lighthouse team maintains a blog at [lighthouse-blog.sigmaprime.io][blog] which contains periodic
4545
progress updates, roadmap insights and interesting findings.
4646

4747
## Branches

account_manager/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ Simply run `./account_manager generate` to generate a new random private key,
2929
which will be automatically saved to the correct directory.
3030

3131
If you prefer to use our "deterministic" keys for testing purposes, simply
32-
run `./accounts_manager generate_deterministic -i <index>`, where `index` is
32+
run `./account_manager generate_deterministic -i <index>`, where `index` is
3333
the validator index for the key. This will reliably produce the same key each time
34-
and save it to the directory.
34+
and save it to the directory.

beacon_node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "beacon_node"
3-
version = "5.1.1"
3+
version = "5.1.2"
44
authors = [
55
"Paul Hauner <[email protected]>",
66
"Age Manning <[email protected]",

beacon_node/beacon_chain/src/beacon_chain.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use crate::{
7272
kzg_utils, metrics, AvailabilityPendingExecutedBlock, BeaconChainError, BeaconForkChoiceStore,
7373
BeaconSnapshot, CachedHead,
7474
};
75-
use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes, SyncDuty};
75+
use eth2::types::{EventKind, SseBlobSidecar, SseBlock, SseExtendedPayloadAttributes};
7676
use execution_layer::{
7777
BlockProposalContents, BlockProposalContentsType, BuilderParams, ChainHealth, ExecutionLayer,
7878
FailedCondition, PayloadAttributes, PayloadStatus,
@@ -120,8 +120,7 @@ use store::{
120120
use task_executor::{ShutdownReason, TaskExecutor};
121121
use tokio_stream::Stream;
122122
use tree_hash::TreeHash;
123-
use types::beacon_state::CloneConfig;
124-
use types::blob_sidecar::{BlobSidecarList, FixedBlobSidecarList};
123+
use types::blob_sidecar::FixedBlobSidecarList;
125124
use types::payload::BlockProductionVersion;
126125
use types::*;
127126

@@ -414,14 +413,14 @@ pub struct BeaconChain<T: BeaconChainTypes> {
414413
/// Maintains a record of slashable message seen over the gossip network or RPC.
415414
pub observed_slashable: RwLock<ObservedSlashable<T::EthSpec>>,
416415
/// Maintains a record of which validators have submitted voluntary exits.
417-
pub(crate) observed_voluntary_exits: Mutex<ObservedOperations<SignedVoluntaryExit, T::EthSpec>>,
416+
pub observed_voluntary_exits: Mutex<ObservedOperations<SignedVoluntaryExit, T::EthSpec>>,
418417
/// Maintains a record of which validators we've seen proposer slashings for.
419-
pub(crate) observed_proposer_slashings: Mutex<ObservedOperations<ProposerSlashing, T::EthSpec>>,
418+
pub observed_proposer_slashings: Mutex<ObservedOperations<ProposerSlashing, T::EthSpec>>,
420419
/// Maintains a record of which validators we've seen attester slashings for.
421-
pub(crate) observed_attester_slashings:
420+
pub observed_attester_slashings:
422421
Mutex<ObservedOperations<AttesterSlashing<T::EthSpec>, T::EthSpec>>,
423422
/// Maintains a record of which validators we've seen BLS to execution changes for.
424-
pub(crate) observed_bls_to_execution_changes:
423+
pub observed_bls_to_execution_changes:
425424
Mutex<ObservedOperations<SignedBlsToExecutionChange, T::EthSpec>>,
426425
/// Provides information from the Ethereum 1 (PoW) chain.
427426
pub eth1_chain: Option<Eth1Chain<T::Eth1Chain, T::EthSpec>>,

beacon_node/beacon_chain/src/data_availability_checker/overflow_lru_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ mod test {
780780
use store::{HotColdDB, ItemStore, LevelDB, StoreConfig};
781781
use tempfile::{tempdir, TempDir};
782782
use types::non_zero_usize::new_non_zero_usize;
783-
use types::{ChainSpec, ExecPayload, MinimalEthSpec};
783+
use types::{ExecPayload, MinimalEthSpec};
784784

785785
const LOW_VALIDATOR_COUNT: usize = 32;
786786

beacon_node/beacon_chain/src/early_attester_cache.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::{
66
use parking_lot::RwLock;
77
use proto_array::Block as ProtoBlock;
88
use std::sync::Arc;
9-
use types::blob_sidecar::BlobSidecarList;
109
use types::*;
1110

1211
pub struct CacheItem<E: EthSpec> {

beacon_node/beacon_chain/src/eth1_chain.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use ssz_derive::{Decode, Encode};
99
use state_processing::per_block_processing::get_new_eth1_data;
1010
use std::cmp::Ordering;
1111
use std::collections::HashMap;
12-
use std::iter::DoubleEndedIterator;
1312
use std::marker::PhantomData;
1413
use std::time::{SystemTime, UNIX_EPOCH};
1514
use store::{DBColumn, Error as StoreError, StoreItem};
@@ -736,7 +735,7 @@ mod test {
736735
mod eth1_chain_json_backend {
737736
use super::*;
738737
use eth1::DepositLog;
739-
use types::{test_utils::generate_deterministic_keypair, EthSpec, MainnetEthSpec};
738+
use types::{test_utils::generate_deterministic_keypair, MainnetEthSpec};
740739

741740
fn get_eth1_chain() -> Eth1Chain<CachingEth1Backend<E>, E> {
742741
let eth1_config = Eth1Config {

beacon_node/beacon_chain/src/observed_blob_sidecars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mod tests {
111111
use super::*;
112112
use bls::Hash256;
113113
use std::sync::Arc;
114-
use types::{BlobSidecar, MainnetEthSpec};
114+
use types::MainnetEthSpec;
115115

116116
type E = MainnetEthSpec;
117117

beacon_node/beacon_chain/src/observed_operations.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ impl<T: ObservableOperation<E>, E: EthSpec> ObservedOperations<T, E> {
153153
self.current_fork = head_fork;
154154
}
155155
}
156+
157+
/// Reset the cache. MUST ONLY BE USED IN TESTS.
158+
pub fn __reset_for_testing_only(&mut self) {
159+
self.observed_validator_indices.clear();
160+
}
156161
}
157162

158163
impl<T: ObservableOperation<E> + VerifyOperationAt<E>, E: EthSpec> ObservedOperations<T, E> {

0 commit comments

Comments
 (0)