From 67f3412182d1845af8c327b97a01db4ea4291692 Mon Sep 17 00:00:00 2001 From: phoenix <51927076+phoenix-o@users.noreply.github.com> Date: Tue, 16 Apr 2024 12:13:05 -0400 Subject: [PATCH] [indexer] introduce parameters remote_store_url (#17176) --- crates/sui-indexer/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/sui-indexer/src/lib.rs b/crates/sui-indexer/src/lib.rs index 9c5d08919d6d7..b8ac8015db038 100644 --- a/crates/sui-indexer/src/lib.rs +++ b/crates/sui-indexer/src/lib.rs @@ -9,6 +9,7 @@ use clap::Parser; use jsonrpsee::http_client::{HeaderMap, HeaderValue, HttpClient, HttpClientBuilder}; use metrics::IndexerMetrics; use prometheus::Registry; +use std::path::PathBuf; use tokio::runtime::Handle; use tracing::warn; use url::Url; @@ -59,6 +60,8 @@ pub struct IndexerConfig { pub db_name: Option, #[clap(long, default_value = "http://0.0.0.0:9000", global = true)] pub rpc_client_url: String, + #[clap(long, default_value = Some("https://checkpoints.mainnet.sui.io"), global = true)] + pub remote_store_url: Option, #[clap(long, default_value = "0.0.0.0", global = true)] pub client_metric_host: String, #[clap(long, default_value = "9184", global = true)] @@ -73,6 +76,8 @@ pub struct IndexerConfig { pub fullnode_sync_worker: bool, #[clap(long)] pub rpc_server_worker: bool, + #[clap(long)] + pub data_ingestion_path: Option, } impl IndexerConfig { @@ -114,6 +119,7 @@ impl Default for IndexerConfig { db_port: None, db_name: None, rpc_client_url: "http://127.0.0.1:9000".to_string(), + remote_store_url: Some("https://checkpoints.mainnet.sui.io".to_string()), client_metric_host: "0.0.0.0".to_string(), client_metric_port: 9184, rpc_server_url: "0.0.0.0".to_string(), @@ -121,6 +127,7 @@ impl Default for IndexerConfig { reset_db: false, fullnode_sync_worker: true, rpc_server_worker: true, + data_ingestion_path: None, } } }