Modularize beacon node backend (#4718)

#4669


  Modularize the beacon node backend to make it easier to add new database implementations
This commit is contained in:
Eitan Seri-Levi
2025-01-23 09:12:16 +07:00
committed by GitHub
parent 266b241123
commit a1b7d616b4
38 changed files with 1479 additions and 650 deletions

View File

@@ -2,7 +2,6 @@ mod cli;
mod config;
pub use beacon_chain;
use beacon_chain::store::LevelDB;
use beacon_chain::{
builder::Witness, eth1_chain::CachingEth1Backend, slot_clock::SystemTimeSlotClock,
};
@@ -16,11 +15,19 @@ use slasher::{DatabaseBackendOverride, Slasher};
use slog::{info, warn};
use std::ops::{Deref, DerefMut};
use std::sync::Arc;
use store::database::interface::BeaconNodeBackend;
use types::{ChainSpec, Epoch, EthSpec, ForkName};
/// A type-alias to the tighten the definition of a production-intended `Client`.
pub type ProductionClient<E> =
Client<Witness<SystemTimeSlotClock, CachingEth1Backend<E>, E, LevelDB<E>, LevelDB<E>>>;
pub type ProductionClient<E> = Client<
Witness<
SystemTimeSlotClock,
CachingEth1Backend<E>,
E,
BeaconNodeBackend<E>,
BeaconNodeBackend<E>,
>,
>;
/// The beacon node `Client` that will be used in production.
///