diff --git a/sequencer_core/src/lib.rs b/sequencer_core/src/lib.rs index 596ac747..9a2ca2b1 100644 --- a/sequencer_core/src/lib.rs +++ b/sequencer_core/src/lib.rs @@ -173,24 +173,10 @@ impl SequencerCore Result { - { - let (tx, msg_id) = self - .produce_new_block_with_mempool_transactions() - .context("Failed to produce new block with mempool transactions")?; - match self - .block_settlement_client - .submit_inscribe_tx_to_bedrock(tx) - .await - { - Ok(()) => { - info!("Posted block data to Bedrock, msg_id: {msg_id:?}"); - } - Err(err) => { - error!("Failed to post block data to Bedrock with error: {err:#}"); - } - } - } + pub async fn produce_new_block(&mut self) -> Result { + let (_tx, _msg_id) = self + .produce_new_block_with_mempool_transactions() + .context("Failed to produce new block with mempool transactions")?; Ok(self.chain_height) } diff --git a/sequencer_runner/configs/debug/sequencer_config.json b/sequencer_runner/configs/debug/sequencer_config.json index 2e4d4ed3..4ac8e15b 100644 --- a/sequencer_runner/configs/debug/sequencer_config.json +++ b/sequencer_runner/configs/debug/sequencer_config.json @@ -5,8 +5,8 @@ "is_genesis_random": true, "max_num_tx_in_block": 20, "mempool_max_size": 1000, - "block_create_timeout_millis": 5000, - "retry_pending_blocks_timeout_millis": 7000, + "block_create_timeout_millis": 12000, + "retry_pending_blocks_timeout_millis": 6000, "port": 3040, "bedrock_config": { "backoff": { diff --git a/sequencer_runner/src/lib.rs b/sequencer_runner/src/lib.rs index aab035fd..b3020e93 100644 --- a/sequencer_runner/src/lib.rs +++ b/sequencer_runner/src/lib.rs @@ -147,9 +147,7 @@ async fn main_loop(seq_core: Arc>, block_timeout: Duration) let id = { let mut state = seq_core.lock().await; - state - .produce_new_block_and_post_to_settlement_layer() - .await? + state.produce_new_block().await? }; info!("Block with id {id} created"); @@ -174,7 +172,10 @@ async fn retry_pending_blocks_loop( (pending_blocks, client) }; - if let Some(block) = pending_blocks.first() { + if let Some(block) = pending_blocks + .iter() + .min_by_key(|block| block.header.block_id) + { info!( "Resubmitting pending block with id {}", block.header.block_id