diff --git a/SUPPORTED_APIS.md b/SUPPORTED_APIS.md index d9f4aa51..db63a95f 100644 --- a/SUPPORTED_APIS.md +++ b/SUPPORTED_APIS.md @@ -49,9 +49,9 @@ The `status` options are: | [`CONFIG`](#config-namespace) | [`config_setShowVmDetails`](#config_setshowvmdetails) | `SUPPORTED` | Updates `show_vm_details` to print more detailed results from vm execution | | [`CONFIG`](#config-namespace) | [`config_setShowGasDetails`](#config_setshowgasdetails) | `SUPPORTED` | Updates `show_gas_details` to print more details about gas estimation and usage | | [`CONFIG`](#config-namespace) | [`config_setShowNodeConfig`](#config_setshownodeconfig) | `SUPPORTED` | Updates `show_node_config` to print node config on startup | -| [`CONFIG`](#config-namespace) | [`config_setShowCallsSummary`](#config_setshowcallssummary) | `SUPPORTED` | Updates `show_calls_summary` to print calls and transactions summary | +| [`CONFIG`](#config-namespace) | [`config_setShowTxSummary`](#config_setshowtxsummary) | `SUPPORTED` | Updates `show_tx_summary` to print transactions and calls summary | | [`CONFIG`](#config-namespace) | [`config_setDisableConsoleLog`](#config_setdisableconsolelog) | `SUPPORTED` | Updates `disable_console_log` to disable printing of `console.log` invocations to stdout | -| [`CONFIG`](#config-namespace) | [`config_setShowEventLogs`](#config_setshowcallssummary) | `SUPPORTED` | Updates `show_event_logs` to log events | +| [`CONFIG`](#config-namespace) | [`config_setShowEventLogs`](#config_setshoweventlogs) | `SUPPORTED` | Updates `show_event_logs` to log events | | [`CONFIG`](#config-namespace) | [`config_setLogLevel`](#config_setloglevel) | `SUPPORTED` | Sets the logging level for the node and only displays the node logs. | | [`CONFIG`](#config-namespace) | [`config_setLogging`](#config_setlogging) | `SUPPORTED` | Sets the fine-tuned logging levels for the node and any of its dependencies | | [`DEBUG`](#debug-namespace) | [`debug_traceCall`](#debug_tracecall) | `SUPPORTED` | Performs a call and returns structured traces of the execution | @@ -394,11 +394,11 @@ curl --request POST \ --data '{"jsonrpc": "2.0","id": "1","method": "config_setShowNodeConfig","params": [true]}' ``` -### `config_setShowCallsSummary` +### `config_setShowTxSummary` [source](src/node/config_api.rs) -Updates `show_calls_summary` to print calls and transactions summary +Updates `show_tx_summary` to print transactions and calls summary #### Arguments + `value: boolean` @@ -413,7 +413,7 @@ Updates `show_calls_summary` to print calls and transactions summary curl --request POST \ --url http://localhost:8011/ \ --header 'content-type: application/json' \ - --data '{"jsonrpc": "2.0","id": "1","method": "config_setShowCallsSummary","params": [true]}' + --data '{"jsonrpc": "2.0","id": "1","method": "config_setShowTxSummary","params": [true]}' ``` ### `config_setDisableConsoleLog` diff --git a/src/config/cli.rs b/src/config/cli.rs index c42d44ac..7a4ffa5c 100644 --- a/src/config/cli.rs +++ b/src/config/cli.rs @@ -71,14 +71,14 @@ pub struct Cli { pub show_node_config: Option, #[arg(long, default_value = "true", default_missing_value = "true", num_args(0..=1), help_heading = "Debugging Options")] - /// If true, prints calls and transactions summary. - pub show_calls_summary: Option, + /// If true, prints transactions and calls summary. + pub show_tx_summary: Option, #[arg(long, alias = "no-console-log", default_missing_value = "true", num_args(0..=1), help_heading = "Debugging Options")] /// Disables printing of `console.log` invocations to stdout if true. pub disable_console_log: Option, - #[arg(long, default_value = "true", default_missing_value = "true", num_args(0..=1), help_heading = "Debugging Options")] + #[arg(long, default_missing_value = "true", num_args(0..=1), help_heading = "Debugging Options")] /// If true, logs events. pub show_event_logs: Option, @@ -345,7 +345,7 @@ impl Cli { .with_l1_gas_price(self.l1_gas_price) .with_l2_gas_price(self.l2_gas_price) .with_l1_pubdata_price(self.l1_pubdata_price) - .with_show_calls_summary(self.show_calls_summary) + .with_show_tx_summary(self.show_tx_summary) .with_show_event_logs(self.show_event_logs) .with_disable_console_log(self.disable_console_log) .with_show_calls(self.show_calls) diff --git a/src/config/mod.rs b/src/config/mod.rs index b3d31315..021c4d3c 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -61,8 +61,8 @@ pub struct TestNodeConfig { pub port: u16, /// Print node config on startup if true pub show_node_config: bool, - /// Print calls and transactions summary if true - pub show_calls_summary: bool, + /// Print transactions and calls summary if true + pub show_tx_summary: bool, /// If true, logs events. pub show_event_logs: bool, /// Disables printing of `console.log` invocations to stdout if true @@ -143,8 +143,8 @@ impl Default for TestNodeConfig { config_out: None, port: NODE_PORT, show_node_config: true, - show_calls_summary: true, - show_event_logs: true, + show_tx_summary: true, + show_event_logs: false, disable_console_log: false, show_calls: Default::default(), show_outputs: false, @@ -641,11 +641,11 @@ impl TestNodeConfig { self } - // Enable or disable printing calls and transactions summary + // Enable or disable printing transactions and calls summary #[must_use] - pub fn with_show_calls_summary(mut self, show_calls_summary: Option) -> Self { - if let Some(show_calls_summary) = show_calls_summary { - self.show_calls_summary = show_calls_summary; + pub fn with_show_tx_summary(mut self, show_tx_summary: Option) -> Self { + if let Some(show_tx_summary) = show_tx_summary { + self.show_tx_summary = show_tx_summary; } self } diff --git a/src/namespaces/config.rs b/src/namespaces/config.rs index 6e5d50f5..bfb4b922 100644 --- a/src/namespaces/config.rs +++ b/src/namespaces/config.rs @@ -95,15 +95,15 @@ pub trait ConfigurationApiNamespaceT { #[rpc(name = "config_setShowNodeConfig", returns = "bool")] fn config_set_show_node_config(&self, value: bool) -> Result; - /// Set show_calls_summary for the InMemoryNodeInner + /// Set show_tx_summary for the InMemoryNodeInner /// /// # Parameters - /// - `value`: A bool to update show_calls_summary to + /// - `value`: A bool to update show_tx_summary to /// /// # Returns - /// The updated/current `show_calls_summary` value for the InMemoryNodeInner. - #[rpc(name = "config_setShowCallsSummary", returns = "bool")] - fn config_set_show_calls_summary(&self, value: bool) -> Result; + /// The updated/current `show_tx_summary` value for the InMemoryNodeInner. + #[rpc(name = "config_setShowTxSummary", returns = "bool")] + fn config_set_show_tx_summary(&self, value: bool) -> Result; /// Set show_event_logs for the InMemoryNodeInner /// diff --git a/src/node/config_api.rs b/src/node/config_api.rs index e82c6dba..fd4afc4e 100644 --- a/src/node/config_api.rs +++ b/src/node/config_api.rs @@ -199,7 +199,7 @@ impl Configurat }) } - fn config_set_show_calls_summary(&self, value: bool) -> Result { + fn config_set_show_tx_summary(&self, value: bool) -> Result { self.get_inner() .write() .map_err(|err| { @@ -209,8 +209,8 @@ impl Configurat ))) }) .map(|mut writer| { - writer.config.show_calls_summary = value; - writer.config.show_calls_summary + writer.config.show_tx_summary = value; + writer.config.show_tx_summary }) } diff --git a/src/node/in_memory.rs b/src/node/in_memory.rs index 31ecdcd6..fee137a7 100644 --- a/src/node/in_memory.rs +++ b/src/node/in_memory.rs @@ -1215,7 +1215,7 @@ impl InMemoryNode { .take() .unwrap_or_default(); - if inner.config.show_calls_summary { + if inner.config.show_tx_summary { match &tx_result.result { ExecutionResult::Success { output } => { tracing::info!("Call: {}", "SUCCESS".green()); @@ -1515,7 +1515,7 @@ impl InMemoryNode { let spent_on_pubdata = tx_result.statistics.gas_used - tx_result.statistics.computational_gas_used as u64; - if inner.config.show_calls_summary { + if inner.config.show_tx_summary { tracing::info!("┌─────────────────────────┐"); tracing::info!("│ TRANSACTION SUMMARY │"); tracing::info!("└─────────────────────────┘"); @@ -1629,21 +1629,21 @@ impl InMemoryNode { let tx_hash = l2_tx.hash(); let transaction_type = l2_tx.common_data.transaction_type; - let show_calls_summary = self + let show_tx_summary = self .inner .read() .map_err(|_| anyhow::anyhow!("Failed to acquire read lock"))? .config - .show_calls_summary; + .show_tx_summary; - if show_calls_summary { + if show_tx_summary { tracing::info!(""); tracing::info!("Validating {}", format!("{:?}", tx_hash).bold()); } self.validate_tx(&l2_tx)?; - if show_calls_summary { + if show_tx_summary { tracing::info!("Executing {}", format!("{:?}", tx_hash).bold()); }