mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-03-29 05:33:12 +00:00
feat: remove override_rust_log from wallet config
This commit is contained in:
parent
b631ef02c6
commit
325960d696
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"home": "/var/lib/sequencer_service",
|
"home": "/var/lib/sequencer_service",
|
||||||
"override_rust_log": null,
|
|
||||||
"genesis_id": 1,
|
"genesis_id": 1,
|
||||||
"is_genesis_random": true,
|
"is_genesis_random": true,
|
||||||
"max_num_tx_in_block": 20,
|
"max_num_tx_in_block": 20,
|
||||||
@ -8,7 +7,6 @@
|
|||||||
"mempool_max_size": 10000,
|
"mempool_max_size": 10000,
|
||||||
"block_create_timeout": "10s",
|
"block_create_timeout": "10s",
|
||||||
"retry_pending_blocks_timeout": "7s",
|
"retry_pending_blocks_timeout": "7s",
|
||||||
"port": 3040,
|
|
||||||
"bedrock_config": {
|
"bedrock_config": {
|
||||||
"backoff": {
|
"backoff": {
|
||||||
"start_delay": "100ms",
|
"start_delay": "100ms",
|
||||||
|
|||||||
@ -234,7 +234,6 @@ pub fn wallet_config(
|
|||||||
initial_data: &InitialData,
|
initial_data: &InitialData,
|
||||||
) -> Result<WalletConfig> {
|
) -> Result<WalletConfig> {
|
||||||
Ok(WalletConfig {
|
Ok(WalletConfig {
|
||||||
override_rust_log: None,
|
|
||||||
sequencer_addr: addr_to_url(UrlProtocol::Http, sequencer_addr)
|
sequencer_addr: addr_to_url(UrlProtocol::Http, sequencer_addr)
|
||||||
.context("Failed to convert sequencer addr to URL")?,
|
.context("Failed to convert sequencer addr to URL")?,
|
||||||
seq_poll_timeout: Duration::from_secs(30),
|
seq_poll_timeout: Duration::from_secs(30),
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"home": ".",
|
"home": ".",
|
||||||
"override_rust_log": null,
|
|
||||||
"genesis_id": 1,
|
"genesis_id": 1,
|
||||||
"is_genesis_random": true,
|
"is_genesis_random": true,
|
||||||
"max_num_tx_in_block": 20,
|
"max_num_tx_in_block": 20,
|
||||||
@ -8,7 +7,6 @@
|
|||||||
"mempool_max_size": 1000,
|
"mempool_max_size": 1000,
|
||||||
"block_create_timeout": "15s",
|
"block_create_timeout": "15s",
|
||||||
"retry_pending_blocks_timeout": "5s",
|
"retry_pending_blocks_timeout": "5s",
|
||||||
"port": 3040,
|
|
||||||
"bedrock_config": {
|
"bedrock_config": {
|
||||||
"backoff": {
|
"backoff": {
|
||||||
"start_delay": "100ms",
|
"start_delay": "100ms",
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
{
|
{
|
||||||
"home": "/var/lib/sequencer_service",
|
"home": "/var/lib/sequencer_service",
|
||||||
"override_rust_log": null,
|
|
||||||
"genesis_id": 1,
|
"genesis_id": 1,
|
||||||
"is_genesis_random": true,
|
"is_genesis_random": true,
|
||||||
"max_num_tx_in_block": 20,
|
"max_num_tx_in_block": 20,
|
||||||
"max_block_size": "1 MiB",
|
"max_block_size": "1 MiB",
|
||||||
"mempool_max_size": 10000,
|
"mempool_max_size": 10000,
|
||||||
"block_create_timeout": "10s",
|
"block_create_timeout": "10s",
|
||||||
"port": 3040,
|
|
||||||
"retry_pending_blocks_timeout": "7s",
|
"retry_pending_blocks_timeout": "7s",
|
||||||
"bedrock_config": {
|
"bedrock_config": {
|
||||||
"backoff": {
|
"backoff": {
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"override_rust_log": null,
|
|
||||||
"sequencer_addr": "http://127.0.0.1:3040",
|
"sequencer_addr": "http://127.0.0.1:3040",
|
||||||
"seq_poll_timeout": "30s",
|
"seq_poll_timeout": "30s",
|
||||||
"seq_tx_poll_max_blocks": 15,
|
"seq_tx_poll_max_blocks": 15,
|
||||||
|
|||||||
@ -203,7 +203,6 @@ mod tests {
|
|||||||
|
|
||||||
fn create_sample_wallet_config() -> WalletConfig {
|
fn create_sample_wallet_config() -> WalletConfig {
|
||||||
WalletConfig {
|
WalletConfig {
|
||||||
override_rust_log: None,
|
|
||||||
sequencer_addr: "http://127.0.0.1".parse().unwrap(),
|
sequencer_addr: "http://127.0.0.1".parse().unwrap(),
|
||||||
seq_poll_timeout: std::time::Duration::from_secs(12),
|
seq_poll_timeout: std::time::Duration::from_secs(12),
|
||||||
seq_tx_poll_max_blocks: 5,
|
seq_tx_poll_max_blocks: 5,
|
||||||
|
|||||||
@ -37,15 +37,6 @@ impl WalletSubcommand for ConfigSubcommand {
|
|||||||
println!("{config_str}");
|
println!("{config_str}");
|
||||||
} else if let Some(key) = key {
|
} else if let Some(key) = key {
|
||||||
match key.as_str() {
|
match key.as_str() {
|
||||||
"override_rust_log" => {
|
|
||||||
if let Some(value) =
|
|
||||||
&wallet_core.storage.wallet_config.override_rust_log
|
|
||||||
{
|
|
||||||
println!("{value}");
|
|
||||||
} else {
|
|
||||||
println!("Not set");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"sequencer_addr" => {
|
"sequencer_addr" => {
|
||||||
println!("{}", wallet_core.storage.wallet_config.sequencer_addr);
|
println!("{}", wallet_core.storage.wallet_config.sequencer_addr);
|
||||||
}
|
}
|
||||||
@ -88,9 +79,6 @@ impl WalletSubcommand for ConfigSubcommand {
|
|||||||
}
|
}
|
||||||
Self::Set { key, value } => {
|
Self::Set { key, value } => {
|
||||||
match key.as_str() {
|
match key.as_str() {
|
||||||
"override_rust_log" => {
|
|
||||||
wallet_core.storage.wallet_config.override_rust_log = Some(value);
|
|
||||||
}
|
|
||||||
"sequencer_addr" => {
|
"sequencer_addr" => {
|
||||||
wallet_core.storage.wallet_config.sequencer_addr = value.parse()?;
|
wallet_core.storage.wallet_config.sequencer_addr = value.parse()?;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -187,9 +187,6 @@ pub struct GasConfig {
|
|||||||
#[optfield::optfield(pub WalletConfigOverrides, rewrap, attrs = (derive(Debug, Default, Clone)))]
|
#[optfield::optfield(pub WalletConfigOverrides, rewrap, attrs = (derive(Debug, Default, Clone)))]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
pub struct WalletConfig {
|
pub struct WalletConfig {
|
||||||
/// Override rust log (env var logging level).
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub override_rust_log: Option<String>,
|
|
||||||
/// Sequencer URL.
|
/// Sequencer URL.
|
||||||
pub sequencer_addr: Url,
|
pub sequencer_addr: Url,
|
||||||
/// Sequencer polling duration for new blocks.
|
/// Sequencer polling duration for new blocks.
|
||||||
@ -211,7 +208,6 @@ pub struct WalletConfig {
|
|||||||
impl Default for WalletConfig {
|
impl Default for WalletConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
override_rust_log: None,
|
|
||||||
sequencer_addr: "http://127.0.0.1:3040".parse().unwrap(),
|
sequencer_addr: "http://127.0.0.1:3040".parse().unwrap(),
|
||||||
seq_poll_timeout: Duration::from_secs(12),
|
seq_poll_timeout: Duration::from_secs(12),
|
||||||
seq_tx_poll_max_blocks: 5,
|
seq_tx_poll_max_blocks: 5,
|
||||||
@ -308,7 +304,6 @@ impl WalletConfig {
|
|||||||
|
|
||||||
pub fn apply_overrides(&mut self, overrides: WalletConfigOverrides) {
|
pub fn apply_overrides(&mut self, overrides: WalletConfigOverrides) {
|
||||||
let Self {
|
let Self {
|
||||||
override_rust_log,
|
|
||||||
sequencer_addr,
|
sequencer_addr,
|
||||||
seq_poll_timeout,
|
seq_poll_timeout,
|
||||||
seq_tx_poll_max_blocks,
|
seq_tx_poll_max_blocks,
|
||||||
@ -319,7 +314,6 @@ impl WalletConfig {
|
|||||||
} = self;
|
} = self;
|
||||||
|
|
||||||
let WalletConfigOverrides {
|
let WalletConfigOverrides {
|
||||||
override_rust_log: o_override_rust_log,
|
|
||||||
sequencer_addr: o_sequencer_addr,
|
sequencer_addr: o_sequencer_addr,
|
||||||
seq_poll_timeout: o_seq_poll_timeout,
|
seq_poll_timeout: o_seq_poll_timeout,
|
||||||
seq_tx_poll_max_blocks: o_seq_tx_poll_max_blocks,
|
seq_tx_poll_max_blocks: o_seq_tx_poll_max_blocks,
|
||||||
@ -329,10 +323,6 @@ impl WalletConfig {
|
|||||||
basic_auth: o_basic_auth,
|
basic_auth: o_basic_auth,
|
||||||
} = overrides;
|
} = overrides;
|
||||||
|
|
||||||
if let Some(v) = o_override_rust_log {
|
|
||||||
warn!("Overriding wallet config 'override_rust_log' to {v:#?}");
|
|
||||||
*override_rust_log = v;
|
|
||||||
}
|
|
||||||
if let Some(v) = o_sequencer_addr {
|
if let Some(v) = o_sequencer_addr {
|
||||||
warn!("Overriding wallet config 'sequencer_addr' to {v}");
|
warn!("Overriding wallet config 'sequencer_addr' to {v}");
|
||||||
*sequencer_addr = v;
|
*sequencer_addr = v;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user