-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: create dump_config for mempool node config
- Loading branch information
1 parent
151ea3c
commit be349d7
Showing
9 changed files
with
226 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -69,4 +69,4 @@ | |
"privacy": "Public", | ||
"value": false | ||
} | ||
} | ||
} |
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
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
86 changes: 86 additions & 0 deletions
86
...ool_node/src/config/snapshots/mempool_node__config__config_test__dump_default_config.snap
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,86 @@ | ||
--- | ||
source: crates/mempool_node/src/config/config_test.rs | ||
expression: dumped_default_config | ||
--- | ||
{ | ||
"components.gateway_component.execute": { | ||
"description": "The component execution flag.", | ||
"value": true, | ||
"privacy": "Public" | ||
}, | ||
"components.mempool_component.execute": { | ||
"description": "The component execution flag.", | ||
"value": true, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.network_config.ip": { | ||
"description": "The gateway server ip.", | ||
"value": "0.0.0.0", | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.network_config.port": { | ||
"description": "The gateway server port.", | ||
"value": { | ||
"$serde_json::private::Number": "8080" | ||
}, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.chain_info.chain_id": { | ||
"description": "The chain ID of the StarkNet chain.", | ||
"value": "0x0", | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.chain_info.eth_fee_token_address": { | ||
"description": "Address of the ETH fee token.", | ||
"value": "0x0", | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.chain_info.strk_fee_token_address": { | ||
"description": "Address of the STRK fee token.", | ||
"value": "0x0", | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.max_nonce_for_validation_skip": { | ||
"description": "The maximum nonce for which the validation is skipped.", | ||
"value": "0x0", | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.max_recursion_depth": { | ||
"description": "The maximum recursion depth allowed in a transaction.", | ||
"value": { | ||
"$serde_json::private::Number": "0" | ||
}, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateful_transaction_validator_config.validate_max_n_steps": { | ||
"description": "The maximum number of steps the validation function is allowed to take.", | ||
"value": { | ||
"$serde_json::private::Number": "0" | ||
}, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateless_transaction_validator_config.max_calldata_length": { | ||
"description": "Validates that a transaction has signature length less than or equal to this value.", | ||
"value": { | ||
"$serde_json::private::Number": "0" | ||
}, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateless_transaction_validator_config.max_signature_length": { | ||
"description": "Validates that a transaction has calldata length less than or equal to this value.", | ||
"value": { | ||
"$serde_json::private::Number": "0" | ||
}, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateless_transaction_validator_config.validate_non_zero_l1_gas_fee": { | ||
"description": "If true, validates that a transaction has non-zero L1 resource bounds.", | ||
"value": false, | ||
"privacy": "Public" | ||
}, | ||
"gateway_config.stateless_transaction_validator_config.validate_non_zero_l2_gas_fee": { | ||
"description": "If true, validates that a transaction has non-zero L2 resource bounds.", | ||
"value": false, | ||
"privacy": "Public" | ||
} | ||
} |
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,12 @@ | ||
[package] | ||
name = "test_utils" | ||
version.workspace = true | ||
edition.workspace = true | ||
repository.workspace = true | ||
license.workspace = true | ||
|
||
[features] | ||
|
||
[dependencies] | ||
|
||
|
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,7 @@ | ||
use std::env; | ||
use std::path::{Path, PathBuf}; | ||
|
||
/// Returns the absolute path from the project root. | ||
pub fn get_absolute_path(relative_path: &str) -> PathBuf { | ||
Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("../..").join(relative_path) | ||
} |