From 76a8ed0d4994a8d9e09f5b3129edc494ee127edd Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Mon, 26 Jan 2026 10:29:48 +0000 Subject: [PATCH] perf(db): flatten HashedPostState before persisting Accumulate hashed state from all blocks using `HashedPostStateSorted::merge_batch` and write it in a single batch, reducing cursor open/close overhead from N calls to 1. This mirrors the existing optimization for trie updates. Closes #20609 --- .../src/providers/database/provider.rs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/storage/provider/src/providers/database/provider.rs b/crates/storage/provider/src/providers/database/provider.rs index d693791fa5e..ba3292c51b9 100644 --- a/crates/storage/provider/src/providers/database/provider.rs +++ b/crates/storage/provider/src/providers/database/provider.rs @@ -630,27 +630,27 @@ impl DatabaseProvider