-
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
5925b99
commit a3b3603
Showing
9 changed files
with
212 additions
and
7 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
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
52 changes: 52 additions & 0 deletions
52
...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,52 @@ | ||
--- | ||
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.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) | ||
} |