## Issue Addressed Closes #1787 ## Proposed Changes * Abstract the `ValidatorPubkeyCache` over a "backing" which is either a file (legacy), or the database. * Implement a migration from schema v2 to schema v3, whereby the contents of the cache file are copied to the DB, and then the file is deleted. The next release to include this change must be a minor version bump, and we will need to warn users of the inability to downgrade (this is our first DB schema change since mainnet genesis). * Move the schema migration code from the `store` crate into the `beacon_chain` crate so that it can access the datadir and the `ValidatorPubkeyCache`, etc. It gets injected back into the `store` via a closure (similar to what we do in fork choice).
53 lines
1.7 KiB
Rust
53 lines
1.7 KiB
Rust
#![recursion_limit = "128"] // For lazy-static
|
|
pub mod attestation_verification;
|
|
mod beacon_chain;
|
|
mod beacon_fork_choice_store;
|
|
mod beacon_proposer_cache;
|
|
mod beacon_snapshot;
|
|
mod block_verification;
|
|
pub mod builder;
|
|
pub mod chain_config;
|
|
mod errors;
|
|
pub mod eth1_chain;
|
|
pub mod events;
|
|
mod head_tracker;
|
|
mod metrics;
|
|
pub mod migrate;
|
|
mod naive_aggregation_pool;
|
|
mod observed_attestations;
|
|
mod observed_attesters;
|
|
mod observed_block_producers;
|
|
pub mod observed_operations;
|
|
mod persisted_beacon_chain;
|
|
mod persisted_fork_choice;
|
|
pub mod schema_change;
|
|
mod shuffling_cache;
|
|
mod snapshot_cache;
|
|
pub mod state_advance_timer;
|
|
pub mod test_utils;
|
|
mod timeout_rw_lock;
|
|
pub mod validator_monitor;
|
|
mod validator_pubkey_cache;
|
|
|
|
pub use self::beacon_chain::{
|
|
AttestationProcessingOutcome, BeaconChain, BeaconChainTypes, BeaconStore, ChainSegmentResult,
|
|
ForkChoiceError, StateSkipConfig, MAXIMUM_GOSSIP_CLOCK_DISPARITY,
|
|
};
|
|
pub use self::beacon_snapshot::BeaconSnapshot;
|
|
pub use self::chain_config::ChainConfig;
|
|
pub use self::errors::{BeaconChainError, BlockProductionError};
|
|
pub use attestation_verification::Error as AttestationError;
|
|
pub use beacon_fork_choice_store::{BeaconForkChoiceStore, Error as ForkChoiceStoreError};
|
|
pub use block_verification::{BlockError, GossipVerifiedBlock};
|
|
pub use eth1_chain::{Eth1Chain, Eth1ChainBackend};
|
|
pub use events::ServerSentEventHandler;
|
|
pub use metrics::scrape_for_metrics;
|
|
pub use parking_lot;
|
|
pub use slot_clock;
|
|
pub use state_processing::per_block_processing::errors::{
|
|
AttestationValidationError, AttesterSlashingValidationError, DepositValidationError,
|
|
ExitValidationError, ProposerSlashingValidationError,
|
|
};
|
|
pub use store;
|
|
pub use types;
|