From 784dbde6f445218c1ae04b7c9cc0da275f05aa91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 13 Aug 2025 15:32:33 -0300 Subject: [PATCH 1/3] add error for not enough blob space in a single batch' --- crates/l2/sequencer/l1_committer.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/l2/sequencer/l1_committer.rs b/crates/l2/sequencer/l1_committer.rs index d5564d93a3..5c875cb048 100644 --- a/crates/l2/sequencer/l1_committer.rs +++ b/crates/l2/sequencer/l1_committer.rs @@ -362,7 +362,10 @@ impl L1Committer { }; let Ok((bundle, latest_blob_size)) = result else { - warn!( + if block_to_commit_number == first_block_of_batch { + return Err(CommitterError::InternalError("Not enough blob space for a single block batch".to_string())); + } + warn!( "Batch size limit reached. Any remaining blocks will be processed in the next batch." ); // Break loop. Use the previous generated blobs_bundle. From 0445c2e21fb1a22a6703a4dc9496a73a84a21c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Wed, 13 Aug 2025 15:35:14 -0300 Subject: [PATCH 2/3] do not insert empty account diffs --- crates/l2/common/src/state_diff.rs | 2 +- crates/l2/sequencer/block_producer/payload_builder.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/l2/common/src/state_diff.rs b/crates/l2/common/src/state_diff.rs index d87752f04d..7a2667f783 100644 --- a/crates/l2/common/src/state_diff.rs +++ b/crates/l2/common/src/state_diff.rs @@ -59,7 +59,7 @@ pub enum StateDiffError { EVMError(#[from] EvmError), } -#[derive(Debug, Clone, Default, Serialize, Deserialize)] +#[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq)] pub struct AccountStateDiff { pub new_balance: Option, pub nonce_diff: u16, diff --git a/crates/l2/sequencer/block_producer/payload_builder.rs b/crates/l2/sequencer/block_producer/payload_builder.rs index cef1147364..3ed9f867f6 100644 --- a/crates/l2/sequencer/block_producer/payload_builder.rs +++ b/crates/l2/sequencer/block_producer/payload_builder.rs @@ -327,7 +327,10 @@ fn get_account_diffs_in_tx( bytecode_hash: None, }; - modified_accounts.insert(*address, account_state_diff); + // If account state diff is NOT empty + if account_state_diff != AccountStateDiff::default() { + modified_accounts.insert(*address, account_state_diff); + } } // Then if there is any storage change, we add it to the account state diff From 346156e65c4075ffbefc41680cc70934a76cd749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Est=C3=A9fano=20Bargas?= Date: Thu, 21 Aug 2025 18:38:19 -0300 Subject: [PATCH 3/3] fmt --- crates/l2/sequencer/l1_committer.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/l2/sequencer/l1_committer.rs b/crates/l2/sequencer/l1_committer.rs index 36b07250c3..bc9c29f839 100644 --- a/crates/l2/sequencer/l1_committer.rs +++ b/crates/l2/sequencer/l1_committer.rs @@ -362,9 +362,11 @@ impl L1Committer { let Ok((bundle, latest_blob_size)) = result else { if block_to_commit_number == first_block_of_batch { - return Err(CommitterError::InternalError("Not enough blob space for a single block batch".to_string())); + return Err(CommitterError::InternalError( + "Not enough blob space for a single block batch".to_string(), + )); } - warn!( + warn!( "Batch size limit reached. Any remaining blocks will be processed in the next batch." ); // Break loop. Use the previous generated blobs_bundle.