This repository has been archived by the owner on Dec 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(node): separate dump config exe to module
- Loading branch information
1 parent
0801a30
commit dd3a245
Showing
2 changed files
with
40 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use lazy_static::lazy_static; | ||
use papyrus_config::dumping::ser_pointer_target_param; | ||
use papyrus_config::{ParamPath, SerializedParam}; | ||
use starknet_api::core::ChainId; | ||
|
||
lazy_static! { | ||
/// Returns vector of (pointer target name, pointer target serialized param, vec<pointer param path>) | ||
/// to be applied on the dumped node config. | ||
/// The config updates will be performed on the shared pointer targets, and finally, the values | ||
/// will be propagated to the pointer params. | ||
pub static ref CONFIG_POINTERS: Vec<((ParamPath, SerializedParam), Vec<ParamPath>)> = vec![( | ||
ser_pointer_target_param( | ||
"chain_id", | ||
&ChainId("SN_MAIN".to_string()), | ||
"The chain to follow. For more details see https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#chain-id.", | ||
), | ||
vec!["storage.db_config.chain_id".to_owned(), "rpc.chain_id".to_owned()], | ||
), | ||
( | ||
ser_pointer_target_param( | ||
"starknet_url", | ||
&"https://alpha-mainnet.starknet.io/".to_string(), | ||
"The URL of a centralized Starknet gateway.", | ||
), | ||
vec!["rpc.starknet_url".to_owned(), "central.url".to_owned(), "monitoring_gateway.starknet_url".to_owned()], | ||
), | ||
( | ||
ser_pointer_target_param( | ||
"collect_metrics", | ||
&false, | ||
"If true, collect metrics for the node.", | ||
), | ||
vec!["rpc.collect_metrics".to_owned(), "monitoring_gateway.collect_metrics".to_owned()], | ||
)]; | ||
} |