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.).
This commit is contained in:
CPerezz 2026-03-05 15:44:03 +01:00 committed by Guillaume Ballet
parent 9c1bb17859
commit e4b741e99c

View file

@ -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)
}