diff --git a/bin/dipper-service/src/config.rs b/bin/dipper-service/src/config.rs index 30b0ee3d..e8d80b5b 100644 --- a/bin/dipper-service/src/config.rs +++ b/bin/dipper-service/src/config.rs @@ -46,8 +46,8 @@ pub struct Config { pub admin_rpc: AdminRpcConfig, /// The database configuration pub db: DbConfig, - /// The network service configuration - pub network: NetworkConfig, + /// The indexer URLs service configuration + pub indexer_urls: IndexerUrlsConfig, /// The signer configuration pub signer: SignerConfig, /// The IISA (Indexing Indexer Selection Algorithm) service configuration @@ -982,10 +982,10 @@ pub struct DbConfig { pub max_connections: Option, } -/// The network service configuration +/// The indexer URLs service configuration #[serde_as] #[derive(custom_debug::CustomDebug, serde::Deserialize)] -pub struct NetworkConfig { +pub struct IndexerUrlsConfig { /// The indexing-payments subgraph query endpoint used to look up /// registered indexer URLs. Same form as `chain_listener.subgraph_endpoint`: /// a full query URL, gateway-served or self-hosted. diff --git a/bin/dipper-service/src/main.rs b/bin/dipper-service/src/main.rs index a649be33..30680149 100644 --- a/bin/dipper-service/src/main.rs +++ b/bin/dipper-service/src/main.rs @@ -175,8 +175,8 @@ pub async fn main() -> anyhow::Result<()> { //- The network services let (indexer_urls_handle, indexer_urls_service) = { - let subgraph_endpoint = conf.network.subgraph_endpoint; - let api_key = conf.network.api_key.map(|key| key.into_inner()); + let subgraph_endpoint = conf.indexer_urls.subgraph_endpoint; + let api_key = conf.indexer_urls.api_key.map(|key| key.into_inner()); // Fetch the initial snapshot with bounded exponential-backoff retries. // The subgraph may be temporarily unavailable (e.g. during a chain halt). @@ -195,7 +195,7 @@ pub async fn main() -> anyhow::Result<()> { .await { Ok(s) if !s.is_empty() => break s, - Ok(s) if conf.network.allow_empty_at_startup => { + Ok(s) if conf.indexer_urls.allow_empty_at_startup => { tracing::warn!( "subgraph reports 0 registered indexers; starting with an empty \ snapshot (network.allow_empty_at_startup)" @@ -236,7 +236,7 @@ pub async fn main() -> anyhow::Result<()> { network::service::indexer_urls::Ctx { endpoint: subgraph_endpoint, api_key, - update_interval: conf.network.update_interval, + update_interval: conf.indexer_urls.update_interval, }, init_snapshot, ) diff --git a/k8s/configmap-example.yaml b/k8s/configmap-example.yaml index c15a178e..67d465c4 100644 --- a/k8s/configmap-example.yaml +++ b/k8s/configmap-example.yaml @@ -40,7 +40,7 @@ data: "password": "REPLACE_ME", "max_connections": 10 }, - "network": { + "indexer_urls": { "subgraph_endpoint": "https://api.studio.thegraph.com/query/REPLACE_ME_USER_ID/REPLACE_ME_INDEXING_PAYMENTS_SLUG/version/latest", "api_key": "REPLACE_ME_OR_REMOVE_IF_ENDPOINT_NEEDS_NO_AUTH", "update_interval": 60,