From e4b741e99ccf7c5af2f7a51c05a4c712bf0eeba0 Mon Sep 17 00:00:00 2001 From: CPerezz <37264926+CPerezz@users.noreply.github.com> Date: Thu, 5 Mar 2026 15:44:03 +0100 Subject: [PATCH] fix(cmd): wire --bintrie.groupdepth flag to SetEthConfig (#571) The --bintrie.groupdepth CLI flag was defined and registered but never read by SetEthConfig(), which is the main config path for geth node startup. Only MakeChain() (used for import/export commands) read the flag. This caused geth to always use the default groupDepth=8 regardless of the CLI flag value. This resulted in a serialization format mismatch when state-actor generated databases with groupDepth != 8: state-actor wrote nodes with the requested groupDepth (e.g. 1), but geth always read/wrote them with groupDepth=8, causing "missing trie node" errors during block validation. The fix adds the flag read to SetEthConfig, matching the pattern used by all other trie configuration flags (StateHistory, TrienodeHistory, etc.). --- cmd/utils/flags.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index aef99b4360..7b75dc1e92 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -1817,6 +1817,9 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { if ctx.IsSet(TrienodeHistoryFullValueCheckpointFlag.Name) { cfg.TrienodeHistory = ctx.Int64(TrienodeHistoryFullValueCheckpointFlag.Name) } + if ctx.IsSet(BinTrieGroupDepthFlag.Name) { + cfg.BinTrieGroupDepth = ctx.Int(BinTrieGroupDepthFlag.Name) + } if ctx.IsSet(StateSchemeFlag.Name) { cfg.StateScheme = ctx.String(StateSchemeFlag.Name) }