From a7827ae52f39c7407630849eed6335f60a1b95be Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Wed, 7 May 2025 22:02:50 +0100 Subject: [PATCH 01/12] add config options for db batch sizes used by triedb --- execution/gethexec/blockchain.go | 8 ++++++++ go-ethereum | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/execution/gethexec/blockchain.go b/execution/gethexec/blockchain.go index 7cd7f95ecc..1eb40750ca 100644 --- a/execution/gethexec/blockchain.go +++ b/execution/gethexec/blockchain.go @@ -34,6 +34,8 @@ type CachingConfig struct { TrieDirtyCache int `koanf:"trie-dirty-cache"` TrieCleanCache int `koanf:"trie-clean-cache"` TrieCapLimit uint32 `koanf:"trie-cap-limit"` + TrieCapBatchSize uint32 `koanf:"trie-cap-batch-size"` + TrieCommitBatchSize uint32 `koanf:"trie-commit-batch-size"` SnapshotCache int `koanf:"snapshot-cache"` DatabaseCache int `koanf:"database-cache"` SnapshotRestoreGasLimit uint64 `koanf:"snapshot-restore-gas-limit"` @@ -57,6 +59,8 @@ func CachingConfigAddOptions(prefix string, f *flag.FlagSet) { f.Int(prefix+".snapshot-cache", DefaultCachingConfig.SnapshotCache, "amount of memory in megabytes to cache state snapshots with") f.Int(prefix+".database-cache", DefaultCachingConfig.DatabaseCache, "amount of memory in megabytes to cache database contents with") f.Uint32(prefix+".trie-cap-limit", DefaultCachingConfig.TrieCapLimit, "amount of memory in megabytes to be used in the TrieDB Cap operation during maintenance") + f.Uint32(prefix+".trie-cap-batch-size", DefaultCachingConfig.TrieCapBatchSize, "batch size in bytes used in the TrieDB Cap operation (0 = use geth default)") + f.Uint32(prefix+".trie-commit-batch-size", DefaultCachingConfig.TrieCommitBatchSize, "batch size in bytes used in the TrieDB Commit operation (0 = use geth default)") f.Uint64(prefix+".snapshot-restore-gas-limit", DefaultCachingConfig.SnapshotRestoreGasLimit, "maximum gas rolled back to recover snapshot") f.Uint64(prefix+".head-rewind-blocks-limit", DefaultCachingConfig.HeadRewindBlocksLimit, "maximum number of blocks rolled back to recover chain head (0 = use geth default limit)") f.Uint32(prefix+".max-number-of-blocks-to-skip-state-saving", DefaultCachingConfig.MaxNumberOfBlocksToSkipStateSaving, "maximum number of blocks to skip state saving to persistent storage (archive node only) -- warning: this option seems to cause issues") @@ -81,6 +85,8 @@ var DefaultCachingConfig = CachingConfig{ TrieDirtyCache: 1024, TrieCleanCache: 600, TrieCapLimit: 100, + TrieCapBatchSize: 0, // 0 = use geth default + TrieCommitBatchSize: 0, // 0 = use geth default SnapshotCache: 400, DatabaseCache: 2048, SnapshotRestoreGasLimit: 300_000_000_000, @@ -108,6 +114,8 @@ func DefaultCacheConfigFor(stack *node.Node, cachingConfig *CachingConfig) *core TrieTimeLimitRandomOffset: cachingConfig.TrieTimeLimitRandomOffset, TriesInMemory: cachingConfig.BlockCount, TrieRetention: cachingConfig.BlockAge, + TrieCapBatchSize: cachingConfig.TrieCapBatchSize, + TrieCommitBatchSize: cachingConfig.TrieCommitBatchSize, SnapshotLimit: cachingConfig.SnapshotCache, Preimages: baseConf.Preimages, SnapshotRestoreMaxGas: cachingConfig.SnapshotRestoreGasLimit, diff --git a/go-ethereum b/go-ethereum index 25fc5f0842..80aa88e2b9 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 25fc5f0842584e72455e4d60a61f035623b1aba0 +Subproject commit 80aa88e2b9afbb47d53ffbd1986b05d1baed387b From 42b36f280bddd867b7182125dedac03594767a56 Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Wed, 21 May 2025 15:35:53 +0100 Subject: [PATCH 02/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 80aa88e2b9..474589ef9f 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 80aa88e2b9afbb47d53ffbd1986b05d1baed387b +Subproject commit 474589ef9f505eecefa6a10fe7e7e6ee7aa2020b From 4ad607cdd2a4c772b98d2e8bf3459872d6c144bb Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Wed, 21 May 2025 17:52:57 +0100 Subject: [PATCH 03/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 474589ef9f..0e2aea9f8d 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 474589ef9f505eecefa6a10fe7e7e6ee7aa2020b +Subproject commit 0e2aea9f8dd73131b11233234e43a81850d12f08 From 7cfe45e6baab9d94f2a90bf512d208ad2abc3040 Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Mon, 26 May 2025 17:00:08 +0100 Subject: [PATCH 04/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 0e2aea9f8d..f083a27fb3 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 0e2aea9f8dd73131b11233234e43a81850d12f08 +Subproject commit f083a27fb3944a6dfd4f527faebadcbb97f5f2e0 From 5040b2595aa2d3ebfff19b14f8d6c56a692bd42c Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Tue, 27 May 2025 22:19:15 +0100 Subject: [PATCH 05/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index f083a27fb3..d98903bdea 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit f083a27fb3944a6dfd4f527faebadcbb97f5f2e0 +Subproject commit d98903bdea0cf6092b023afa309be540f448e0fb From 58c5ae3c9b23e1b3d1a24f1fe6d1d8d2032b94d9 Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Tue, 27 May 2025 22:19:35 +0100 Subject: [PATCH 06/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index d98903bdea..f083a27fb3 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit d98903bdea0cf6092b023afa309be540f448e0fb +Subproject commit f083a27fb3944a6dfd4f527faebadcbb97f5f2e0 From f969f344922c0423892359ffa39d27f8a5b1a33b Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Tue, 27 May 2025 23:01:34 +0100 Subject: [PATCH 07/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index f083a27fb3..97bc243200 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit f083a27fb3944a6dfd4f527faebadcbb97f5f2e0 +Subproject commit 97bc243200362399f0de2d896cff75e5bfe49139 From dfecbcb5252f5b811a21891e12c44445fbaa42bd Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Wed, 16 Jul 2025 15:12:11 +0100 Subject: [PATCH 08/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 97bc243200..85d6c9f273 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 97bc243200362399f0de2d896cff75e5bfe49139 +Subproject commit 85d6c9f27353ce6e407b5a7242d3070f45c05091 From b9aa841315ecb8643c97e5b58d1ea3690510a2b7 Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Thu, 17 Jul 2025 16:50:58 +0100 Subject: [PATCH 09/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 85d6c9f273..0c68e3e5e9 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 85d6c9f27353ce6e407b5a7242d3070f45c05091 +Subproject commit 0c68e3e5e9f0145b578ece56477aaadfb0be3851 From 987ef843c460ae0adf558a19cf1142110df48c2d Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Thu, 17 Jul 2025 16:57:25 +0100 Subject: [PATCH 10/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 0c68e3e5e9..37dd07f54d 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 0c68e3e5e9f0145b578ece56477aaadfb0be3851 +Subproject commit 37dd07f54d9139de4ba2ba910405a0668d086339 From 70a962ba800cc79bf251d70e18df9ae88697f181 Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Mon, 21 Jul 2025 20:35:36 +0100 Subject: [PATCH 11/12] update geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 37dd07f54d..040e20f63a 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 37dd07f54d9139de4ba2ba910405a0668d086339 +Subproject commit 040e20f63ae99430820393ff60cc906c0dc62543 From 3982085b46fa78ee222b559e52a9cb4f8f1870ba Mon Sep 17 00:00:00 2001 From: Maciej Kulawik Date: Wed, 23 Jul 2025 19:23:46 +0100 Subject: [PATCH 12/12] bump geth pin --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 040e20f63a..b8e83d20ed 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 040e20f63ae99430820393ff60cc906c0dc62543 +Subproject commit b8e83d20edc0ee075fa721f9e71376516df98366