Summary
Adds the generic, reusable shell that per-RPC EVM sync handlers plug into. Relates to #5376.
Structure Outline
Handler[Req, Resp]: typed p2p.Handler that owns proto
marshal/unmarshal once and delegates per-RPC work to a Responder.
Responder[Req, Resp]: the per-RPC contract. Return semantics:
(resp, nil) deliver resp to the peer
(zero, nil) drop (application-level reject)
(zero, err) server bug, surfaces as p2p.ErrUnexpected
ProtoMessage: proto.Message + comparable, so a responder can
return the zero value to signal "drop".
Summary
Adds the generic, reusable shell that per-RPC EVM sync handlers plug into. Relates to #5376.
Structure Outline
Handler[Req, Resp]: typedp2p.Handlerthat owns protomarshal/unmarshal once and delegates per-RPC work to a
Responder.Responder[Req, Resp]: the per-RPC contract. Return semantics:(resp, nil)deliverrespto the peer(zero, nil)drop (application-level reject)(zero, err)server bug, surfaces asp2p.ErrUnexpectedProtoMessage:proto.Message + comparable, so a responder canreturn the zero value to signal "drop".