2022-01-08 01:59:34 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package cosmos.base.snapshots.v1beta1;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
|
|
|
|
option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types";
|
|
|
|
|
|
|
|
// Snapshot contains Tendermint state sync snapshot info.
|
|
|
|
message Snapshot {
|
|
|
|
uint64 height = 1;
|
|
|
|
uint32 format = 2;
|
|
|
|
uint32 chunks = 3;
|
|
|
|
bytes hash = 4;
|
|
|
|
Metadata metadata = 5 [(gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
// Metadata contains SDK-specific snapshot metadata.
|
|
|
|
message Metadata {
|
|
|
|
repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes
|
2022-10-24 18:06:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotItem is an item contained in a rootmulti.Store snapshot.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message SnapshotItem {
|
|
|
|
// item is the specific type of snapshot item.
|
|
|
|
oneof item {
|
|
|
|
SnapshotStoreItem store = 1;
|
|
|
|
SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"];
|
|
|
|
SnapshotExtensionMeta extension = 3;
|
|
|
|
SnapshotExtensionPayload extension_payload = 4;
|
2023-04-04 00:08:45 +00:00
|
|
|
SnapshotKVItem kv = 5 [(gogoproto.customname) = "KV"];
|
|
|
|
SnapshotSchema schema = 6;
|
2022-10-24 18:06:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotStoreItem contains metadata about a snapshotted store.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message SnapshotStoreItem {
|
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotIAVLItem is an exported IAVL node.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message SnapshotIAVLItem {
|
|
|
|
bytes key = 1;
|
|
|
|
bytes value = 2;
|
|
|
|
// version is block height
|
|
|
|
int64 version = 3;
|
|
|
|
// height is depth of the tree.
|
|
|
|
int32 height = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotExtensionMeta contains metadata about an external snapshotter.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message SnapshotExtensionMeta {
|
|
|
|
string name = 1;
|
|
|
|
uint32 format = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotExtensionPayload contains payloads of an external snapshotter.
|
2023-04-04 00:08:45 +00:00
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
2022-10-24 18:06:39 +00:00
|
|
|
message SnapshotExtensionPayload {
|
|
|
|
bytes payload = 1;
|
|
|
|
}
|
2023-04-04 00:08:45 +00:00
|
|
|
|
|
|
|
// SnapshotKVItem is an exported Key/Value Pair
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message SnapshotKVItem {
|
|
|
|
bytes key = 1;
|
|
|
|
bytes value = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
// SnapshotSchema is an exported schema of smt store
|
|
|
|
//
|
|
|
|
// Since: cosmos-sdk 0.46
|
|
|
|
message SnapshotSchema {
|
|
|
|
repeated bytes keys = 1;
|
|
|
|
}
|