Documentation ¶
Index ¶
- Constants
- Variables
- func WriteExtensionItem(protoWriter protoio.Writer, item []byte) error
- type ExtensionSnapshotter
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)
- func (m *Metadata) GetChunkHashes() [][]byte
- func (m *Metadata) Marshal() (dAtA []byte, err error)
- func (m *Metadata) MarshalTo(dAtA []byte) (int, error)
- func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Metadata) ProtoMessage()
- func (m *Metadata) Reset()
- func (m *Metadata) Size() (n int)
- func (m *Metadata) String() string
- func (m *Metadata) Unmarshal(dAtA []byte) error
- func (m *Metadata) XXX_DiscardUnknown()
- func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Metadata) XXX_Merge(src proto.Message)
- func (m *Metadata) XXX_Size() int
- func (m *Metadata) XXX_Unmarshal(b []byte) error
- type Snapshot
- func (*Snapshot) Descriptor() ([]byte, []int)
- func (m *Snapshot) GetChunks() uint32
- func (m *Snapshot) GetFormat() uint32
- func (m *Snapshot) GetHash() []byte
- func (m *Snapshot) GetHeight() uint64
- func (m *Snapshot) GetMetadata() Metadata
- func (m *Snapshot) Marshal() (dAtA []byte, err error)
- func (m *Snapshot) MarshalTo(dAtA []byte) (int, error)
- func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Snapshot) ProtoMessage()
- func (m *Snapshot) Reset()
- func (m *Snapshot) Size() (n int)
- func (m *Snapshot) String() string
- func (s Snapshot) ToABCI() (abci.Snapshot, error)
- func (m *Snapshot) Unmarshal(dAtA []byte) error
- func (m *Snapshot) XXX_DiscardUnknown()
- func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Snapshot) XXX_Merge(src proto.Message)
- func (m *Snapshot) XXX_Size() int
- func (m *Snapshot) XXX_Unmarshal(b []byte) error
- type SnapshotExtensionMeta
- func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int)
- func (m *SnapshotExtensionMeta) GetFormat() uint32
- func (m *SnapshotExtensionMeta) GetName() string
- func (m *SnapshotExtensionMeta) Marshal() (dAtA []byte, err error)
- func (m *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotExtensionMeta) ProtoMessage()
- func (m *SnapshotExtensionMeta) Reset()
- func (m *SnapshotExtensionMeta) Size() (n int)
- func (m *SnapshotExtensionMeta) String() string
- func (m *SnapshotExtensionMeta) Unmarshal(dAtA []byte) error
- func (m *SnapshotExtensionMeta) XXX_DiscardUnknown()
- func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotExtensionMeta) XXX_Merge(src proto.Message)
- func (m *SnapshotExtensionMeta) XXX_Size() int
- func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error
- type SnapshotExtensionPayload
- func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int)
- func (m *SnapshotExtensionPayload) GetPayload() []byte
- func (m *SnapshotExtensionPayload) Marshal() (dAtA []byte, err error)
- func (m *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotExtensionPayload) ProtoMessage()
- func (m *SnapshotExtensionPayload) Reset()
- func (m *SnapshotExtensionPayload) Size() (n int)
- func (m *SnapshotExtensionPayload) String() string
- func (m *SnapshotExtensionPayload) Unmarshal(dAtA []byte) error
- func (m *SnapshotExtensionPayload) XXX_DiscardUnknown()
- func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotExtensionPayload) XXX_Merge(src proto.Message)
- func (m *SnapshotExtensionPayload) XXX_Size() int
- func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error
- type SnapshotIAVLItem
- func (*SnapshotIAVLItem) Descriptor() ([]byte, []int)
- func (m *SnapshotIAVLItem) GetHeight() int32
- func (m *SnapshotIAVLItem) GetKey() []byte
- func (m *SnapshotIAVLItem) GetValue() []byte
- func (m *SnapshotIAVLItem) GetVersion() int64
- func (m *SnapshotIAVLItem) Marshal() (dAtA []byte, err error)
- func (m *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotIAVLItem) ProtoMessage()
- func (m *SnapshotIAVLItem) Reset()
- func (m *SnapshotIAVLItem) Size() (n int)
- func (m *SnapshotIAVLItem) String() string
- func (m *SnapshotIAVLItem) Unmarshal(dAtA []byte) error
- func (m *SnapshotIAVLItem) XXX_DiscardUnknown()
- func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotIAVLItem) XXX_Merge(src proto.Message)
- func (m *SnapshotIAVLItem) XXX_Size() int
- func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error
- type SnapshotItem
- func (*SnapshotItem) Descriptor() ([]byte, []int)
- func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta
- func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload
- func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem
- func (m *SnapshotItem) GetItem() isSnapshotItem_Item
- func (m *SnapshotItem) GetKV() *SnapshotKVItem
- func (m *SnapshotItem) GetSchema() *SnapshotSchema
- func (m *SnapshotItem) GetStore() *SnapshotStoreItem
- func (m *SnapshotItem) Marshal() (dAtA []byte, err error)
- func (m *SnapshotItem) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotItem) ProtoMessage()
- func (m *SnapshotItem) Reset()
- func (m *SnapshotItem) Size() (n int)
- func (m *SnapshotItem) String() string
- func (m *SnapshotItem) Unmarshal(dAtA []byte) error
- func (m *SnapshotItem) XXX_DiscardUnknown()
- func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotItem) XXX_Merge(src proto.Message)
- func (*SnapshotItem) XXX_OneofWrappers() []interface{}
- func (m *SnapshotItem) XXX_Size() int
- func (m *SnapshotItem) XXX_Unmarshal(b []byte) error
- type SnapshotItem_Extension
- type SnapshotItem_ExtensionPayload
- type SnapshotItem_IAVL
- type SnapshotItem_KV
- type SnapshotItem_Schema
- type SnapshotItem_Store
- type SnapshotKVItem
- func (*SnapshotKVItem) Descriptor() ([]byte, []int)
- func (m *SnapshotKVItem) GetKey() []byte
- func (m *SnapshotKVItem) GetValue() []byte
- func (m *SnapshotKVItem) Marshal() (dAtA []byte, err error)
- func (m *SnapshotKVItem) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotKVItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotKVItem) ProtoMessage()
- func (m *SnapshotKVItem) Reset()
- func (m *SnapshotKVItem) Size() (n int)
- func (m *SnapshotKVItem) String() string
- func (m *SnapshotKVItem) Unmarshal(dAtA []byte) error
- func (m *SnapshotKVItem) XXX_DiscardUnknown()
- func (m *SnapshotKVItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotKVItem) XXX_Merge(src proto.Message)
- func (m *SnapshotKVItem) XXX_Size() int
- func (m *SnapshotKVItem) XXX_Unmarshal(b []byte) error
- type SnapshotOptions
- type SnapshotSchema
- func (*SnapshotSchema) Descriptor() ([]byte, []int)
- func (m *SnapshotSchema) GetKeys() [][]byte
- func (m *SnapshotSchema) Marshal() (dAtA []byte, err error)
- func (m *SnapshotSchema) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotSchema) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotSchema) ProtoMessage()
- func (m *SnapshotSchema) Reset()
- func (m *SnapshotSchema) Size() (n int)
- func (m *SnapshotSchema) String() string
- func (m *SnapshotSchema) Unmarshal(dAtA []byte) error
- func (m *SnapshotSchema) XXX_DiscardUnknown()
- func (m *SnapshotSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotSchema) XXX_Merge(src proto.Message)
- func (m *SnapshotSchema) XXX_Size() int
- func (m *SnapshotSchema) XXX_Unmarshal(b []byte) error
- type SnapshotStoreItem
- func (*SnapshotStoreItem) Descriptor() ([]byte, []int)
- func (m *SnapshotStoreItem) GetName() string
- func (m *SnapshotStoreItem) Marshal() (dAtA []byte, err error)
- func (m *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error)
- func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SnapshotStoreItem) ProtoMessage()
- func (m *SnapshotStoreItem) Reset()
- func (m *SnapshotStoreItem) Size() (n int)
- func (m *SnapshotStoreItem) String() string
- func (m *SnapshotStoreItem) Unmarshal(dAtA []byte) error
- func (m *SnapshotStoreItem) XXX_DiscardUnknown()
- func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SnapshotStoreItem) XXX_Merge(src proto.Message)
- func (m *SnapshotStoreItem) XXX_Size() int
- func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error
- type Snapshotter
Constants ¶
const CurrentFormat uint32 = 2
CurrentFormat is the currently used format for snapshots. Snapshots using the same format must be identical across all nodes for a given height, so this must be bumped when the binary snapshot output changes.
Variables ¶
var ( // ErrUnknownFormat is returned when an unknown format is used. ErrUnknownFormat = errors.New("unknown snapshot format") // ErrChunkHashMismatch is returned when chunk hash verification failed. ErrChunkHashMismatch = errors.New("chunk hash verification failed") // ErrInvalidMetadata is returned when the snapshot metadata is invalid. ErrInvalidMetadata = errors.New("invalid snapshot metadata") // ErrInvalidSnapshotVersion is returned when the snapshot version is invalid ErrInvalidSnapshotVersion = errors.New("invalid snapshot version") )
Functions ¶
Types ¶
type ExtensionSnapshotter ¶ added in v0.45.2
type ExtensionSnapshotter interface { Snapshotter // SnapshotName returns the name of snapshotter, it should be unique in the manager. SnapshotName() string // SnapshotFormat returns the default format the extension snapshotter use to encode the // payloads when taking a snapshot. // It's defined within the extension, different from the global format for the whole state-sync snapshot. SnapshotFormat() uint32 // SupportedFormats returns a list of formats it can restore from. SupportedFormats() []uint32 }
ExtensionSnapshotter is an extension Snapshotter that is appended to the snapshot stream. ExtensionSnapshotter has an unique name and manages it's own internal formats.
type Metadata ¶
type Metadata struct {
ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"`
}
Metadata contains SDK-specific snapshot metadata.
func (*Metadata) Descriptor ¶
func (*Metadata) GetChunkHashes ¶
func (*Metadata) MarshalToSizedBuffer ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) XXX_DiscardUnknown ¶
func (m *Metadata) XXX_DiscardUnknown()
func (*Metadata) XXX_Marshal ¶
func (*Metadata) XXX_Unmarshal ¶
type Snapshot ¶
type Snapshot struct { Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` }
Snapshot contains Tendermint state sync snapshot info.
func SnapshotFromABCI ¶
Converts an ABCI snapshot to a snapshot. Mainly to decode the SDK metadata.
func (*Snapshot) Descriptor ¶
func (*Snapshot) GetMetadata ¶
func (*Snapshot) MarshalToSizedBuffer ¶
func (*Snapshot) ProtoMessage ¶
func (*Snapshot) ProtoMessage()
func (Snapshot) ToABCI ¶
Converts a Snapshot to its ABCI representation. Mainly to encode the SDK metadata.
func (*Snapshot) XXX_DiscardUnknown ¶
func (m *Snapshot) XXX_DiscardUnknown()
func (*Snapshot) XXX_Marshal ¶
func (*Snapshot) XXX_Unmarshal ¶
type SnapshotExtensionMeta ¶ added in v0.45.2
type SnapshotExtensionMeta struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` }
SnapshotExtensionMeta contains metadata about an external snapshotter.
Since: cosmos-sdk 0.46
func (*SnapshotExtensionMeta) Descriptor ¶ added in v0.45.2
func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int)
func (*SnapshotExtensionMeta) GetFormat ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) GetFormat() uint32
func (*SnapshotExtensionMeta) GetName ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) GetName() string
func (*SnapshotExtensionMeta) Marshal ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) Marshal() (dAtA []byte, err error)
func (*SnapshotExtensionMeta) MarshalTo ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotExtensionMeta) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotExtensionMeta) ProtoMessage ¶ added in v0.45.2
func (*SnapshotExtensionMeta) ProtoMessage()
func (*SnapshotExtensionMeta) Reset ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) Reset()
func (*SnapshotExtensionMeta) Size ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) Size() (n int)
func (*SnapshotExtensionMeta) String ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) String() string
func (*SnapshotExtensionMeta) Unmarshal ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) Unmarshal(dAtA []byte) error
func (*SnapshotExtensionMeta) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) XXX_DiscardUnknown()
func (*SnapshotExtensionMeta) XXX_Marshal ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotExtensionMeta) XXX_Merge ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) XXX_Merge(src proto.Message)
func (*SnapshotExtensionMeta) XXX_Size ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) XXX_Size() int
func (*SnapshotExtensionMeta) XXX_Unmarshal ¶ added in v0.45.2
func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error
type SnapshotExtensionPayload ¶ added in v0.45.2
type SnapshotExtensionPayload struct {
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
}
SnapshotExtensionPayload contains payloads of an external snapshotter.
Since: cosmos-sdk 0.46
func (*SnapshotExtensionPayload) Descriptor ¶ added in v0.45.2
func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int)
func (*SnapshotExtensionPayload) GetPayload ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) GetPayload() []byte
func (*SnapshotExtensionPayload) Marshal ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) Marshal() (dAtA []byte, err error)
func (*SnapshotExtensionPayload) MarshalTo ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotExtensionPayload) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotExtensionPayload) ProtoMessage ¶ added in v0.45.2
func (*SnapshotExtensionPayload) ProtoMessage()
func (*SnapshotExtensionPayload) Reset ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) Reset()
func (*SnapshotExtensionPayload) Size ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) Size() (n int)
func (*SnapshotExtensionPayload) String ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) String() string
func (*SnapshotExtensionPayload) Unmarshal ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) Unmarshal(dAtA []byte) error
func (*SnapshotExtensionPayload) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) XXX_DiscardUnknown()
func (*SnapshotExtensionPayload) XXX_Marshal ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotExtensionPayload) XXX_Merge ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) XXX_Merge(src proto.Message)
func (*SnapshotExtensionPayload) XXX_Size ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) XXX_Size() int
func (*SnapshotExtensionPayload) XXX_Unmarshal ¶ added in v0.45.2
func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error
type SnapshotIAVLItem ¶ added in v0.45.2
type SnapshotIAVLItem struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // version is block height Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` // height is depth of the tree. Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` }
SnapshotIAVLItem is an exported IAVL node.
Since: cosmos-sdk 0.46
func (*SnapshotIAVLItem) Descriptor ¶ added in v0.45.2
func (*SnapshotIAVLItem) Descriptor() ([]byte, []int)
func (*SnapshotIAVLItem) GetHeight ¶ added in v0.45.2
func (m *SnapshotIAVLItem) GetHeight() int32
func (*SnapshotIAVLItem) GetKey ¶ added in v0.45.2
func (m *SnapshotIAVLItem) GetKey() []byte
func (*SnapshotIAVLItem) GetValue ¶ added in v0.45.2
func (m *SnapshotIAVLItem) GetValue() []byte
func (*SnapshotIAVLItem) GetVersion ¶ added in v0.45.2
func (m *SnapshotIAVLItem) GetVersion() int64
func (*SnapshotIAVLItem) Marshal ¶ added in v0.45.2
func (m *SnapshotIAVLItem) Marshal() (dAtA []byte, err error)
func (*SnapshotIAVLItem) MarshalTo ¶ added in v0.45.2
func (m *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotIAVLItem) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotIAVLItem) ProtoMessage ¶ added in v0.45.2
func (*SnapshotIAVLItem) ProtoMessage()
func (*SnapshotIAVLItem) Reset ¶ added in v0.45.2
func (m *SnapshotIAVLItem) Reset()
func (*SnapshotIAVLItem) Size ¶ added in v0.45.2
func (m *SnapshotIAVLItem) Size() (n int)
func (*SnapshotIAVLItem) String ¶ added in v0.45.2
func (m *SnapshotIAVLItem) String() string
func (*SnapshotIAVLItem) Unmarshal ¶ added in v0.45.2
func (m *SnapshotIAVLItem) Unmarshal(dAtA []byte) error
func (*SnapshotIAVLItem) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *SnapshotIAVLItem) XXX_DiscardUnknown()
func (*SnapshotIAVLItem) XXX_Marshal ¶ added in v0.45.2
func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotIAVLItem) XXX_Merge ¶ added in v0.45.2
func (m *SnapshotIAVLItem) XXX_Merge(src proto.Message)
func (*SnapshotIAVLItem) XXX_Size ¶ added in v0.45.2
func (m *SnapshotIAVLItem) XXX_Size() int
func (*SnapshotIAVLItem) XXX_Unmarshal ¶ added in v0.45.2
func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error
type SnapshotItem ¶ added in v0.45.2
type SnapshotItem struct { // item is the specific type of snapshot item. // // Types that are valid to be assigned to Item: // *SnapshotItem_Store // *SnapshotItem_IAVL // *SnapshotItem_Extension // *SnapshotItem_ExtensionPayload // *SnapshotItem_KV // *SnapshotItem_Schema Item isSnapshotItem_Item `protobuf_oneof:"item"` }
SnapshotItem is an item contained in a rootmulti.Store snapshot.
Since: cosmos-sdk 0.46
func (*SnapshotItem) Descriptor ¶ added in v0.45.2
func (*SnapshotItem) Descriptor() ([]byte, []int)
func (*SnapshotItem) GetExtension ¶ added in v0.45.2
func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta
func (*SnapshotItem) GetExtensionPayload ¶ added in v0.45.2
func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload
func (*SnapshotItem) GetIAVL ¶ added in v0.45.2
func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem
func (*SnapshotItem) GetItem ¶ added in v0.45.2
func (m *SnapshotItem) GetItem() isSnapshotItem_Item
func (*SnapshotItem) GetKV ¶ added in v0.46.0
func (m *SnapshotItem) GetKV() *SnapshotKVItem
func (*SnapshotItem) GetSchema ¶ added in v0.46.0
func (m *SnapshotItem) GetSchema() *SnapshotSchema
func (*SnapshotItem) GetStore ¶ added in v0.45.2
func (m *SnapshotItem) GetStore() *SnapshotStoreItem
func (*SnapshotItem) Marshal ¶ added in v0.45.2
func (m *SnapshotItem) Marshal() (dAtA []byte, err error)
func (*SnapshotItem) MarshalTo ¶ added in v0.45.2
func (m *SnapshotItem) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem) ProtoMessage ¶ added in v0.45.2
func (*SnapshotItem) ProtoMessage()
func (*SnapshotItem) Reset ¶ added in v0.45.2
func (m *SnapshotItem) Reset()
func (*SnapshotItem) Size ¶ added in v0.45.2
func (m *SnapshotItem) Size() (n int)
func (*SnapshotItem) String ¶ added in v0.45.2
func (m *SnapshotItem) String() string
func (*SnapshotItem) Unmarshal ¶ added in v0.45.2
func (m *SnapshotItem) Unmarshal(dAtA []byte) error
func (*SnapshotItem) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *SnapshotItem) XXX_DiscardUnknown()
func (*SnapshotItem) XXX_Marshal ¶ added in v0.45.2
func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotItem) XXX_Merge ¶ added in v0.45.2
func (m *SnapshotItem) XXX_Merge(src proto.Message)
func (*SnapshotItem) XXX_OneofWrappers ¶ added in v0.45.2
func (*SnapshotItem) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*SnapshotItem) XXX_Size ¶ added in v0.45.2
func (m *SnapshotItem) XXX_Size() int
func (*SnapshotItem) XXX_Unmarshal ¶ added in v0.45.2
func (m *SnapshotItem) XXX_Unmarshal(b []byte) error
type SnapshotItem_Extension ¶ added in v0.45.2
type SnapshotItem_Extension struct {
Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"`
}
func (*SnapshotItem_Extension) MarshalTo ¶ added in v0.45.2
func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_Extension) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_Extension) Size ¶ added in v0.45.2
func (m *SnapshotItem_Extension) Size() (n int)
type SnapshotItem_ExtensionPayload ¶ added in v0.45.2
type SnapshotItem_ExtensionPayload struct {
ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"`
}
func (*SnapshotItem_ExtensionPayload) MarshalTo ¶ added in v0.45.2
func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_ExtensionPayload) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_ExtensionPayload) Size ¶ added in v0.45.2
func (m *SnapshotItem_ExtensionPayload) Size() (n int)
type SnapshotItem_IAVL ¶ added in v0.45.2
type SnapshotItem_IAVL struct {
IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"`
}
func (*SnapshotItem_IAVL) MarshalTo ¶ added in v0.45.2
func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_IAVL) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_IAVL) Size ¶ added in v0.45.2
func (m *SnapshotItem_IAVL) Size() (n int)
type SnapshotItem_KV ¶ added in v0.46.0
type SnapshotItem_KV struct {
KV *SnapshotKVItem `protobuf:"bytes,5,opt,name=kv,proto3,oneof" json:"kv,omitempty"`
}
func (*SnapshotItem_KV) MarshalTo ¶ added in v0.46.0
func (m *SnapshotItem_KV) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_KV) MarshalToSizedBuffer ¶ added in v0.46.0
func (m *SnapshotItem_KV) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_KV) Size ¶ added in v0.46.0
func (m *SnapshotItem_KV) Size() (n int)
type SnapshotItem_Schema ¶ added in v0.46.0
type SnapshotItem_Schema struct {
Schema *SnapshotSchema `protobuf:"bytes,6,opt,name=schema,proto3,oneof" json:"schema,omitempty"`
}
func (*SnapshotItem_Schema) MarshalTo ¶ added in v0.46.0
func (m *SnapshotItem_Schema) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_Schema) MarshalToSizedBuffer ¶ added in v0.46.0
func (m *SnapshotItem_Schema) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_Schema) Size ¶ added in v0.46.0
func (m *SnapshotItem_Schema) Size() (n int)
type SnapshotItem_Store ¶ added in v0.45.2
type SnapshotItem_Store struct {
Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"`
}
func (*SnapshotItem_Store) MarshalTo ¶ added in v0.45.2
func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotItem_Store) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotItem_Store) Size ¶ added in v0.45.2
func (m *SnapshotItem_Store) Size() (n int)
type SnapshotKVItem ¶ added in v0.46.0
type SnapshotKVItem struct { Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` }
SnapshotKVItem is an exported Key/Value Pair
Since: cosmos-sdk 0.46
func (*SnapshotKVItem) Descriptor ¶ added in v0.46.0
func (*SnapshotKVItem) Descriptor() ([]byte, []int)
func (*SnapshotKVItem) GetKey ¶ added in v0.46.0
func (m *SnapshotKVItem) GetKey() []byte
func (*SnapshotKVItem) GetValue ¶ added in v0.46.0
func (m *SnapshotKVItem) GetValue() []byte
func (*SnapshotKVItem) Marshal ¶ added in v0.46.0
func (m *SnapshotKVItem) Marshal() (dAtA []byte, err error)
func (*SnapshotKVItem) MarshalTo ¶ added in v0.46.0
func (m *SnapshotKVItem) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotKVItem) MarshalToSizedBuffer ¶ added in v0.46.0
func (m *SnapshotKVItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotKVItem) ProtoMessage ¶ added in v0.46.0
func (*SnapshotKVItem) ProtoMessage()
func (*SnapshotKVItem) Reset ¶ added in v0.46.0
func (m *SnapshotKVItem) Reset()
func (*SnapshotKVItem) Size ¶ added in v0.46.0
func (m *SnapshotKVItem) Size() (n int)
func (*SnapshotKVItem) String ¶ added in v0.46.0
func (m *SnapshotKVItem) String() string
func (*SnapshotKVItem) Unmarshal ¶ added in v0.46.0
func (m *SnapshotKVItem) Unmarshal(dAtA []byte) error
func (*SnapshotKVItem) XXX_DiscardUnknown ¶ added in v0.46.0
func (m *SnapshotKVItem) XXX_DiscardUnknown()
func (*SnapshotKVItem) XXX_Marshal ¶ added in v0.46.0
func (m *SnapshotKVItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotKVItem) XXX_Merge ¶ added in v0.46.0
func (m *SnapshotKVItem) XXX_Merge(src proto.Message)
func (*SnapshotKVItem) XXX_Size ¶ added in v0.46.0
func (m *SnapshotKVItem) XXX_Size() int
func (*SnapshotKVItem) XXX_Unmarshal ¶ added in v0.46.0
func (m *SnapshotKVItem) XXX_Unmarshal(b []byte) error
type SnapshotOptions ¶ added in v0.46.0
type SnapshotOptions struct { // Interval defines at which heights the snapshot is taken. Interval uint64 // KeepRecent defines how many snapshots to keep in heights. KeepRecent uint32 }
SnapshotOptions defines the snapshot strategy used when determining which heights are snapshotted for state sync.
func NewSnapshotOptions ¶ added in v0.46.0
func NewSnapshotOptions(interval uint64, keepRecent uint32) SnapshotOptions
type SnapshotSchema ¶ added in v0.46.0
type SnapshotSchema struct {
Keys [][]byte `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
}
SnapshotSchema is an exported schema of smt store
Since: cosmos-sdk 0.46
func (*SnapshotSchema) Descriptor ¶ added in v0.46.0
func (*SnapshotSchema) Descriptor() ([]byte, []int)
func (*SnapshotSchema) GetKeys ¶ added in v0.46.0
func (m *SnapshotSchema) GetKeys() [][]byte
func (*SnapshotSchema) Marshal ¶ added in v0.46.0
func (m *SnapshotSchema) Marshal() (dAtA []byte, err error)
func (*SnapshotSchema) MarshalTo ¶ added in v0.46.0
func (m *SnapshotSchema) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotSchema) MarshalToSizedBuffer ¶ added in v0.46.0
func (m *SnapshotSchema) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotSchema) ProtoMessage ¶ added in v0.46.0
func (*SnapshotSchema) ProtoMessage()
func (*SnapshotSchema) Reset ¶ added in v0.46.0
func (m *SnapshotSchema) Reset()
func (*SnapshotSchema) Size ¶ added in v0.46.0
func (m *SnapshotSchema) Size() (n int)
func (*SnapshotSchema) String ¶ added in v0.46.0
func (m *SnapshotSchema) String() string
func (*SnapshotSchema) Unmarshal ¶ added in v0.46.0
func (m *SnapshotSchema) Unmarshal(dAtA []byte) error
func (*SnapshotSchema) XXX_DiscardUnknown ¶ added in v0.46.0
func (m *SnapshotSchema) XXX_DiscardUnknown()
func (*SnapshotSchema) XXX_Marshal ¶ added in v0.46.0
func (m *SnapshotSchema) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotSchema) XXX_Merge ¶ added in v0.46.0
func (m *SnapshotSchema) XXX_Merge(src proto.Message)
func (*SnapshotSchema) XXX_Size ¶ added in v0.46.0
func (m *SnapshotSchema) XXX_Size() int
func (*SnapshotSchema) XXX_Unmarshal ¶ added in v0.46.0
func (m *SnapshotSchema) XXX_Unmarshal(b []byte) error
type SnapshotStoreItem ¶ added in v0.45.2
type SnapshotStoreItem struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
SnapshotStoreItem contains metadata about a snapshotted store.
Since: cosmos-sdk 0.46
func (*SnapshotStoreItem) Descriptor ¶ added in v0.45.2
func (*SnapshotStoreItem) Descriptor() ([]byte, []int)
func (*SnapshotStoreItem) GetName ¶ added in v0.45.2
func (m *SnapshotStoreItem) GetName() string
func (*SnapshotStoreItem) Marshal ¶ added in v0.45.2
func (m *SnapshotStoreItem) Marshal() (dAtA []byte, err error)
func (*SnapshotStoreItem) MarshalTo ¶ added in v0.45.2
func (m *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error)
func (*SnapshotStoreItem) MarshalToSizedBuffer ¶ added in v0.45.2
func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SnapshotStoreItem) ProtoMessage ¶ added in v0.45.2
func (*SnapshotStoreItem) ProtoMessage()
func (*SnapshotStoreItem) Reset ¶ added in v0.45.2
func (m *SnapshotStoreItem) Reset()
func (*SnapshotStoreItem) Size ¶ added in v0.45.2
func (m *SnapshotStoreItem) Size() (n int)
func (*SnapshotStoreItem) String ¶ added in v0.45.2
func (m *SnapshotStoreItem) String() string
func (*SnapshotStoreItem) Unmarshal ¶ added in v0.45.2
func (m *SnapshotStoreItem) Unmarshal(dAtA []byte) error
func (*SnapshotStoreItem) XXX_DiscardUnknown ¶ added in v0.45.2
func (m *SnapshotStoreItem) XXX_DiscardUnknown()
func (*SnapshotStoreItem) XXX_Marshal ¶ added in v0.45.2
func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SnapshotStoreItem) XXX_Merge ¶ added in v0.45.2
func (m *SnapshotStoreItem) XXX_Merge(src proto.Message)
func (*SnapshotStoreItem) XXX_Size ¶ added in v0.45.2
func (m *SnapshotStoreItem) XXX_Size() int
func (*SnapshotStoreItem) XXX_Unmarshal ¶ added in v0.45.2
func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error
type Snapshotter ¶
type Snapshotter interface { // Snapshot writes snapshot items into the protobuf writer. Snapshot(height uint64, protoWriter protoio.Writer) error // PruneSnapshotHeight prunes the given height according to the prune strategy. // If PruneNothing, this is a no-op. // If other strategy, this height is persisted until it is // less than <current height> - KeepRecent and <current height> % Interval == 0 PruneSnapshotHeight(height int64) // SetSnapshotInterval sets the interval at which the snapshots are taken. // It is used by the store that implements the Snapshotter interface // to determine which heights to retain until after the snapshot is complete. SetSnapshotInterval(snapshotInterval uint64) // Restore restores a state snapshot, taking snapshot chunk readers as input. // If the ready channel is non-nil, it returns a ready signal (by being closed) once the // restorer is ready to accept chunks. Restore(height uint64, format uint32, protoReader protoio.Reader) (SnapshotItem, error) }
Snapshotter is something that can create and restore snapshots, consisting of streamed binary chunks - all of which must be read from the channel and closed. If an unsupported format is given, it must return ErrUnknownFormat (possibly wrapped with fmt.Errorf).