From 13da1096dd80fe5865dfa6c8d216da41dcc5a682 Mon Sep 17 00:00:00 2001 From: Mario Rugiero Date: Sat, 20 Sep 2025 01:08:18 -0300 Subject: [PATCH 1/2] perf(l1): filter empty storages from snapshots --- crates/networking/p2p/peer_handler.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/networking/p2p/peer_handler.rs b/crates/networking/p2p/peer_handler.rs index a56e968cba..438b194fa3 100644 --- a/crates/networking/p2p/peer_handler.rs +++ b/crates/networking/p2p/peer_handler.rs @@ -1337,6 +1337,7 @@ impl PeerHandler { .clone() .into_iter() .zip(current_account_storages) + .filter(|(_, storages)| !storages.is_empty()) .collect::>() .encode_to_vec(); @@ -1569,6 +1570,7 @@ impl PeerHandler { let snapshot = current_account_hashes .into_iter() .zip(current_account_storages) + .filter(|(_, storages)| !storages.is_empty()) .collect::>() .encode_to_vec(); From 85c183908a443c49737f9f736426b27df7f2feee Mon Sep 17 00:00:00 2001 From: Mario Rugiero Date: Wed, 24 Sep 2025 11:03:50 -0300 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33a6fa05fe..1b85400bbc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Perf +### 2025-09-24 + +- Avoid dumping empty storage accounts to disk [#4590](https://github.com/lambdaclass/ethrex/pull/4590) + ### 2025-09-22