config: state sync is on

It was the zero value, so a chain got it only by carrying a per-chain config
file that said so — and most deployments have no chain-config path at all, which
made the one mechanism for rejoining after a deep gap unreachable on whole
fleets. There is no posture where refusing it and re-executing instead is the
right answer, so it is not a decision to hand an operator. The bound is
StateSyncMinBlocks, which lives inside the mechanism: a smaller gap replays and
never reaches this path.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-16 00:23:16 -07:00
co-authored by Hanzo Dev
parent 1bfeb1378b
commit 8308671775
+7
View File
@@ -347,6 +347,13 @@ func (c *Config) SetDefaults(txPoolConfig TxPoolConfig) {
c.LogJSONFormat = defaultLogJSONFormat
c.MaxOutboundActiveRequests = defaultMaxOutboundActiveRequests
c.PopulateMissingTriesParallelism = defaultPopulateMissingTriesParallelism
// State sync is on. It is how a node with a deep gap rejoins, and there is no
// posture in which the right answer is to refuse it and re-execute instead —
// so it is not a choice an operator has to make, or remember to write into a
// per-chain file that most deployments do not have at all. The bound is
// StateSyncMinBlocks, which is inside the mechanism: a gap smaller than that
// replays and never reaches this path.
c.StateSyncEnabled = true
c.StateSyncServerTrieCache = defaultStateSyncServerTrieCache
c.StateSyncCommitInterval = defaultSyncableCommitInterval
c.StateSyncMinBlocks = defaultStateSyncMinBlocks