Documentation
¶
Overview ¶
Package diffsync defines wire protocol together with client/server implementations for the diff sync protocol, used for runtime block sync.
Index ¶
Constants ¶
View Source
const ( MethodGetDiff = "GetDiff" MaxGetDiffResponseTime = 15 * time.Second )
Constants related to the GetDiff method.
View Source
const DiffSyncProtocolID = "diffsync"
DiffSyncProtocolID is a unique protocol identifier for the diff sync protocol.
Variables ¶
View Source
var DiffSyncProtocolVersion = version.Version{Major: 1, Minor: 0, Patch: 0}
DiffSyncProtocolVersion is the supported version of the diff sync protocol.
Functions ¶
func ProtocolID ¶
func ProtocolID(chainContext string, runtimeID common.Namespace) core.ProtocolID
ProtocolID returns the runtime diff sync protocol ID.
Types ¶
type Client ¶
type Client interface {
// GetDiff requests a write log of entries that must be applied to get from the first given root
// to the second one.
GetDiff(ctx context.Context, request *GetDiffRequest) (*GetDiffResponse, rpc.PeerFeedback, error)
}
Client is a diff sync protocol client.
type GetDiffRequest ¶
type GetDiffRequest struct {
StartRoot api.Root `json:"start_root"`
EndRoot api.Root `json:"end_root"`
}
GetDiffRequest is a GetDiff request.
type GetDiffResponse ¶
GetDiffResponse is a response to a GetDiff request.
Click to show internal directories.
Click to hide internal directories.