@@ -29,6 +29,7 @@ n.VMManager.RegisterFactory(context.TODO(), constants.EVMID, &transitionvm.Facto
2929 PreFactory : &coreth.Factory {},
3030 PostFactory : &saevm.Factory {},
3131 TransitionTime : n.Config .UpgradeConfig .HeliconTime .Add (-10 * time.Second ),
32+ Now : time.Now ,
3233 APIDrainTimeout : 15 * time.Second ,
3334})
3435```
@@ -84,6 +85,50 @@ flowchart TD
8485 class E errCls;
8586```
8687
88+ ### Eager transition for state sync
89+
90+ The engine runs state sync once, at startup, against the active VM — but a
91+ node starting after the transition faces peers that serve only the
92+ post-transition VM's summaries. So a node transitions * eagerly* during
93+ initialization when the wall clock is past the transition time, the network is
94+ a production network (Mainnet or Fuji), the chain is still at the genesis, and
95+ the node intends to state sync. The marker is written before the sync runs, so
96+ the commitment is ** one-way** .
97+
98+ Only production networks get the eager path. The real requirement is that the
99+ network sequenced at least one commit interval of blocks after the
100+ transition, so peers have a post-transition summary to serve; production
101+ networks are known to satisfy it, while a custom network may transition right
102+ at its genesis and strand an eagerly-committed node.
103+
104+ The eager path requires of the VMs:
105+
106+ - The ** pre-transition VM reports during initialization whether the node will
107+ state sync** .
108+ - The ** post-transition VM state syncs a fresh database** whenever it can sync
109+ at all: a node at the genesis cannot execute a chain with a synchronous
110+ prefix. A node with accepted blocks is refused instead — it never
111+ transitions eagerly, and bootstrap-executes to the transition block. A
112+ summary at a pre-transition height is rejected once its fetched header
113+ proves it synchronous, before any state is written.
114+
115+ A committed node never falls back to executing pre-transition blocks, so it
116+ strands until a summary it accepts arrives — or forever:
117+
118+ - ** A wall-clock false positive** — a skewed clock, or a network that has not
119+ yet built the transition block — strands the node until the network
120+ transitions.
121+ - ** No post-transition commit boundary yet** : nothing to sync to; resolves
122+ itself.
123+ - ** State sync disabled after the marker is written** : the engine skips state
124+ sync entirely and falls into a bootstrap it cannot execute.
125+ - ** State schemes that cannot sync** (Firewood): every summary is declined,
126+ forever.
127+
128+ To recover, delete the chain database and restart. For never-syncable
129+ configurations, also disable state sync in the new configuration; on the
130+ already-marked node the flag no longer helps.
131+
87132### Swapping the VM underneath the node
88133
89134The consensus engine, network, and API server treat a chain's VM as one
0 commit comments