Skip to content

Commit

Permalink
refactor(proposer): adjust block propose duration (#2910)
Browse files Browse the repository at this point in the history
Changed the block propose duration from 5 seconds to 600 seconds for balancing cost on L1 and memory usage of buffer.
  • Loading branch information
popcnt1 authored Nov 15, 2024
1 parent 72c6b1b commit 999cfcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/rooch-rpc-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub async fn run_start_server(opt: RoochOpt, server_opt: ServerOpt) -> Result<Se
// tracing_subscriber can only be inited once.
let _ = tracing_subscriber::fmt::try_init();

//Exit the process when some thread panic
// Exit the process when some thread panic
// take_hook() returns the default hook in case when a custom one is not set
let orig_hook = panic::take_hook();
panic::set_hook(Box::new(move |panic_info| {
Expand All @@ -196,7 +196,7 @@ pub async fn run_start_server(opt: RoochOpt, server_opt: ServerOpt) -> Result<Se
// Initialize metrics before creating any stores
init_metrics(&prometheus_registry);

//Init store
// Init store
let store_config = opt.store_config();

let rooch_db = RoochDB::init(store_config, &prometheus_registry)?;
Expand Down Expand Up @@ -323,7 +323,7 @@ pub async fn run_start_server(opt: RoochOpt, server_opt: ServerOpt) -> Result<Se
.await?;
let proposer_proxy = ProposerProxy::new(proposer.clone().into());
//TODO load from config
let block_propose_duration_in_seconds: u64 = 5;
let block_propose_duration_in_seconds: u64 = 600;
let mut timers = vec![];
let proposer_timer = Timer::start(
proposer,
Expand Down

0 comments on commit 999cfcf

Please sign in to comment.