Sampling service generic over network adapter
This commit is contained in:
parent
a9306fe05c
commit
46f0f616a3
|
@ -24,11 +24,10 @@ pub struct Config {
|
|||
<DaNetworkService<DaNetworkExecutorBackend<FillFromNodeList>> as ServiceData>::Settings,
|
||||
pub da_indexer: <crate::ExecutorDaIndexer as ServiceData>::Settings,
|
||||
pub da_verifier: <crate::DaVerifier as ServiceData>::Settings,
|
||||
pub da_sampling: <crate::DaSampling as ServiceData>::Settings,
|
||||
pub da_sampling: <crate::ExecutorDaSampling as ServiceData>::Settings,
|
||||
pub http: <ExecutorApiService as ServiceData>::Settings,
|
||||
pub cryptarchia: <crate::ExecutorCryptarchia as ServiceData>::Settings,
|
||||
pub storage: <crate::StorageService<RocksBackend<Wire>> as ServiceData>::Settings,
|
||||
pub wait_online_secs: u64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
|
|
@ -66,6 +66,9 @@ pub type ExecutorCryptarchia =
|
|||
pub type ExecutorDaIndexer =
|
||||
DaIndexer<nomos_da_sampling::network::adapters::executor::Libp2pAdapter<NomosDaMembership>>;
|
||||
|
||||
pub type ExecutorDaSampling =
|
||||
DaSampling<nomos_da_sampling::network::adapters::executor::Libp2pAdapter<NomosDaMembership>>;
|
||||
|
||||
#[derive(Services)]
|
||||
pub struct NomosExecutor {
|
||||
#[cfg(feature = "tracing")]
|
||||
|
@ -74,7 +77,7 @@ pub struct NomosExecutor {
|
|||
da_dispersal: ServiceHandle<DaDispersal>,
|
||||
da_indexer: ServiceHandle<ExecutorDaIndexer>,
|
||||
da_verifier: ServiceHandle<DaVerifier>,
|
||||
da_sampling: ServiceHandle<DaSampling>,
|
||||
da_sampling: ServiceHandle<ExecutorDaSampling>,
|
||||
da_network: ServiceHandle<DaNetworkService<DaNetworkExecutorBackend<NomosDaMembership>>>,
|
||||
cl_mempool: ServiceHandle<TxMempool>,
|
||||
da_mempool: ServiceHandle<DaMempool>,
|
||||
|
|
|
@ -118,7 +118,7 @@ pub struct Config {
|
|||
<DaNetworkService<DaNetworkValidatorBackend<FillFromNodeList>> as ServiceData>::Settings,
|
||||
pub da_indexer: <crate::NodeDaIndexer as ServiceData>::Settings,
|
||||
pub da_verifier: <crate::DaVerifier as ServiceData>::Settings,
|
||||
pub da_sampling: <crate::DaSampling as ServiceData>::Settings,
|
||||
pub da_sampling: <crate::NodeDaSampling as ServiceData>::Settings,
|
||||
pub http: <NomosApiService as ServiceData>::Settings,
|
||||
pub cryptarchia: <crate::Cryptarchia<
|
||||
nomos_da_sampling::network::adapters::validator::Libp2pAdapter<NomosDaMembership>,
|
||||
|
|
|
@ -138,13 +138,15 @@ pub type DaIndexer<SamplingAdapter> = DataIndexerService<
|
|||
pub type NodeDaIndexer =
|
||||
DaIndexer<nomos_da_sampling::network::adapters::validator::Libp2pAdapter<NomosDaMembership>>;
|
||||
|
||||
pub type DaSampling = DaSamplingService<
|
||||
pub type DaSampling<SamplingAdapter> = DaSamplingService<
|
||||
KzgrsSamplingBackend<ChaCha20Rng>,
|
||||
SamplingLibp2pAdapter<NomosDaMembership>,
|
||||
SamplingAdapter,
|
||||
ChaCha20Rng,
|
||||
SamplingStorageAdapter<DaBlob, Wire>,
|
||||
>;
|
||||
|
||||
pub type NodeDaSampling = DaSampling<SamplingLibp2pAdapter<NomosDaMembership>>;
|
||||
|
||||
pub type DaVerifier = DaVerifierService<
|
||||
KzgrsDaVerifier,
|
||||
VerifierNetworkAdapter<FillFromNodeList>,
|
||||
|
@ -158,7 +160,7 @@ pub struct Nomos {
|
|||
network: ServiceHandle<NetworkService<NetworkBackend>>,
|
||||
da_indexer: ServiceHandle<NodeDaIndexer>,
|
||||
da_verifier: ServiceHandle<DaVerifier>,
|
||||
da_sampling: ServiceHandle<DaSampling>,
|
||||
da_sampling: ServiceHandle<NodeDaSampling>,
|
||||
da_network: ServiceHandle<DaNetworkService<DaNetworkValidatorBackend<NomosDaMembership>>>,
|
||||
cl_mempool: ServiceHandle<TxMempool>,
|
||||
da_mempool: ServiceHandle<DaMempool>,
|
||||
|
|
Loading…
Reference in New Issue