router: reserve the state-sync op-space (frontier round + App transport)

Appends seven ops above the existing op-space — GetStateSummaryFrontier,
StateSummaryFrontier, GetAcceptedStateSummary, AcceptedStateSummary, and the
AppRequest/AppResponse/AppError EVM fetch transport — so a node can route the
messages a pruned peer needs to re-fetch state instead of dropping them at the
chain router. Additive: every pre-existing wire value is unchanged. This is the
routing layer for state sync; the handler methods and sync-client driver that
consume these ops land on top.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-15 08:17:08 -07:00
co-authored by Hanzo Dev
parent 84029964f0
commit cdd2656fb4
2 changed files with 24 additions and 0 deletions
+15
View File
@@ -51,6 +51,21 @@ const (
// Gossip method. Its wire value is fixed; append any new op ABOVE NumOps.
Gossip
// State-sync op-space. A node that pruned the ancestor state it needs re-fetches
// it from peers instead of stranding (the ErrPrunedAncestor / "side chain
// insertion" restart wedge). The four summary ops carry the frontier round — a
// behind node discovers a committed state summary and its α-weight; the three App
// ops are the EVM's own request/response transport for trie-leaf and code fetches,
// which the state-sync client rides to download the state under that summary.
// Appended ABOVE the pre-existing ops, so every wire value below is unchanged.
GetStateSummaryFrontier
StateSummaryFrontier
GetAcceptedStateSummary
AcceptedStateSummary
AppRequest
AppResponse
AppError
// NumOps is the count of router ops and the single source of truth for the
// op-space size. It is not a wire op — it is one past the last op. Node-side
// routing (node message.ToConsensusOp) is asserted to be a bijection onto
+9
View File
@@ -47,4 +47,13 @@ const (
GetContext = router.GetContext
Context = router.Context
Gossip = router.Gossip
// State-sync ops (frontier round + EVM App transport) — see core/router.
GetStateSummaryFrontier = router.GetStateSummaryFrontier
StateSummaryFrontier = router.StateSummaryFrontier
GetAcceptedStateSummary = router.GetAcceptedStateSummary
AcceptedStateSummary = router.AcceptedStateSummary
AppRequest = router.AppRequest
AppResponse = router.AppResponse
AppError = router.AppError
)