diff --git a/proto/pb/vm/vm.pb.go b/proto/pb/vm/vm.pb.go index 0e6618ab789..356f34d061a 100644 --- a/proto/pb/vm/vm.pb.go +++ b/proto/pb/vm/vm.pb.go @@ -134,8 +134,7 @@ const ( Error_ERROR_UNSPECIFIED Error = 0 Error_ERROR_CLOSED Error = 1 Error_ERROR_NOT_FOUND Error = 2 - Error_ERROR_HEIGHT_INDEX_INCOMPLETE Error = 3 - Error_ERROR_STATE_SYNC_NOT_IMPLEMENTED Error = 4 + Error_ERROR_STATE_SYNC_NOT_IMPLEMENTED Error = 3 ) // Enum value maps for Error. @@ -144,15 +143,13 @@ var ( 0: "ERROR_UNSPECIFIED", 1: "ERROR_CLOSED", 2: "ERROR_NOT_FOUND", - 3: "ERROR_HEIGHT_INDEX_INCOMPLETE", - 4: "ERROR_STATE_SYNC_NOT_IMPLEMENTED", + 3: "ERROR_STATE_SYNC_NOT_IMPLEMENTED", } Error_value = map[string]int32{ "ERROR_UNSPECIFIED": 0, "ERROR_CLOSED": 1, "ERROR_NOT_FOUND": 2, - "ERROR_HEIGHT_INDEX_INCOMPLETE": 3, - "ERROR_STATE_SYNC_NOT_IMPLEMENTED": 4, + "ERROR_STATE_SYNC_NOT_IMPLEMENTED": 3, } ) @@ -232,7 +229,7 @@ func (x StateSummaryAcceptResponse_Mode) Number() protoreflect.EnumNumber { // Deprecated: Use StateSummaryAcceptResponse_Mode.Descriptor instead. func (StateSummaryAcceptResponse_Mode) EnumDescriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{44, 0} + return file_vm_vm_proto_rawDescGZIP(), []int{43, 0} } type InitializeRequest struct { @@ -2280,53 +2277,6 @@ func (x *BatchedParseBlockResponse) GetResponse() []*ParseBlockResponse { return nil } -type VerifyHeightIndexResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Err Error `protobuf:"varint,1,opt,name=err,proto3,enum=vm.Error" json:"err,omitempty"` -} - -func (x *VerifyHeightIndexResponse) Reset() { - *x = VerifyHeightIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *VerifyHeightIndexResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*VerifyHeightIndexResponse) ProtoMessage() {} - -func (x *VerifyHeightIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use VerifyHeightIndexResponse.ProtoReflect.Descriptor instead. -func (*VerifyHeightIndexResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{32} -} - -func (x *VerifyHeightIndexResponse) GetErr() Error { - if x != nil { - return x.Err - } - return Error_ERROR_UNSPECIFIED -} - type GetBlockIDAtHeightRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2338,7 +2288,7 @@ type GetBlockIDAtHeightRequest struct { func (x *GetBlockIDAtHeightRequest) Reset() { *x = GetBlockIDAtHeightRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2351,7 +2301,7 @@ func (x *GetBlockIDAtHeightRequest) String() string { func (*GetBlockIDAtHeightRequest) ProtoMessage() {} func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2364,7 +2314,7 @@ func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightRequest.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{33} + return file_vm_vm_proto_rawDescGZIP(), []int{32} } func (x *GetBlockIDAtHeightRequest) GetHeight() uint64 { @@ -2386,7 +2336,7 @@ type GetBlockIDAtHeightResponse struct { func (x *GetBlockIDAtHeightResponse) Reset() { *x = GetBlockIDAtHeightResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2399,7 +2349,7 @@ func (x *GetBlockIDAtHeightResponse) String() string { func (*GetBlockIDAtHeightResponse) ProtoMessage() {} func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2412,7 +2362,7 @@ func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightResponse.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{34} + return file_vm_vm_proto_rawDescGZIP(), []int{33} } func (x *GetBlockIDAtHeightResponse) GetBlkId() []byte { @@ -2440,7 +2390,7 @@ type GatherResponse struct { func (x *GatherResponse) Reset() { *x = GatherResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2453,7 +2403,7 @@ func (x *GatherResponse) String() string { func (*GatherResponse) ProtoMessage() {} func (x *GatherResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2466,7 +2416,7 @@ func (x *GatherResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GatherResponse.ProtoReflect.Descriptor instead. func (*GatherResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{35} + return file_vm_vm_proto_rawDescGZIP(), []int{34} } func (x *GatherResponse) GetMetricFamilies() []*_go.MetricFamily { @@ -2488,7 +2438,7 @@ type StateSyncEnabledResponse struct { func (x *StateSyncEnabledResponse) Reset() { *x = StateSyncEnabledResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2501,7 +2451,7 @@ func (x *StateSyncEnabledResponse) String() string { func (*StateSyncEnabledResponse) ProtoMessage() {} func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2514,7 +2464,7 @@ func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSyncEnabledResponse.ProtoReflect.Descriptor instead. func (*StateSyncEnabledResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{36} + return file_vm_vm_proto_rawDescGZIP(), []int{35} } func (x *StateSyncEnabledResponse) GetEnabled() bool { @@ -2545,7 +2495,7 @@ type GetOngoingSyncStateSummaryResponse struct { func (x *GetOngoingSyncStateSummaryResponse) Reset() { *x = GetOngoingSyncStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2558,7 +2508,7 @@ func (x *GetOngoingSyncStateSummaryResponse) String() string { func (*GetOngoingSyncStateSummaryResponse) ProtoMessage() {} func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2571,7 +2521,7 @@ func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetOngoingSyncStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetOngoingSyncStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{37} + return file_vm_vm_proto_rawDescGZIP(), []int{36} } func (x *GetOngoingSyncStateSummaryResponse) GetId() []byte { @@ -2616,7 +2566,7 @@ type GetLastStateSummaryResponse struct { func (x *GetLastStateSummaryResponse) Reset() { *x = GetLastStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2629,7 +2579,7 @@ func (x *GetLastStateSummaryResponse) String() string { func (*GetLastStateSummaryResponse) ProtoMessage() {} func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2642,7 +2592,7 @@ func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLastStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetLastStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{38} + return file_vm_vm_proto_rawDescGZIP(), []int{37} } func (x *GetLastStateSummaryResponse) GetId() []byte { @@ -2684,7 +2634,7 @@ type ParseStateSummaryRequest struct { func (x *ParseStateSummaryRequest) Reset() { *x = ParseStateSummaryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2697,7 +2647,7 @@ func (x *ParseStateSummaryRequest) String() string { func (*ParseStateSummaryRequest) ProtoMessage() {} func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2710,7 +2660,7 @@ func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryRequest.ProtoReflect.Descriptor instead. func (*ParseStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{39} + return file_vm_vm_proto_rawDescGZIP(), []int{38} } func (x *ParseStateSummaryRequest) GetBytes() []byte { @@ -2733,7 +2683,7 @@ type ParseStateSummaryResponse struct { func (x *ParseStateSummaryResponse) Reset() { *x = ParseStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2746,7 +2696,7 @@ func (x *ParseStateSummaryResponse) String() string { func (*ParseStateSummaryResponse) ProtoMessage() {} func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2759,7 +2709,7 @@ func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryResponse.ProtoReflect.Descriptor instead. func (*ParseStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{40} + return file_vm_vm_proto_rawDescGZIP(), []int{39} } func (x *ParseStateSummaryResponse) GetId() []byte { @@ -2794,7 +2744,7 @@ type GetStateSummaryRequest struct { func (x *GetStateSummaryRequest) Reset() { *x = GetStateSummaryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2807,7 +2757,7 @@ func (x *GetStateSummaryRequest) String() string { func (*GetStateSummaryRequest) ProtoMessage() {} func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2820,7 +2770,7 @@ func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryRequest.ProtoReflect.Descriptor instead. func (*GetStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{41} + return file_vm_vm_proto_rawDescGZIP(), []int{40} } func (x *GetStateSummaryRequest) GetHeight() uint64 { @@ -2843,7 +2793,7 @@ type GetStateSummaryResponse struct { func (x *GetStateSummaryResponse) Reset() { *x = GetStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2856,7 +2806,7 @@ func (x *GetStateSummaryResponse) String() string { func (*GetStateSummaryResponse) ProtoMessage() {} func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2869,7 +2819,7 @@ func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{42} + return file_vm_vm_proto_rawDescGZIP(), []int{41} } func (x *GetStateSummaryResponse) GetId() []byte { @@ -2904,7 +2854,7 @@ type StateSummaryAcceptRequest struct { func (x *StateSummaryAcceptRequest) Reset() { *x = StateSummaryAcceptRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[43] + mi := &file_vm_vm_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2917,7 +2867,7 @@ func (x *StateSummaryAcceptRequest) String() string { func (*StateSummaryAcceptRequest) ProtoMessage() {} func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[43] + mi := &file_vm_vm_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2930,7 +2880,7 @@ func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptRequest.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{43} + return file_vm_vm_proto_rawDescGZIP(), []int{42} } func (x *StateSummaryAcceptRequest) GetBytes() []byte { @@ -2952,7 +2902,7 @@ type StateSummaryAcceptResponse struct { func (x *StateSummaryAcceptResponse) Reset() { *x = StateSummaryAcceptResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[44] + mi := &file_vm_vm_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2965,7 +2915,7 @@ func (x *StateSummaryAcceptResponse) String() string { func (*StateSummaryAcceptResponse) ProtoMessage() {} func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[44] + mi := &file_vm_vm_proto_msgTypes[43] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2978,7 +2928,7 @@ func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptResponse.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{44} + return file_vm_vm_proto_rawDescGZIP(), []int{43} } func (x *StateSummaryAcceptResponse) GetMode() StateSummaryAcceptResponse_Mode { @@ -3245,246 +3195,236 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x19, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, + 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, + 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, + 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, + 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, + 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, + 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, + 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, + 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, - 0x72, 0x72, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, - 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, - 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, - 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, - 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, - 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, - 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, - 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, - 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, + 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, - 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, - 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, + 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, - 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, - 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, - 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, - 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, - 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, - 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, - 0x72, 0x72, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, - 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, - 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, - 0x4d, 0x49, 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, - 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, - 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, - 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x2a, 0x61, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, - 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, - 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, - 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, - 0x8e, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, - 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x48, 0x45, 0x49, 0x47, 0x48, 0x54, 0x5f, 0x49, 0x4e, 0x44, 0x45, 0x58, 0x5f, 0x49, 0x4e, - 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x10, 0x03, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4e, - 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x04, - 0x32, 0xd2, 0x11, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, - 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, - 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, + 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, + 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, + 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, + 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, + 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, + 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, + 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, + 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, + 0x10, 0x03, 0x2a, 0x61, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, + 0x52, 0x4f, 0x43, 0x45, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, + 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, + 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, + 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, + 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, + 0x10, 0x03, 0x32, 0x86, 0x11, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, + 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, - 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, 0x76, 0x6d, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, - 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, - 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x65, - 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x6d, - 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, + 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, 0x76, + 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, + 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, + 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, + 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x6d, + 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, + 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, + 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x41, + 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, 0x2e, + 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, + 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, + 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, - 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, - 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x41, - 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x6d, 0x2e, 0x41, - 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, + 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x6d, + 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x12, 0x57, 0x0a, 0x1a, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x21, + 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x41, 0x70, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, - 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, - 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x47, - 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, - 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x57, - 0x0a, 0x1a, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x76, - 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x15, 0x43, 0x72, 0x6f, + 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, + 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, + 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, + 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x1a, 0x26, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, + 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, + 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, 0x0a, 0x15, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, + 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, - 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, - 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, - 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x11, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x79, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, - 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x10, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, - 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, 0x2e, 0x76, - 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x50, - 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, - 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x79, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, - 0x66, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x12, 0x3d, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, - 0x12, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, - 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, - 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, + 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, + 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -3500,7 +3440,7 @@ func file_vm_vm_proto_rawDescGZIP() []byte { } var file_vm_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 45) +var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 44) var file_vm_vm_proto_goTypes = []interface{}{ (State)(0), // 0: vm.State (Status)(0), // 1: vm.Status @@ -3538,119 +3478,115 @@ var file_vm_vm_proto_goTypes = []interface{}{ (*GetAncestorsResponse)(nil), // 33: vm.GetAncestorsResponse (*BatchedParseBlockRequest)(nil), // 34: vm.BatchedParseBlockRequest (*BatchedParseBlockResponse)(nil), // 35: vm.BatchedParseBlockResponse - (*VerifyHeightIndexResponse)(nil), // 36: vm.VerifyHeightIndexResponse - (*GetBlockIDAtHeightRequest)(nil), // 37: vm.GetBlockIDAtHeightRequest - (*GetBlockIDAtHeightResponse)(nil), // 38: vm.GetBlockIDAtHeightResponse - (*GatherResponse)(nil), // 39: vm.GatherResponse - (*StateSyncEnabledResponse)(nil), // 40: vm.StateSyncEnabledResponse - (*GetOngoingSyncStateSummaryResponse)(nil), // 41: vm.GetOngoingSyncStateSummaryResponse - (*GetLastStateSummaryResponse)(nil), // 42: vm.GetLastStateSummaryResponse - (*ParseStateSummaryRequest)(nil), // 43: vm.ParseStateSummaryRequest - (*ParseStateSummaryResponse)(nil), // 44: vm.ParseStateSummaryResponse - (*GetStateSummaryRequest)(nil), // 45: vm.GetStateSummaryRequest - (*GetStateSummaryResponse)(nil), // 46: vm.GetStateSummaryResponse - (*StateSummaryAcceptRequest)(nil), // 47: vm.StateSummaryAcceptRequest - (*StateSummaryAcceptResponse)(nil), // 48: vm.StateSummaryAcceptResponse - (*timestamppb.Timestamp)(nil), // 49: google.protobuf.Timestamp - (*_go.MetricFamily)(nil), // 50: io.prometheus.client.MetricFamily - (*emptypb.Empty)(nil), // 51: google.protobuf.Empty + (*GetBlockIDAtHeightRequest)(nil), // 36: vm.GetBlockIDAtHeightRequest + (*GetBlockIDAtHeightResponse)(nil), // 37: vm.GetBlockIDAtHeightResponse + (*GatherResponse)(nil), // 38: vm.GatherResponse + (*StateSyncEnabledResponse)(nil), // 39: vm.StateSyncEnabledResponse + (*GetOngoingSyncStateSummaryResponse)(nil), // 40: vm.GetOngoingSyncStateSummaryResponse + (*GetLastStateSummaryResponse)(nil), // 41: vm.GetLastStateSummaryResponse + (*ParseStateSummaryRequest)(nil), // 42: vm.ParseStateSummaryRequest + (*ParseStateSummaryResponse)(nil), // 43: vm.ParseStateSummaryResponse + (*GetStateSummaryRequest)(nil), // 44: vm.GetStateSummaryRequest + (*GetStateSummaryResponse)(nil), // 45: vm.GetStateSummaryResponse + (*StateSummaryAcceptRequest)(nil), // 46: vm.StateSummaryAcceptRequest + (*StateSummaryAcceptResponse)(nil), // 47: vm.StateSummaryAcceptResponse + (*timestamppb.Timestamp)(nil), // 48: google.protobuf.Timestamp + (*_go.MetricFamily)(nil), // 49: io.prometheus.client.MetricFamily + (*emptypb.Empty)(nil), // 50: google.protobuf.Empty } var file_vm_vm_proto_depIdxs = []int32{ - 49, // 0: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 0: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp 0, // 1: vm.SetStateRequest.state:type_name -> vm.State - 49, // 2: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 2: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp 9, // 3: vm.CreateHandlersResponse.handlers:type_name -> vm.Handler - 49, // 4: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 4: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp 1, // 5: vm.ParseBlockResponse.status:type_name -> vm.Status - 49, // 6: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 6: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp 1, // 7: vm.GetBlockResponse.status:type_name -> vm.Status - 49, // 8: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 8: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp 2, // 9: vm.GetBlockResponse.err:type_name -> vm.Error - 49, // 10: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp - 49, // 11: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp - 49, // 12: vm.CrossChainAppRequestMsg.deadline:type_name -> google.protobuf.Timestamp + 48, // 10: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp + 48, // 11: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp + 48, // 12: vm.CrossChainAppRequestMsg.deadline:type_name -> google.protobuf.Timestamp 13, // 13: vm.BatchedParseBlockResponse.response:type_name -> vm.ParseBlockResponse - 2, // 14: vm.VerifyHeightIndexResponse.err:type_name -> vm.Error - 2, // 15: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error - 50, // 16: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily - 2, // 17: vm.StateSyncEnabledResponse.err:type_name -> vm.Error - 2, // 18: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error - 2, // 19: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error - 2, // 20: vm.ParseStateSummaryResponse.err:type_name -> vm.Error - 2, // 21: vm.GetStateSummaryResponse.err:type_name -> vm.Error - 3, // 22: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode - 2, // 23: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error - 4, // 24: vm.VM.Initialize:input_type -> vm.InitializeRequest - 6, // 25: vm.VM.SetState:input_type -> vm.SetStateRequest - 51, // 26: vm.VM.Shutdown:input_type -> google.protobuf.Empty - 51, // 27: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty - 30, // 28: vm.VM.Connected:input_type -> vm.ConnectedRequest - 31, // 29: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest - 10, // 30: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest - 12, // 31: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest - 14, // 32: vm.VM.GetBlock:input_type -> vm.GetBlockRequest - 16, // 33: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest - 51, // 34: vm.VM.Health:input_type -> google.protobuf.Empty - 51, // 35: vm.VM.Version:input_type -> google.protobuf.Empty - 23, // 36: vm.VM.AppRequest:input_type -> vm.AppRequestMsg - 24, // 37: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg - 25, // 38: vm.VM.AppResponse:input_type -> vm.AppResponseMsg - 26, // 39: vm.VM.AppGossip:input_type -> vm.AppGossipMsg - 51, // 40: vm.VM.Gather:input_type -> google.protobuf.Empty - 27, // 41: vm.VM.CrossChainAppRequest:input_type -> vm.CrossChainAppRequestMsg - 28, // 42: vm.VM.CrossChainAppRequestFailed:input_type -> vm.CrossChainAppRequestFailedMsg - 29, // 43: vm.VM.CrossChainAppResponse:input_type -> vm.CrossChainAppResponseMsg - 32, // 44: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest - 34, // 45: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest - 51, // 46: vm.VM.VerifyHeightIndex:input_type -> google.protobuf.Empty - 37, // 47: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest - 51, // 48: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty - 51, // 49: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty - 51, // 50: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty - 43, // 51: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest - 45, // 52: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest - 17, // 53: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest - 19, // 54: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest - 20, // 55: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest - 47, // 56: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest - 5, // 57: vm.VM.Initialize:output_type -> vm.InitializeResponse - 7, // 58: vm.VM.SetState:output_type -> vm.SetStateResponse - 51, // 59: vm.VM.Shutdown:output_type -> google.protobuf.Empty - 8, // 60: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse - 51, // 61: vm.VM.Connected:output_type -> google.protobuf.Empty - 51, // 62: vm.VM.Disconnected:output_type -> google.protobuf.Empty - 11, // 63: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse - 13, // 64: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse - 15, // 65: vm.VM.GetBlock:output_type -> vm.GetBlockResponse - 51, // 66: vm.VM.SetPreference:output_type -> google.protobuf.Empty - 21, // 67: vm.VM.Health:output_type -> vm.HealthResponse - 22, // 68: vm.VM.Version:output_type -> vm.VersionResponse - 51, // 69: vm.VM.AppRequest:output_type -> google.protobuf.Empty - 51, // 70: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty - 51, // 71: vm.VM.AppResponse:output_type -> google.protobuf.Empty - 51, // 72: vm.VM.AppGossip:output_type -> google.protobuf.Empty - 39, // 73: vm.VM.Gather:output_type -> vm.GatherResponse - 51, // 74: vm.VM.CrossChainAppRequest:output_type -> google.protobuf.Empty - 51, // 75: vm.VM.CrossChainAppRequestFailed:output_type -> google.protobuf.Empty - 51, // 76: vm.VM.CrossChainAppResponse:output_type -> google.protobuf.Empty - 33, // 77: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse - 35, // 78: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse - 36, // 79: vm.VM.VerifyHeightIndex:output_type -> vm.VerifyHeightIndexResponse - 38, // 80: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse - 40, // 81: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse - 41, // 82: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse - 42, // 83: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse - 44, // 84: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse - 46, // 85: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse - 18, // 86: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse - 51, // 87: vm.VM.BlockAccept:output_type -> google.protobuf.Empty - 51, // 88: vm.VM.BlockReject:output_type -> google.protobuf.Empty - 48, // 89: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse - 57, // [57:90] is the sub-list for method output_type - 24, // [24:57] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 2, // 14: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error + 49, // 15: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily + 2, // 16: vm.StateSyncEnabledResponse.err:type_name -> vm.Error + 2, // 17: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error + 2, // 18: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error + 2, // 19: vm.ParseStateSummaryResponse.err:type_name -> vm.Error + 2, // 20: vm.GetStateSummaryResponse.err:type_name -> vm.Error + 3, // 21: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode + 2, // 22: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error + 4, // 23: vm.VM.Initialize:input_type -> vm.InitializeRequest + 6, // 24: vm.VM.SetState:input_type -> vm.SetStateRequest + 50, // 25: vm.VM.Shutdown:input_type -> google.protobuf.Empty + 50, // 26: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty + 30, // 27: vm.VM.Connected:input_type -> vm.ConnectedRequest + 31, // 28: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest + 10, // 29: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest + 12, // 30: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest + 14, // 31: vm.VM.GetBlock:input_type -> vm.GetBlockRequest + 16, // 32: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest + 50, // 33: vm.VM.Health:input_type -> google.protobuf.Empty + 50, // 34: vm.VM.Version:input_type -> google.protobuf.Empty + 23, // 35: vm.VM.AppRequest:input_type -> vm.AppRequestMsg + 24, // 36: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg + 25, // 37: vm.VM.AppResponse:input_type -> vm.AppResponseMsg + 26, // 38: vm.VM.AppGossip:input_type -> vm.AppGossipMsg + 50, // 39: vm.VM.Gather:input_type -> google.protobuf.Empty + 27, // 40: vm.VM.CrossChainAppRequest:input_type -> vm.CrossChainAppRequestMsg + 28, // 41: vm.VM.CrossChainAppRequestFailed:input_type -> vm.CrossChainAppRequestFailedMsg + 29, // 42: vm.VM.CrossChainAppResponse:input_type -> vm.CrossChainAppResponseMsg + 32, // 43: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest + 34, // 44: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest + 36, // 45: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest + 50, // 46: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty + 50, // 47: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty + 50, // 48: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty + 42, // 49: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest + 44, // 50: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest + 17, // 51: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest + 19, // 52: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest + 20, // 53: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest + 46, // 54: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest + 5, // 55: vm.VM.Initialize:output_type -> vm.InitializeResponse + 7, // 56: vm.VM.SetState:output_type -> vm.SetStateResponse + 50, // 57: vm.VM.Shutdown:output_type -> google.protobuf.Empty + 8, // 58: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse + 50, // 59: vm.VM.Connected:output_type -> google.protobuf.Empty + 50, // 60: vm.VM.Disconnected:output_type -> google.protobuf.Empty + 11, // 61: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse + 13, // 62: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse + 15, // 63: vm.VM.GetBlock:output_type -> vm.GetBlockResponse + 50, // 64: vm.VM.SetPreference:output_type -> google.protobuf.Empty + 21, // 65: vm.VM.Health:output_type -> vm.HealthResponse + 22, // 66: vm.VM.Version:output_type -> vm.VersionResponse + 50, // 67: vm.VM.AppRequest:output_type -> google.protobuf.Empty + 50, // 68: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty + 50, // 69: vm.VM.AppResponse:output_type -> google.protobuf.Empty + 50, // 70: vm.VM.AppGossip:output_type -> google.protobuf.Empty + 38, // 71: vm.VM.Gather:output_type -> vm.GatherResponse + 50, // 72: vm.VM.CrossChainAppRequest:output_type -> google.protobuf.Empty + 50, // 73: vm.VM.CrossChainAppRequestFailed:output_type -> google.protobuf.Empty + 50, // 74: vm.VM.CrossChainAppResponse:output_type -> google.protobuf.Empty + 33, // 75: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse + 35, // 76: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse + 37, // 77: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse + 39, // 78: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse + 40, // 79: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse + 41, // 80: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse + 43, // 81: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse + 45, // 82: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse + 18, // 83: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse + 50, // 84: vm.VM.BlockAccept:output_type -> google.protobuf.Empty + 50, // 85: vm.VM.BlockReject:output_type -> google.protobuf.Empty + 47, // 86: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse + 55, // [55:87] is the sub-list for method output_type + 23, // [23:55] is the sub-list for method input_type + 23, // [23:23] is the sub-list for extension type_name + 23, // [23:23] is the sub-list for extension extendee + 0, // [0:23] is the sub-list for field type_name } func init() { file_vm_vm_proto_init() } @@ -4044,18 +3980,6 @@ func file_vm_vm_proto_init() { } } file_vm_vm_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VerifyHeightIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vm_vm_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlockIDAtHeightRequest); i { case 0: return &v.state @@ -4067,7 +3991,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlockIDAtHeightResponse); i { case 0: return &v.state @@ -4079,7 +4003,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GatherResponse); i { case 0: return &v.state @@ -4091,7 +4015,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSyncEnabledResponse); i { case 0: return &v.state @@ -4103,7 +4027,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetOngoingSyncStateSummaryResponse); i { case 0: return &v.state @@ -4115,7 +4039,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetLastStateSummaryResponse); i { case 0: return &v.state @@ -4127,7 +4051,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParseStateSummaryRequest); i { case 0: return &v.state @@ -4139,7 +4063,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParseStateSummaryResponse); i { case 0: return &v.state @@ -4151,7 +4075,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStateSummaryRequest); i { case 0: return &v.state @@ -4163,7 +4087,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStateSummaryResponse); i { case 0: return &v.state @@ -4175,7 +4099,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSummaryAcceptRequest); i { case 0: return &v.state @@ -4187,7 +4111,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSummaryAcceptResponse); i { case 0: return &v.state @@ -4208,7 +4132,7 @@ func file_vm_vm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vm_vm_proto_rawDesc, NumEnums: 4, - NumMessages: 45, + NumMessages: 44, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/pb/vm/vm_grpc.pb.go b/proto/pb/vm/vm_grpc.pb.go index 6d7bb17f6c3..4a67f13408c 100644 --- a/proto/pb/vm/vm_grpc.pb.go +++ b/proto/pb/vm/vm_grpc.pb.go @@ -42,7 +42,6 @@ const ( VM_CrossChainAppResponse_FullMethodName = "/vm.VM/CrossChainAppResponse" VM_GetAncestors_FullMethodName = "/vm.VM/GetAncestors" VM_BatchedParseBlock_FullMethodName = "/vm.VM/BatchedParseBlock" - VM_VerifyHeightIndex_FullMethodName = "/vm.VM/VerifyHeightIndex" VM_GetBlockIDAtHeight_FullMethodName = "/vm.VM/GetBlockIDAtHeight" VM_StateSyncEnabled_FullMethodName = "/vm.VM/StateSyncEnabled" VM_GetOngoingSyncStateSummary_FullMethodName = "/vm.VM/GetOngoingSyncStateSummary" @@ -102,7 +101,6 @@ type VMClient interface { GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) // HeightIndexedChainVM - VerifyHeightIndex(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VerifyHeightIndexResponse, error) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) // StateSyncableVM // @@ -331,15 +329,6 @@ func (c *vMClient) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockR return out, nil } -func (c *vMClient) VerifyHeightIndex(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VerifyHeightIndexResponse, error) { - out := new(VerifyHeightIndexResponse) - err := c.cc.Invoke(ctx, VM_VerifyHeightIndex_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *vMClient) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) { out := new(GetBlockIDAtHeightResponse) err := c.cc.Invoke(ctx, VM_GetBlockIDAtHeight_FullMethodName, in, out, opts...) @@ -477,7 +466,6 @@ type VMServer interface { GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) // HeightIndexedChainVM - VerifyHeightIndex(context.Context, *emptypb.Empty) (*VerifyHeightIndexResponse, error) GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) // StateSyncableVM // @@ -571,9 +559,6 @@ func (UnimplementedVMServer) GetAncestors(context.Context, *GetAncestorsRequest) func (UnimplementedVMServer) BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method BatchedParseBlock not implemented") } -func (UnimplementedVMServer) VerifyHeightIndex(context.Context, *emptypb.Empty) (*VerifyHeightIndexResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VerifyHeightIndex not implemented") -} func (UnimplementedVMServer) GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBlockIDAtHeight not implemented") } @@ -1013,24 +998,6 @@ func _VM_BatchedParseBlock_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } -func _VM_VerifyHeightIndex_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(emptypb.Empty) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VMServer).VerifyHeightIndex(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: VM_VerifyHeightIndex_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).VerifyHeightIndex(ctx, req.(*emptypb.Empty)) - } - return interceptor(ctx, in, info, handler) -} - func _VM_GetBlockIDAtHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetBlockIDAtHeightRequest) if err := dec(in); err != nil { @@ -1306,10 +1273,6 @@ var VM_ServiceDesc = grpc.ServiceDesc{ MethodName: "BatchedParseBlock", Handler: _VM_BatchedParseBlock_Handler, }, - { - MethodName: "VerifyHeightIndex", - Handler: _VM_VerifyHeightIndex_Handler, - }, { MethodName: "GetBlockIDAtHeight", Handler: _VM_GetBlockIDAtHeight_Handler, diff --git a/proto/vm/vm.proto b/proto/vm/vm.proto index 4a0557ba4e6..038744d4e2d 100644 --- a/proto/vm/vm.proto +++ b/proto/vm/vm.proto @@ -56,7 +56,6 @@ service VM { rpc BatchedParseBlock(BatchedParseBlockRequest) returns (BatchedParseBlockResponse); // HeightIndexedChainVM - rpc VerifyHeightIndex(google.protobuf.Empty) returns (VerifyHeightIndexResponse); rpc GetBlockIDAtHeight(GetBlockIDAtHeightRequest) returns (GetBlockIDAtHeightResponse); // StateSyncableVM @@ -101,8 +100,7 @@ enum Error { ERROR_UNSPECIFIED = 0; ERROR_CLOSED = 1; ERROR_NOT_FOUND = 2; - ERROR_HEIGHT_INDEX_INCOMPLETE = 3; - ERROR_STATE_SYNC_NOT_IMPLEMENTED = 4; + ERROR_STATE_SYNC_NOT_IMPLEMENTED = 3; } message InitializeRequest { @@ -334,10 +332,6 @@ message BatchedParseBlockResponse { repeated ParseBlockResponse response = 1; } -message VerifyHeightIndexResponse { - Error err = 1; -} - message GetBlockIDAtHeightRequest { uint64 height = 1; } diff --git a/snow/engine/avalanche/vertex/mock_vm.go b/snow/engine/avalanche/vertex/mock_vm.go index 7ad293f6313..18903544bd6 100644 --- a/snow/engine/avalanche/vertex/mock_vm.go +++ b/snow/engine/avalanche/vertex/mock_vm.go @@ -364,20 +364,6 @@ func (mr *MockLinearizableVMMockRecorder) Shutdown(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockLinearizableVM)(nil).Shutdown), arg0) } -// VerifyHeightIndex mocks base method. -func (m *MockLinearizableVM) VerifyHeightIndex(arg0 context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyHeightIndex", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// VerifyHeightIndex indicates an expected call of VerifyHeightIndex. -func (mr *MockLinearizableVMMockRecorder) VerifyHeightIndex(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyHeightIndex", reflect.TypeOf((*MockLinearizableVM)(nil).VerifyHeightIndex), arg0) -} - // Version mocks base method. func (m *MockLinearizableVM) Version(arg0 context.Context) (string, error) { m.ctrl.T.Helper() diff --git a/snow/engine/snowman/block/mock_chain_vm.go b/snow/engine/snowman/block/mock_chain_vm.go index ad99e3f716d..c927282c1f9 100644 --- a/snow/engine/snowman/block/mock_chain_vm.go +++ b/snow/engine/snowman/block/mock_chain_vm.go @@ -334,20 +334,6 @@ func (mr *MockChainVMMockRecorder) Shutdown(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Shutdown", reflect.TypeOf((*MockChainVM)(nil).Shutdown), arg0) } -// VerifyHeightIndex mocks base method. -func (m *MockChainVM) VerifyHeightIndex(arg0 context.Context) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VerifyHeightIndex", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// VerifyHeightIndex indicates an expected call of VerifyHeightIndex. -func (mr *MockChainVMMockRecorder) VerifyHeightIndex(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VerifyHeightIndex", reflect.TypeOf((*MockChainVM)(nil).VerifyHeightIndex), arg0) -} - // Version mocks base method. func (m *MockChainVM) Version(arg0 context.Context) (string, error) { m.ctrl.T.Helper() diff --git a/snow/engine/snowman/block/test_vm.go b/snow/engine/snowman/block/test_vm.go index 376dd27066f..7c04c90ec23 100644 --- a/snow/engine/snowman/block/test_vm.go +++ b/snow/engine/snowman/block/test_vm.go @@ -19,7 +19,6 @@ var ( errParseBlock = errors.New("unexpectedly called ParseBlock") errGetBlock = errors.New("unexpectedly called GetBlock") errLastAccepted = errors.New("unexpectedly called LastAccepted") - errVerifyHeightIndex = errors.New("unexpectedly called VerifyHeightIndex") errGetBlockIDAtHeight = errors.New("unexpectedly called GetBlockIDAtHeight") _ ChainVM = (*TestVM)(nil) @@ -34,7 +33,6 @@ type TestVM struct { CantGetBlock, CantSetPreference, CantLastAccepted, - CantVerifyHeightIndex, CantGetBlockIDAtHeight bool BuildBlockF func(context.Context) (snowman.Block, error) @@ -42,7 +40,6 @@ type TestVM struct { GetBlockF func(context.Context, ids.ID) (snowman.Block, error) SetPreferenceF func(context.Context, ids.ID) error LastAcceptedF func(context.Context) (ids.ID, error) - VerifyHeightIndexF func(context.Context) error GetBlockIDAtHeightF func(ctx context.Context, height uint64) (ids.ID, error) } @@ -106,16 +103,6 @@ func (vm *TestVM) LastAccepted(ctx context.Context) (ids.ID, error) { return ids.ID{}, errLastAccepted } -func (vm *TestVM) VerifyHeightIndex(ctx context.Context) error { - if vm.VerifyHeightIndexF != nil { - return vm.VerifyHeightIndexF(ctx) - } - if vm.CantVerifyHeightIndex && vm.T != nil { - require.FailNow(vm.T, errVerifyHeightIndex.Error()) - } - return errVerifyHeightIndex -} - func (vm *TestVM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error) { if vm.GetBlockIDAtHeightF != nil { return vm.GetBlockIDAtHeightF(ctx, height) diff --git a/snow/engine/snowman/block/vm.go b/snow/engine/snowman/block/vm.go index 4153632a761..d28dc7ef7a6 100644 --- a/snow/engine/snowman/block/vm.go +++ b/snow/engine/snowman/block/vm.go @@ -5,19 +5,12 @@ package block import ( "context" - "errors" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/snow/consensus/snowman" "github.com/ava-labs/avalanchego/snow/engine/common" ) -// ErrIndexIncomplete is used to indicate that the VM is currently repairing its -// index. -// -// TODO: Remove after v1.11.x activates. -var ErrIndexIncomplete = errors.New("query failed because height index is incomplete") - // ChainVM defines the required functionality of a Snowman VM. // // A Snowman VM is responsible for defining the representation of state, @@ -56,15 +49,6 @@ type ChainVM interface { // returned. LastAccepted(context.Context) (ids.ID, error) - // VerifyHeightIndex should return: - // - nil if the height index is available. - // - ErrIndexIncomplete if the height index is not currently available. - // - Any other non-standard error that may have occurred when verifying the - // index. - // - // TODO: Remove after v1.11.x activates. - VerifyHeightIndex(context.Context) error - // GetBlockIDAtHeight returns: // - The ID of the block that was accepted with [height]. // - database.ErrNotFound if the [height] index is unknown. diff --git a/vms/avm/vm.go b/vms/avm/vm.go index fe302f97cf2..82080d37734 100644 --- a/vms/avm/vm.go +++ b/vms/avm/vm.go @@ -390,10 +390,6 @@ func (vm *VM) GetBlockIDAtHeight(_ context.Context, height uint64) (ids.ID, erro return vm.state.GetBlockIDAtHeight(height) } -func (*VM) VerifyHeightIndex(context.Context) error { - return nil -} - /* ****************************************************************************** *********************************** DAG VM *********************************** diff --git a/vms/example/xsvm/vm.go b/vms/example/xsvm/vm.go index 38f25393c39..ef59e6c5165 100644 --- a/vms/example/xsvm/vm.go +++ b/vms/example/xsvm/vm.go @@ -168,10 +168,6 @@ func (vm *VM) BuildBlockWithContext(ctx context.Context, blockContext *smblock.C return vm.builder.BuildBlock(ctx, blockContext) } -func (*VM) VerifyHeightIndex(context.Context) error { - return nil -} - func (vm *VM) GetBlockIDAtHeight(_ context.Context, height uint64) (ids.ID, error) { return state.GetBlockIDByHeight(vm.db, height) } diff --git a/vms/metervm/block_metrics.go b/vms/metervm/block_metrics.go index 160d0eee50a..0a6473f617b 100644 --- a/vms/metervm/block_metrics.go +++ b/vms/metervm/block_metrics.go @@ -24,7 +24,6 @@ type blockMetrics struct { accept, reject, // Height metrics - verifyHeightIndex, getBlockIDAtHeight, // Block verification with context metrics shouldVerifyWithContext, @@ -69,7 +68,6 @@ func (m *blockMetrics) Initialize( m.shouldVerifyWithContext = newAverager(namespace, "should_verify_with_context", reg, &errs) m.verifyWithContext = newAverager(namespace, "verify_with_context", reg, &errs) m.verifyWithContextErr = newAverager(namespace, "verify_with_context_err", reg, &errs) - m.verifyHeightIndex = newAverager(namespace, "verify_height_index", reg, &errs) m.getBlockIDAtHeight = newAverager(namespace, "get_block_id_at_height", reg, &errs) if supportsBlockBuildingWithContext { diff --git a/vms/metervm/block_vm.go b/vms/metervm/block_vm.go index 73e949180a9..7c93b907857 100644 --- a/vms/metervm/block_vm.go +++ b/vms/metervm/block_vm.go @@ -150,14 +150,6 @@ func (vm *blockVM) LastAccepted(ctx context.Context) (ids.ID, error) { return lastAcceptedID, err } -func (vm *blockVM) VerifyHeightIndex(ctx context.Context) error { - start := vm.clock.Time() - err := vm.ChainVM.VerifyHeightIndex(ctx) - end := vm.clock.Time() - vm.blockMetrics.verifyHeightIndex.Observe(float64(end.Sub(start))) - return err -} - func (vm *blockVM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error) { start := vm.clock.Time() blockID, err := vm.ChainVM.GetBlockIDAtHeight(ctx, height) diff --git a/vms/platformvm/vm.go b/vms/platformvm/vm.go index d985b408be0..39896377aba 100644 --- a/vms/platformvm/vm.go +++ b/vms/platformvm/vm.go @@ -503,10 +503,6 @@ func (vm *VM) Logger() logging.Logger { return vm.ctx.Log } -func (*VM) VerifyHeightIndex(_ context.Context) error { - return nil -} - func (vm *VM) GetBlockIDAtHeight(_ context.Context, height uint64) (ids.ID, error) { return vm.state.GetBlockIDAtHeight(height) } diff --git a/vms/proposervm/batched_vm_test.go b/vms/proposervm/batched_vm_test.go index 3564b0b85b8..a95e9d5e164 100644 --- a/vms/proposervm/batched_vm_test.go +++ b/vms/proposervm/batched_vm_test.go @@ -1031,9 +1031,6 @@ func initTestRemoteProposerVM( return nil, errUnknownBlock } } - coreVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } proVM := New( coreVM, diff --git a/vms/proposervm/block_server.go b/vms/proposervm/block_server.go deleted file mode 100644 index 6a056c8bc82..00000000000 --- a/vms/proposervm/block_server.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package proposervm - -import ( - "context" - - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/consensus/snowman" - "github.com/ava-labs/avalanchego/vms/proposervm/indexer" -) - -var _ indexer.BlockServer = (*VM)(nil) - -// Note: this is a contention heavy call that should be avoided -// for frequent/repeated indexer ops -func (vm *VM) GetFullPostForkBlock(ctx context.Context, blkID ids.ID) (snowman.Block, error) { - vm.ctx.Lock.Lock() - defer vm.ctx.Lock.Unlock() - - return vm.getPostForkBlock(ctx, blkID) -} - -func (vm *VM) Commit() error { - vm.ctx.Lock.Lock() - defer vm.ctx.Lock.Unlock() - - return vm.db.Commit() -} diff --git a/vms/proposervm/height_indexed_vm.go b/vms/proposervm/height_indexed_vm.go index a29334f6d8d..49c38a7df07 100644 --- a/vms/proposervm/height_indexed_vm.go +++ b/vms/proposervm/height_indexed_vm.go @@ -11,64 +11,12 @@ import ( "github.com/ava-labs/avalanchego/database" "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/engine/snowman/block" ) const pruneCommitPeriod = 1024 -// shouldHeightIndexBeRepaired checks if index needs repairing and stores a -// checkpoint if repairing is needed. -// -// vm.ctx.Lock should be held -func (vm *VM) shouldHeightIndexBeRepaired(ctx context.Context) (bool, error) { - _, err := vm.State.GetCheckpoint() - if err != database.ErrNotFound { - return true, err - } - - // no checkpoint. Either index is complete or repair was never attempted. - // index is complete iff lastAcceptedBlock is indexed - latestProBlkID, err := vm.State.GetLastAccepted() - if err == database.ErrNotFound { - return false, nil - } - if err != nil { - return false, err - } - - lastAcceptedBlk, err := vm.getPostForkBlock(ctx, latestProBlkID) - if err != nil { - // Could not retrieve last accepted block. - return false, err - } - - _, err = vm.State.GetBlockIDAtHeight(lastAcceptedBlk.Height()) - if err != database.ErrNotFound { - return false, err - } - - // Index needs repairing. Mark the checkpoint so that, in case new blocks - // are accepted after the lock is released here but before indexing has - // started, we do not miss rebuilding the full index. - return true, vm.State.SetCheckpoint(latestProBlkID) -} - -// vm.ctx.Lock should be held -func (vm *VM) VerifyHeightIndex(context.Context) error { - if !vm.hIndexer.IsRepaired() { - return block.ErrIndexIncomplete - } - return nil -} - // vm.ctx.Lock should be held func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error) { - if !vm.hIndexer.IsRepaired() { - return ids.Empty, block.ErrIndexIncomplete - } - - // The indexer will only report that the index has been repaired if the - // underlying VM supports indexing. switch forkHeight, err := vm.State.GetForkHeight(); err { case nil: if height < forkHeight { @@ -85,32 +33,7 @@ func (vm *VM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, er } } -// As postFork blocks/options are accepted, height index is updated even if its -// repairing is ongoing. vm.ctx.Lock should be held func (vm *VM) updateHeightIndex(height uint64, blkID ids.ID) error { - _, err := vm.State.GetCheckpoint() - switch err { - case nil: - // Index rebuilding is ongoing. We can update the index with the current - // block. - - case database.ErrNotFound: - // No checkpoint means indexing has either not started or is already - // done. - if !vm.hIndexer.IsRepaired() { - return nil - } - - // Indexing must have finished. We can update the index with the current - // block. - - default: - return fmt.Errorf("failed to load index checkpoint: %w", err) - } - return vm.storeHeightEntry(height, blkID) -} - -func (vm *VM) storeHeightEntry(height uint64, blkID ids.ID) error { forkHeight, err := vm.State.GetForkHeight() switch err { case nil: diff --git a/vms/proposervm/indexer/block_server.go b/vms/proposervm/indexer/block_server.go deleted file mode 100644 index fcecaf9e9fc..00000000000 --- a/vms/proposervm/indexer/block_server.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package indexer - -import ( - "context" - - "github.com/ava-labs/avalanchego/database/versiondb" - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/consensus/snowman" -) - -// BlockServer represents all requests heightIndexer can issue -// against ProposerVM. All methods must be thread-safe. -type BlockServer interface { - versiondb.Commitable - - // Note: this is a contention heavy call that should be avoided - // for frequent/repeated indexer ops - GetFullPostForkBlock(ctx context.Context, blkID ids.ID) (snowman.Block, error) -} diff --git a/vms/proposervm/indexer/block_server_test.go b/vms/proposervm/indexer/block_server_test.go deleted file mode 100644 index a973d66a05a..00000000000 --- a/vms/proposervm/indexer/block_server_test.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package indexer - -import ( - "context" - "errors" - "testing" - - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/consensus/snowman" -) - -var ( - errGetWrappingBlk = errors.New("unexpectedly called GetWrappingBlk") - errCommit = errors.New("unexpectedly called Commit") - - _ BlockServer = (*TestBlockServer)(nil) -) - -// TestBatchedVM is a BatchedVM that is useful for testing. -type TestBlockServer struct { - T *testing.T - - CantGetFullPostForkBlock bool - CantCommit bool - - GetFullPostForkBlockF func(ctx context.Context, blkID ids.ID) (snowman.Block, error) - CommitF func() error -} - -func (tsb *TestBlockServer) GetFullPostForkBlock(ctx context.Context, blkID ids.ID) (snowman.Block, error) { - if tsb.GetFullPostForkBlockF != nil { - return tsb.GetFullPostForkBlockF(ctx, blkID) - } - if tsb.CantGetFullPostForkBlock && tsb.T != nil { - require.FailNow(tsb.T, errGetWrappingBlk.Error()) - } - return nil, errGetWrappingBlk -} - -func (tsb *TestBlockServer) Commit() error { - if tsb.CommitF != nil { - return tsb.CommitF() - } - if tsb.CantCommit && tsb.T != nil { - require.FailNow(tsb.T, errCommit.Error()) - } - return errCommit -} diff --git a/vms/proposervm/indexer/height_indexer.go b/vms/proposervm/indexer/height_indexer.go deleted file mode 100644 index c0a1e4155b3..00000000000 --- a/vms/proposervm/indexer/height_indexer.go +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package indexer - -import ( - "context" - "fmt" - "time" - - "go.uber.org/zap" - - "github.com/ava-labs/avalanchego/database" - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/utils" - "github.com/ava-labs/avalanchego/utils/logging" - "github.com/ava-labs/avalanchego/vms/proposervm/state" -) - -// default number of heights to index before committing -const ( - defaultCommitFrequency = 1024 - // Sleep [sleepDurationMultiplier]x (10x) the amount of time we spend - // processing the block to ensure the async indexing does not bottleneck the - // node. - sleepDurationMultiplier = 10 -) - -var _ HeightIndexer = (*heightIndexer)(nil) - -type HeightIndexer interface { - // Returns whether the height index is fully repaired. - IsRepaired() bool - - // MarkRepaired atomically sets the indexing repaired state. - MarkRepaired(isRepaired bool) - - // Resumes repairing of the height index from the checkpoint. - RepairHeightIndex(context.Context) error -} - -func NewHeightIndexer( - server BlockServer, - log logging.Logger, - indexState state.State, -) HeightIndexer { - return newHeightIndexer(server, log, indexState) -} - -func newHeightIndexer( - server BlockServer, - log logging.Logger, - indexState state.State, -) *heightIndexer { - return &heightIndexer{ - server: server, - log: log, - state: indexState, - commitFrequency: defaultCommitFrequency, - } -} - -type heightIndexer struct { - server BlockServer - log logging.Logger - - jobDone utils.Atomic[bool] - state state.State - - commitFrequency int -} - -func (hi *heightIndexer) IsRepaired() bool { - return hi.jobDone.Get() -} - -func (hi *heightIndexer) MarkRepaired(repaired bool) { - hi.jobDone.Set(repaired) -} - -// RepairHeightIndex ensures the height -> proBlkID height block index is well formed. -// Starting from the checkpoint, it will go back to snowman++ activation fork -// or genesis. PreFork blocks will be handled by innerVM height index. -// RepairHeightIndex can take a non-trivial time to complete; hence we make sure -// the process has limited memory footprint, can be resumed from periodic checkpoints -// and works asynchronously without blocking the VM. -func (hi *heightIndexer) RepairHeightIndex(ctx context.Context) error { - startBlkID, err := hi.state.GetCheckpoint() - if err == database.ErrNotFound { - hi.MarkRepaired(true) - return nil // nothing to do - } - if err != nil { - return err - } - - // retrieve checkpoint height. We explicitly track block height - // in doRepair to avoid heavier DB reads. - startBlk, err := hi.server.GetFullPostForkBlock(ctx, startBlkID) - if err != nil { - return err - } - - startHeight := startBlk.Height() - if err := hi.doRepair(ctx, startBlkID, startHeight); err != nil { - return fmt.Errorf("could not repair height index: %w", err) - } - if err := hi.flush(); err != nil { - return fmt.Errorf("could not write final height index update: %w", err) - } - return nil -} - -// if height index needs repairing, doRepair would do that. It -// iterates back via parents, checking and rebuilding height indexing. -// Note: batch commit is deferred to doRepair caller -func (hi *heightIndexer) doRepair(ctx context.Context, currentProBlkID ids.ID, lastIndexedHeight uint64) error { - var ( - start = time.Now() - lastLogTime = start - indexedBlks int - lastIndexedBlks int - ) - for { - if err := ctx.Err(); err != nil { - return err - } - - processingStart := time.Now() - currentAcceptedBlk, _, err := hi.state.GetBlock(currentProBlkID) - if err == database.ErrNotFound { - // We have visited all the proposerVM blocks. Because we previously - // verified that we needed to perform a repair, we know that this - // will not happen on the first iteration. This guarantees that - // forkHeight will be correctly initialized. - forkHeight := lastIndexedHeight + 1 - if err := hi.state.SetForkHeight(forkHeight); err != nil { - return err - } - if err := hi.state.DeleteCheckpoint(); err != nil { - return err - } - hi.MarkRepaired(true) - - // it will commit on exit - hi.log.Info("indexing finished", - zap.Int("numIndexedBlocks", indexedBlks), - zap.Duration("duration", time.Since(start)), - zap.Uint64("forkHeight", forkHeight), - ) - return nil - } - if err != nil { - return err - } - - // Keep memory footprint under control by committing when a size threshold is reached - if indexedBlks-lastIndexedBlks > hi.commitFrequency { - // Note: checkpoint must be the lowest block in the batch. This ensures that - // checkpoint is the highest un-indexed block from which process would restart. - if err := hi.state.SetCheckpoint(currentProBlkID); err != nil { - return err - } - - if err := hi.flush(); err != nil { - return err - } - - hi.log.Debug("indexed blocks", - zap.Int("numIndexBlocks", indexedBlks), - ) - lastIndexedBlks = indexedBlks - } - - // Rebuild height block index. - if err := hi.state.SetBlockIDAtHeight(lastIndexedHeight, currentProBlkID); err != nil { - return err - } - - // Periodically log progress - indexedBlks++ - now := time.Now() - if now.Sub(lastLogTime) > 15*time.Second { - lastLogTime = now - hi.log.Info("indexed blocks", - zap.Int("numIndexBlocks", indexedBlks), - zap.Uint64("lastIndexedHeight", lastIndexedHeight), - ) - } - - // keep checking the parent - currentProBlkID = currentAcceptedBlk.ParentID() - lastIndexedHeight-- - - processingDuration := time.Since(processingStart) - // Sleep [sleepDurationMultiplier]x (5x) the amount of time we spend processing the block - // to ensure the indexing does not bottleneck the node. - time.Sleep(processingDuration * sleepDurationMultiplier) - } -} - -// flush writes the commits to the underlying DB -func (hi *heightIndexer) flush() error { - if err := hi.state.Commit(); err != nil { - return err - } - return hi.server.Commit() -} diff --git a/vms/proposervm/indexer/height_indexer_test.go b/vms/proposervm/indexer/height_indexer_test.go deleted file mode 100644 index 2a093530048..00000000000 --- a/vms/proposervm/indexer/height_indexer_test.go +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package indexer - -import ( - "context" - "math/rand" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/database" - "github.com/ava-labs/avalanchego/database/memdb" - "github.com/ava-labs/avalanchego/database/versiondb" - "github.com/ava-labs/avalanchego/ids" - "github.com/ava-labs/avalanchego/snow/choices" - "github.com/ava-labs/avalanchego/snow/consensus/snowman" - "github.com/ava-labs/avalanchego/utils/logging" - "github.com/ava-labs/avalanchego/vms/proposervm/block" - "github.com/ava-labs/avalanchego/vms/proposervm/state" -) - -func TestHeightBlockIndexPostFork(t *testing.T) { - require := require.New(t) - - db := memdb.New() - vdb := versiondb.New(db) - storedState := state.New(vdb) - - // Build a chain of post fork blocks - var ( - blkNumber = uint64(10) - lastBlkID = ids.Empty.Prefix(0) // initially set to a dummyGenesisID - proBlks = make(map[ids.ID]snowman.Block) - ) - - for blkHeight := uint64(1); blkHeight <= blkNumber; blkHeight++ { - blockBytes := ids.Empty.Prefix(blkHeight + blkNumber + 1) - dummyTS := time.Time{} - dummyPCH := uint64(2022) - - // store postForkStatelessBlk in State ... - postForkStatelessBlk, err := block.BuildUnsigned( - lastBlkID, - dummyTS, - dummyPCH, - blockBytes[:], - ) - require.NoError(err) - require.NoError(storedState.PutBlock(postForkStatelessBlk, choices.Accepted)) - - // ... and create a corresponding test block just for block server - postForkBlk := &snowman.TestBlock{ - TestDecidable: choices.TestDecidable{ - IDV: postForkStatelessBlk.ID(), - StatusV: choices.Accepted, - }, - HeightV: blkHeight, - } - proBlks[postForkBlk.ID()] = postForkBlk - - lastBlkID = postForkStatelessBlk.ID() - } - - blkSrv := &TestBlockServer{ - CantGetFullPostForkBlock: true, - CantCommit: true, - - GetFullPostForkBlockF: func(_ context.Context, blkID ids.ID) (snowman.Block, error) { - blk, found := proBlks[blkID] - if !found { - return nil, database.ErrNotFound - } - return blk, nil - }, - CommitF: func() error { - return nil - }, - } - - hIndex := newHeightIndexer(blkSrv, - logging.NoLog{}, - storedState, - ) - hIndex.commitFrequency = 0 // commit each block - - // checkpoint last accepted block and show the whole chain in reindexed - require.NoError(hIndex.state.SetCheckpoint(lastBlkID)) - require.NoError(hIndex.RepairHeightIndex(context.Background())) - require.True(hIndex.IsRepaired()) - - // check that height index is fully built - loadedForkHeight, err := storedState.GetForkHeight() - require.NoError(err) - require.Equal(uint64(1), loadedForkHeight) - for height := uint64(1); height <= blkNumber; height++ { - _, err := storedState.GetBlockIDAtHeight(height) - require.NoError(err) - } -} - -func TestHeightBlockIndexAcrossFork(t *testing.T) { - require := require.New(t) - - db := memdb.New() - vdb := versiondb.New(db) - storedState := state.New(vdb) - - // Build a chain of post fork blocks - var ( - blkNumber = uint64(10) - forkHeight = blkNumber / 2 - lastBlkID = ids.Empty.Prefix(0) // initially set to a last pre fork blk - proBlks = make(map[ids.ID]snowman.Block) - ) - - for blkHeight := forkHeight; blkHeight <= blkNumber; blkHeight++ { - blockBytes := ids.Empty.Prefix(blkHeight + blkNumber + 1) - dummyTS := time.Time{} - dummyPCH := uint64(2022) - - // store postForkStatelessBlk in State ... - postForkStatelessBlk, err := block.BuildUnsigned( - lastBlkID, - dummyTS, - dummyPCH, - blockBytes[:], - ) - require.NoError(err) - require.NoError(storedState.PutBlock(postForkStatelessBlk, choices.Accepted)) - - // ... and create a corresponding test block just for block server - postForkBlk := &snowman.TestBlock{ - TestDecidable: choices.TestDecidable{ - IDV: postForkStatelessBlk.ID(), - StatusV: choices.Accepted, - }, - HeightV: blkHeight, - } - proBlks[postForkBlk.ID()] = postForkBlk - - lastBlkID = postForkStatelessBlk.ID() - } - - blkSrv := &TestBlockServer{ - CantGetFullPostForkBlock: true, - CantCommit: true, - - GetFullPostForkBlockF: func(_ context.Context, blkID ids.ID) (snowman.Block, error) { - blk, found := proBlks[blkID] - if !found { - return nil, database.ErrNotFound - } - return blk, nil - }, - CommitF: func() error { - return nil - }, - } - - hIndex := newHeightIndexer(blkSrv, - logging.NoLog{}, - storedState, - ) - hIndex.commitFrequency = 0 // commit each block - - // checkpoint last accepted block and show the whole chain in reindexed - require.NoError(hIndex.state.SetCheckpoint(lastBlkID)) - require.NoError(hIndex.RepairHeightIndex(context.Background())) - require.True(hIndex.IsRepaired()) - - // check that height index is fully built - loadedForkHeight, err := storedState.GetForkHeight() - require.NoError(err) - require.Equal(forkHeight, loadedForkHeight) - for height := uint64(0); height < forkHeight; height++ { - _, err := storedState.GetBlockIDAtHeight(height) - require.ErrorIs(err, database.ErrNotFound) - } - for height := forkHeight; height <= blkNumber; height++ { - _, err := storedState.GetBlockIDAtHeight(height) - require.NoError(err) - } -} - -func TestHeightBlockIndexResumeFromCheckPoint(t *testing.T) { - require := require.New(t) - - db := memdb.New() - vdb := versiondb.New(db) - storedState := state.New(vdb) - - // Build a chain of post fork blocks - var ( - blkNumber = uint64(10) - forkHeight = blkNumber / 2 - lastBlkID = ids.Empty.Prefix(0) // initially set to a last pre fork blk - proBlks = make(map[ids.ID]snowman.Block) - ) - - for blkHeight := forkHeight; blkHeight <= blkNumber; blkHeight++ { - blockBytes := ids.Empty.Prefix(blkHeight + blkNumber + 1) - dummyTS := time.Time{} - dummyPCH := uint64(2022) - - // store postForkStatelessBlk in State ... - postForkStatelessBlk, err := block.BuildUnsigned( - lastBlkID, - dummyTS, - dummyPCH, - blockBytes[:], - ) - require.NoError(err) - require.NoError(storedState.PutBlock(postForkStatelessBlk, choices.Accepted)) - - // ... and create a corresponding test block just for block server - postForkBlk := &snowman.TestBlock{ - TestDecidable: choices.TestDecidable{ - IDV: postForkStatelessBlk.ID(), - StatusV: choices.Accepted, - }, - HeightV: blkHeight, - } - proBlks[postForkBlk.ID()] = postForkBlk - - lastBlkID = postForkStatelessBlk.ID() - } - - blkSrv := &TestBlockServer{ - CantGetFullPostForkBlock: true, - CantCommit: true, - - GetFullPostForkBlockF: func(_ context.Context, blkID ids.ID) (snowman.Block, error) { - blk, found := proBlks[blkID] - if !found { - return nil, database.ErrNotFound - } - return blk, nil - }, - CommitF: func() error { - return nil - }, - } - - hIndex := newHeightIndexer(blkSrv, - logging.NoLog{}, - storedState, - ) - hIndex.commitFrequency = 0 // commit each block - - // pick a random block in the chain and checkpoint it;... - rndPostForkHeight := rand.Intn(int(blkNumber-forkHeight)) + int(forkHeight) // #nosec G404 - var checkpointBlk snowman.Block - for _, blk := range proBlks { - if blk.Height() != uint64(rndPostForkHeight) { - continue // not the blk we are looking for - } - - checkpointBlk = blk - require.NoError(hIndex.state.SetCheckpoint(checkpointBlk.ID())) - break - } - - // perform repair and show index is built - require.NoError(hIndex.RepairHeightIndex(context.Background())) - require.True(hIndex.IsRepaired()) - - // check that height index is fully built - loadedForkHeight, err := storedState.GetForkHeight() - require.NoError(err) - require.Equal(forkHeight, loadedForkHeight) - for height := forkHeight; height <= checkpointBlk.Height(); height++ { - _, err := storedState.GetBlockIDAtHeight(height) - require.NoError(err) - } -} diff --git a/vms/proposervm/state/block_height_index.go b/vms/proposervm/state/block_height_index.go index b60fca0c363..4a7ed4362c6 100644 --- a/vms/proposervm/state/block_height_index.go +++ b/vms/proposervm/state/block_height_index.go @@ -19,8 +19,7 @@ var ( heightPrefix = []byte("height") metadataPrefix = []byte("metadata") - forkKey = []byte("fork") - checkpointKey = []byte("checkpoint") + forkKey = []byte("fork") ) type HeightIndexGetter interface { @@ -40,23 +39,11 @@ type HeightIndexWriter interface { DeleteBlockIDAtHeight(height uint64) error } -// A checkpoint is the blockID of the next block to be considered -// for height indexing. We store checkpoints to be able to duly resume -// long-running re-indexing ops. -type HeightIndexBatchSupport interface { - versiondb.Commitable - - GetCheckpoint() (ids.ID, error) - SetCheckpoint(blkID ids.ID) error - DeleteCheckpoint() error -} - // HeightIndex contains mapping of blockHeights to accepted proposer block IDs // along with some metadata (fork height and checkpoint). type HeightIndex interface { HeightIndexWriter HeightIndexGetter - HeightIndexBatchSupport } type heightIndex struct { @@ -127,15 +114,3 @@ func (hi *heightIndex) GetForkHeight() (uint64, error) { func (hi *heightIndex) SetForkHeight(height uint64) error { return database.PutUInt64(hi.metadataDB, forkKey, height) } - -func (hi *heightIndex) GetCheckpoint() (ids.ID, error) { - return database.GetID(hi.metadataDB, checkpointKey) -} - -func (hi *heightIndex) SetCheckpoint(blkID ids.ID) error { - return database.PutID(hi.metadataDB, checkpointKey, blkID) -} - -func (hi *heightIndex) DeleteCheckpoint() error { - return hi.metadataDB.Delete(checkpointKey) -} diff --git a/vms/proposervm/state/mock_state.go b/vms/proposervm/state/mock_state.go index 6384528a61d..ce28025a93e 100644 --- a/vms/proposervm/state/mock_state.go +++ b/vms/proposervm/state/mock_state.go @@ -41,20 +41,6 @@ func (m *MockState) EXPECT() *MockStateMockRecorder { return m.recorder } -// Commit mocks base method. -func (m *MockState) Commit() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Commit") - ret0, _ := ret[0].(error) - return ret0 -} - -// Commit indicates an expected call of Commit. -func (mr *MockStateMockRecorder) Commit() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Commit", reflect.TypeOf((*MockState)(nil).Commit)) -} - // DeleteBlock mocks base method. func (m *MockState) DeleteBlock(arg0 ids.ID) error { m.ctrl.T.Helper() @@ -83,20 +69,6 @@ func (mr *MockStateMockRecorder) DeleteBlockIDAtHeight(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).DeleteBlockIDAtHeight), arg0) } -// DeleteCheckpoint mocks base method. -func (m *MockState) DeleteCheckpoint() error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteCheckpoint") - ret0, _ := ret[0].(error) - return ret0 -} - -// DeleteCheckpoint indicates an expected call of DeleteCheckpoint. -func (mr *MockStateMockRecorder) DeleteCheckpoint() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCheckpoint", reflect.TypeOf((*MockState)(nil).DeleteCheckpoint)) -} - // DeleteLastAccepted mocks base method. func (m *MockState) DeleteLastAccepted() error { m.ctrl.T.Helper() @@ -142,21 +114,6 @@ func (mr *MockStateMockRecorder) GetBlockIDAtHeight(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).GetBlockIDAtHeight), arg0) } -// GetCheckpoint mocks base method. -func (m *MockState) GetCheckpoint() (ids.ID, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetCheckpoint") - ret0, _ := ret[0].(ids.ID) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetCheckpoint indicates an expected call of GetCheckpoint. -func (mr *MockStateMockRecorder) GetCheckpoint() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCheckpoint", reflect.TypeOf((*MockState)(nil).GetCheckpoint)) -} - // GetForkHeight mocks base method. func (m *MockState) GetForkHeight() (uint64, error) { m.ctrl.T.Helper() @@ -230,20 +187,6 @@ func (mr *MockStateMockRecorder) SetBlockIDAtHeight(arg0, arg1 any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetBlockIDAtHeight", reflect.TypeOf((*MockState)(nil).SetBlockIDAtHeight), arg0, arg1) } -// SetCheckpoint mocks base method. -func (m *MockState) SetCheckpoint(arg0 ids.ID) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetCheckpoint", arg0) - ret0, _ := ret[0].(error) - return ret0 -} - -// SetCheckpoint indicates an expected call of SetCheckpoint. -func (mr *MockStateMockRecorder) SetCheckpoint(arg0 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetCheckpoint", reflect.TypeOf((*MockState)(nil).SetCheckpoint), arg0) -} - // SetForkHeight mocks base method. func (m *MockState) SetForkHeight(arg0 uint64) error { m.ctrl.T.Helper() diff --git a/vms/proposervm/state_syncable_vm.go b/vms/proposervm/state_syncable_vm.go index 08a321cab7b..12f61e05739 100644 --- a/vms/proposervm/state_syncable_vm.go +++ b/vms/proposervm/state_syncable_vm.go @@ -19,12 +19,6 @@ func (vm *VM) StateSyncEnabled(ctx context.Context) (bool, error) { return false, nil } - // if vm implements Snowman++, a block height index must be available - // to support state sync - if vm.VerifyHeightIndex(ctx) != nil { - return false, nil - } - return vm.ssVM.StateSyncEnabled(ctx) } @@ -100,12 +94,6 @@ func (vm *VM) GetStateSummary(ctx context.Context, height uint64) (block.StateSu // Note: building state summary requires a well formed height index. func (vm *VM) buildStateSummary(ctx context.Context, innerSummary block.StateSummary) (block.StateSummary, error) { - // if vm implements Snowman++, a block height index must be available - // to support state sync - if err := vm.VerifyHeightIndex(ctx); err != nil { - return nil, fmt.Errorf("could not build state summary: %w", err) - } - forkHeight, err := vm.GetForkHeight() switch err { case nil: diff --git a/vms/proposervm/state_syncable_vm_test.go b/vms/proposervm/state_syncable_vm_test.go index 0fa24de139d..d03f3c3d1c5 100644 --- a/vms/proposervm/state_syncable_vm_test.go +++ b/vms/proposervm/state_syncable_vm_test.go @@ -39,11 +39,6 @@ func helperBuildStateSyncTestObjects(t *testing.T) (*fullVM, *VM) { }, } - // signal height index is complete - innerVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } - // load innerVM expectations innerGenesisBlk := &snowman.TestBlock{ TestDecidable: choices.TestDecidable{ @@ -58,9 +53,6 @@ func helperBuildStateSyncTestObjects(t *testing.T) (*fullVM, *VM) { ) error { return nil } - innerVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } innerVM.LastAcceptedF = func(context.Context) (ids.ID, error) { return innerGenesisBlk.ID(), nil } @@ -109,7 +101,6 @@ func TestStateSyncEnabled(t *testing.T) { }() // ProposerVM State Sync disabled if innerVM State sync is disabled - vm.hIndexer.MarkRepaired(true) innerVM.StateSyncEnabledF = func(context.Context) (bool, error) { return false, nil } @@ -172,7 +163,6 @@ func TestStateSyncGetOngoingSyncStateSummary(t *testing.T) { require.Equal(innerSummary.Bytes(), summary.Bytes()) // Post fork summary case - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // store post fork block associated with summary @@ -257,7 +247,6 @@ func TestStateSyncGetLastStateSummary(t *testing.T) { require.Equal(innerSummary.Bytes(), summary.Bytes()) // Post fork summary case - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // store post fork block associated with summary @@ -345,7 +334,6 @@ func TestStateSyncGetStateSummary(t *testing.T) { require.Equal(innerSummary.Bytes(), summary.Bytes()) // Post fork summary case - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // store post fork block associated with summary @@ -418,7 +406,6 @@ func TestParseStateSummary(t *testing.T) { require.Equal(summary.Bytes(), parsedSummary.Bytes()) // Get a post fork block than parse it - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // store post fork block associated with summary @@ -477,7 +464,6 @@ func TestStateSummaryAccept(t *testing.T) { BytesV: []byte{'i', 'n', 'n', 'e', 'r'}, } - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // store post fork block associated with summary @@ -545,7 +531,6 @@ func TestStateSummaryAcceptOlderBlock(t *testing.T) { BytesV: []byte{'i', 'n', 'n', 'e', 'r'}, } - vm.hIndexer.MarkRepaired(true) require.NoError(vm.SetForkHeight(innerSummary.Height() - 1)) // Set the last accepted block height to be higher that the state summary @@ -598,54 +583,3 @@ func TestStateSummaryAcceptOlderBlock(t *testing.T) { require.NoError(err) require.Equal(block.StateSyncSkipped, status) } - -func TestNoStateSummariesServedWhileRepairingHeightIndex(t *testing.T) { - require := require.New(t) - - // Note: by default proVM is built such that heightIndex will be considered complete - var ( - activationTime = time.Unix(0, 0) - durangoTime = activationTime - ) - coreVM, _, proVM, _, _ := initTestProposerVM(t, activationTime, durangoTime, 0) - defer func() { - require.NoError(proVM.Shutdown(context.Background())) - }() - - require.NoError(proVM.VerifyHeightIndex(context.Background())) - - // let coreVM be always ready to serve summaries - summaryHeight := uint64(2022) - coreStateSummary := &block.TestStateSummary{ - T: t, - IDV: ids.ID{'a', 'a', 'a', 'a'}, - HeightV: summaryHeight, - BytesV: []byte{'c', 'o', 'r', 'e', 'S', 'u', 'm', 'm', 'a', 'r', 'y'}, - } - coreVM.GetLastStateSummaryF = func(context.Context) (block.StateSummary, error) { - return coreStateSummary, nil - } - coreVM.GetStateSummaryF = func(_ context.Context, height uint64) (block.StateSummary, error) { - require.Equal(summaryHeight, height) - return coreStateSummary, nil - } - - // set height index to reindexing - proVM.hIndexer.MarkRepaired(false) - err := proVM.VerifyHeightIndex(context.Background()) - require.ErrorIs(err, block.ErrIndexIncomplete) - - _, err = proVM.GetLastStateSummary(context.Background()) - require.ErrorIs(err, block.ErrIndexIncomplete) - - _, err = proVM.GetStateSummary(context.Background(), summaryHeight) - require.ErrorIs(err, block.ErrIndexIncomplete) - - // declare height index complete - proVM.hIndexer.MarkRepaired(true) - require.NoError(proVM.VerifyHeightIndex(context.Background())) - - summary, err := proVM.GetLastStateSummary(context.Background()) - require.NoError(err) - require.Equal(summaryHeight, summary.Height()) -} diff --git a/vms/proposervm/vm.go b/vms/proposervm/vm.go index d2add4c616a..f211f25e706 100644 --- a/vms/proposervm/vm.go +++ b/vms/proposervm/vm.go @@ -28,7 +28,6 @@ import ( "github.com/ava-labs/avalanchego/utils/math" "github.com/ava-labs/avalanchego/utils/timer/mockable" "github.com/ava-labs/avalanchego/utils/units" - "github.com/ava-labs/avalanchego/vms/proposervm/indexer" "github.com/ava-labs/avalanchego/vms/proposervm/proposer" "github.com/ava-labs/avalanchego/vms/proposervm/scheduler" "github.com/ava-labs/avalanchego/vms/proposervm/state" @@ -59,8 +58,6 @@ var ( fujiXChainID = ids.FromStringOrPanic("2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm") dbPrefix = []byte("proposervm") - - errHeightIndexInvalidWhilePruning = errors.New("height index invalid while pruning old blocks") ) func cachedBlockSize(_ ids.ID, blk snowman.Block) int { @@ -75,7 +72,6 @@ type VM struct { ssVM block.StateSyncableVM state.State - hIndexer indexer.HeightIndexer proposer.Windower tree.Tree @@ -177,10 +173,6 @@ func (vm *VM) Initialize( } vm.innerBlkCache = innerBlkCache - indexerDB := versiondb.New(vm.db) - indexerState := state.New(indexerDB) - vm.hIndexer = indexer.NewHeightIndexer(vm, vm.ctx.Log, indexerState) - scheduler, vmToEngine := scheduler.New(vm.ctx.Log, toEngine) vm.Scheduler = scheduler vm.toScheduler = vmToEngine @@ -210,7 +202,7 @@ func (vm *VM) Initialize( return err } - if err := vm.repair(detachedCtx); err != nil { + if err := vm.repairAcceptedChainByHeight(ctx); err != nil { return err } @@ -421,174 +413,6 @@ func (vm *VM) LastAccepted(ctx context.Context) (ids.ID, error) { return lastAccepted, err } -// repair makes sure that vm and innerVM chains are in sync. -// Moreover it fixes vm's height index if defined. -func (vm *VM) repair(ctx context.Context) error { - switch err := vm.ChainVM.VerifyHeightIndex(ctx); err { - case nil: - // InnerVM height index is complete. We can immediately verify - // and repair this VM height index. - shouldRepair, err := vm.shouldHeightIndexBeRepaired(ctx) - if err != nil { - return err - } - if !shouldRepair { - vm.ctx.Log.Info("block height index was successfully verified") - vm.hIndexer.MarkRepaired(true) - return vm.repairAcceptedChainByHeight(ctx) - } - case block.ErrIndexIncomplete: - default: - return err - } - - if vm.NumHistoricalBlocks != 0 { - vm.ctx.Log.Fatal("block height index must be valid when pruning historical blocks") - return errHeightIndexInvalidWhilePruning - } - - // innerVM height index is incomplete. Sync vm and innerVM chains first. - if err := vm.repairAcceptedChainByIteration(ctx); err != nil { - return err - } - - // asynchronously rebuild height index, if needed - go func() { - // Poll until the underlying chain's index is complete or shutdown is - // called. - ticker := time.NewTicker(checkIndexedFrequency) - defer ticker.Stop() - for { - // The underlying VM expects the lock to be held here. - vm.ctx.Lock.Lock() - err := vm.ChainVM.VerifyHeightIndex(ctx) - vm.ctx.Lock.Unlock() - - if err == nil { - // innerVM indexing complete. Let's re-index this VM - break - } - if err != block.ErrIndexIncomplete { - vm.ctx.Log.Error("block height indexing failed", - zap.Error(err), - ) - return - } - - // innerVM index is incomplete. Wait for completion and retry - select { - case <-vm.context.Done(): - return - case <-ticker.C: - } - } - - vm.ctx.Lock.Lock() - shouldRepair, err := vm.shouldHeightIndexBeRepaired(ctx) - vm.ctx.Lock.Unlock() - - if err != nil { - vm.ctx.Log.Error("could not verify height indexing status", - zap.Error(err), - ) - return - } - if !shouldRepair { - vm.ctx.Log.Info("block height indexing is already complete") - vm.hIndexer.MarkRepaired(true) - return - } - - err = vm.hIndexer.RepairHeightIndex(vm.context) - if err == nil { - vm.ctx.Log.Info("block height indexing finished") - return - } - - // Note that we don't check if `err` is `context.Canceled` here because - // repairing the height index may have returned a non-standard error - // due to the chain shutting down. - if vm.context.Err() == nil { - // The context wasn't closed, so the chain hasn't been shutdown. - // This must have been an unexpected error. - vm.ctx.Log.Error("block height indexing failed", - zap.Error(err), - ) - } - }() - return nil -} - -func (vm *VM) repairAcceptedChainByIteration(ctx context.Context) error { - lastAcceptedID, err := vm.GetLastAccepted() - if err == database.ErrNotFound { - // If the last accepted block isn't indexed yet, then the underlying - // chain is the only chain and there is nothing to repair. - return nil - } - if err != nil { - return err - } - - // Revert accepted blocks that weren't committed to the database. - for { - lastAccepted, err := vm.getPostForkBlock(ctx, lastAcceptedID) - if err == database.ErrNotFound { - // If the post fork block can't be found, it's because we're - // reverting past the fork boundary. If this is the case, then there - // is only one database to keep consistent, so there is nothing to - // repair anymore. - if err := vm.State.DeleteLastAccepted(); err != nil { - return err - } - if err := vm.State.DeleteCheckpoint(); err != nil { - return err - } - return vm.db.Commit() - } - if err != nil { - return err - } - - shouldBeAccepted := lastAccepted.getInnerBlk() - - // If the inner block is accepted, then we don't need to revert any more - // blocks. - if shouldBeAccepted.Status() == choices.Accepted { - return vm.db.Commit() - } - - // Mark the last accepted block as processing - rather than accepted. - lastAccepted.setStatus(choices.Processing) - if err := vm.State.PutBlock(lastAccepted.getStatelessBlk(), choices.Processing); err != nil { - return err - } - - // Advance to the parent block - previousLastAcceptedID := lastAcceptedID - lastAcceptedID = lastAccepted.Parent() - if err := vm.State.SetLastAccepted(lastAcceptedID); err != nil { - return err - } - - // If the indexer checkpoint was previously pointing to the last - // accepted block, roll it back to the new last accepted block. - checkpoint, err := vm.State.GetCheckpoint() - if err == database.ErrNotFound { - continue - } - if err != nil { - return err - } - if previousLastAcceptedID != checkpoint { - continue - } - if err := vm.State.SetCheckpoint(lastAcceptedID); err != nil { - return err - } - } -} - func (vm *VM) repairAcceptedChainByHeight(ctx context.Context) error { innerLastAcceptedID, err := vm.ChainVM.LastAccepted(ctx) if err != nil { diff --git a/vms/proposervm/vm_regression_test.go b/vms/proposervm/vm_regression_test.go deleted file mode 100644 index ac34df12064..00000000000 --- a/vms/proposervm/vm_regression_test.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved. -// See the file LICENSE for licensing terms. - -package proposervm - -import ( - "context" - "errors" - "testing" - "time" - - "github.com/stretchr/testify/require" - - "github.com/ava-labs/avalanchego/database" - "github.com/ava-labs/avalanchego/database/memdb" - "github.com/ava-labs/avalanchego/database/prefixdb" - "github.com/ava-labs/avalanchego/snow" - "github.com/ava-labs/avalanchego/snow/engine/common" - "github.com/ava-labs/avalanchego/snow/engine/snowman/block" - "github.com/ava-labs/avalanchego/snow/snowtest" -) - -func TestProposerVMInitializeShouldFailIfInnerVMCantVerifyItsHeightIndex(t *testing.T) { - require := require.New(t) - - innerVM := &fullVM{ - TestVM: &block.TestVM{ - TestVM: common.TestVM{ - T: t, - }, - }, - } - - // let innerVM fail verifying its height index with - // a non-special error (like block.ErrIndexIncomplete) - customError := errors.New("custom error") - innerVM.VerifyHeightIndexF = func(_ context.Context) error { - return customError - } - - innerVM.InitializeF = func(context.Context, *snow.Context, database.Database, - []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.AppSender, - ) error { - return nil - } - - proVM := New( - innerVM, - Config{ - ActivationTime: time.Unix(0, 0), - DurangoTime: time.Unix(0, 0), - MinimumPChainHeight: 0, - MinBlkDelay: DefaultMinBlockDelay, - NumHistoricalBlocks: DefaultNumHistoricalBlocks, - StakingLeafSigner: pTestSigner, - StakingCertLeaf: pTestCert, - }, - ) - - defer func() { - // avoids leaking goroutines - require.NoError(proVM.Shutdown(context.Background())) - }() - - ctx := snowtest.Context(t, snowtest.CChainID) - initialState := []byte("genesis state") - - err := proVM.Initialize( - context.Background(), - ctx, - prefixdb.New([]byte{}, memdb.New()), - initialState, - nil, - nil, - nil, - nil, - nil, - ) - require.ErrorIs(err, customError) -} diff --git a/vms/proposervm/vm_test.go b/vms/proposervm/vm_test.go index 9e6be32026c..ae47a33889a 100644 --- a/vms/proposervm/vm_test.go +++ b/vms/proposervm/vm_test.go @@ -190,11 +190,6 @@ func initTestProposerVM( db := prefixdb.New([]byte{0}, memdb.New()) - // signal height index is complete - coreVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } - require.NoError(proVM.Initialize( context.Background(), ctx, @@ -1000,9 +995,6 @@ func TestExpiredBuildBlock(t *testing.T) { toScheduler = toEngineChan return nil } - coreVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } // make sure that DBs are compressed correctly require.NoError(proVM.Initialize( @@ -1290,9 +1282,6 @@ func TestInnerVMRollback(t *testing.T) { ) error { return nil } - coreVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } db := memdb.New() @@ -1382,9 +1371,6 @@ func TestInnerVMRollback(t *testing.T) { // Restart the node and have the inner VM rollback state. require.NoError(proVM.Shutdown(context.Background())) coreBlk.StatusV = choices.Processing - coreVM.VerifyHeightIndexF = func(context.Context) error { - return nil - } proVM = New( coreVM, @@ -1856,9 +1842,6 @@ func TestRejectedHeightNotIndexed(t *testing.T) { TestVM: common.TestVM{ T: t, }, - VerifyHeightIndexF: func(context.Context) error { - return nil - }, GetBlockIDAtHeightF: func(_ context.Context, height uint64) (ids.ID, error) { if height >= uint64(len(coreHeights)) { return ids.ID{}, errTooHigh @@ -1968,14 +1951,6 @@ func TestRejectedHeightNotIndexed(t *testing.T) { require.NoError(proVM.SetPreference(context.Background(), coreGenBlk.IDV)) - ctx.Lock.Lock() - for proVM.VerifyHeightIndex(context.Background()) != nil { - ctx.Lock.Unlock() - time.Sleep(time.Millisecond) - ctx.Lock.Lock() - } - ctx.Lock.Unlock() - // create inner block X and outer block A xBlock := &snowman.TestBlock{ TestDecidable: choices.TestDecidable{ @@ -2066,9 +2041,6 @@ func TestRejectedOptionHeightNotIndexed(t *testing.T) { TestVM: common.TestVM{ T: t, }, - VerifyHeightIndexF: func(context.Context) error { - return nil - }, GetBlockIDAtHeightF: func(_ context.Context, height uint64) (ids.ID, error) { if height >= uint64(len(coreHeights)) { return ids.ID{}, errTooHigh @@ -2178,14 +2150,6 @@ func TestRejectedOptionHeightNotIndexed(t *testing.T) { require.NoError(proVM.SetPreference(context.Background(), coreGenBlk.IDV)) - ctx.Lock.Lock() - for proVM.VerifyHeightIndex(context.Background()) != nil { - ctx.Lock.Unlock() - time.Sleep(time.Millisecond) - ctx.Lock.Lock() - } - ctx.Lock.Unlock() - xBlockID := ids.GenerateTestID() xBlock := &TestOptionsBlock{ TestBlock: snowman.TestBlock{ @@ -2293,7 +2257,6 @@ func TestVMInnerBlkCache(t *testing.T) { gomock.Any(), gomock.Any(), ).Return(nil) - innerVM.EXPECT().VerifyHeightIndex(gomock.Any()).Return(nil) innerVM.EXPECT().Shutdown(gomock.Any()).Return(nil) { @@ -2534,7 +2497,6 @@ func TestVM_VerifyBlockWithContext(t *testing.T) { gomock.Any(), gomock.Any(), ).Return(nil) - innerVM.EXPECT().VerifyHeightIndex(gomock.Any()).Return(nil) innerVM.EXPECT().Shutdown(gomock.Any()).Return(nil) { @@ -2692,9 +2654,6 @@ func TestHistoricalBlockDeletion(t *testing.T) { } return nil, errUnknownBlock }, - VerifyHeightIndexF: func(context.Context) error { - return nil - }, GetBlockIDAtHeightF: func(_ context.Context, height uint64) (ids.ID, error) { if height >= uint64(len(acceptedBlocks)) { return ids.ID{}, errTooHigh @@ -2751,7 +2710,6 @@ func TestHistoricalBlockDeletion(t *testing.T) { require.NoError(proVM.SetState(context.Background(), snow.NormalOp)) require.NoError(proVM.SetPreference(context.Background(), lastAcceptedID)) - require.NoError(proVM.VerifyHeightIndex(context.Background())) issueBlock := func() { lastAcceptedBlock := acceptedBlocks[currentHeight] @@ -2852,7 +2810,6 @@ func TestHistoricalBlockDeletion(t *testing.T) { require.NoError(proVM.SetState(context.Background(), snow.NormalOp)) require.NoError(proVM.SetPreference(context.Background(), lastAcceptedID)) - require.NoError(proVM.VerifyHeightIndex(context.Background())) // Verify that old blocks were pruned during startup requireNumHeights(numHistoricalBlocks) @@ -2900,7 +2857,6 @@ func TestHistoricalBlockDeletion(t *testing.T) { require.NoError(proVM.SetState(context.Background(), snow.NormalOp)) require.NoError(proVM.SetPreference(context.Background(), lastAcceptedID)) - require.NoError(proVM.VerifyHeightIndex(context.Background())) // The height index shouldn't be modified at this point requireNumHeights(numHistoricalBlocks) diff --git a/vms/rpcchainvm/errors.go b/vms/rpcchainvm/errors.go index 4b434b51d42..37d043fe279 100644 --- a/vms/rpcchainvm/errors.go +++ b/vms/rpcchainvm/errors.go @@ -14,13 +14,11 @@ var ( errEnumToError = map[vmpb.Error]error{ vmpb.Error_ERROR_CLOSED: database.ErrClosed, vmpb.Error_ERROR_NOT_FOUND: database.ErrNotFound, - vmpb.Error_ERROR_HEIGHT_INDEX_INCOMPLETE: block.ErrIndexIncomplete, vmpb.Error_ERROR_STATE_SYNC_NOT_IMPLEMENTED: block.ErrStateSyncableVMNotImplemented, } errorToErrEnum = map[error]vmpb.Error{ database.ErrClosed: vmpb.Error_ERROR_CLOSED, database.ErrNotFound: vmpb.Error_ERROR_NOT_FOUND, - block.ErrIndexIncomplete: vmpb.Error_ERROR_HEIGHT_INDEX_INCOMPLETE, block.ErrStateSyncableVMNotImplemented: vmpb.Error_ERROR_STATE_SYNC_NOT_IMPLEMENTED, } ) diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index aa04477d62d..04a3c8fd308 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -667,14 +667,6 @@ func (vm *VMClient) batchedParseBlock(ctx context.Context, blksBytes [][]byte) ( return res, nil } -func (vm *VMClient) VerifyHeightIndex(ctx context.Context) error { - resp, err := vm.client.VerifyHeightIndex(ctx, &emptypb.Empty{}) - if err != nil { - return err - } - return errEnumToError[resp.Err] -} - func (vm *VMClient) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error) { resp, err := vm.client.GetBlockIDAtHeight( ctx, diff --git a/vms/rpcchainvm/vm_server.go b/vms/rpcchainvm/vm_server.go index 866c58a8584..96132792725 100644 --- a/vms/rpcchainvm/vm_server.go +++ b/vms/rpcchainvm/vm_server.go @@ -627,13 +627,6 @@ func (vm *VMServer) BatchedParseBlock( }, nil } -func (vm *VMServer) VerifyHeightIndex(ctx context.Context, _ *emptypb.Empty) (*vmpb.VerifyHeightIndexResponse, error) { - err := vm.vm.VerifyHeightIndex(ctx) - return &vmpb.VerifyHeightIndexResponse{ - Err: errorToErrEnum[err], - }, errorToRPCError(err) -} - func (vm *VMServer) GetBlockIDAtHeight( ctx context.Context, req *vmpb.GetBlockIDAtHeightRequest, diff --git a/vms/tracedvm/block_vm.go b/vms/tracedvm/block_vm.go index b32b3bcd459..13bb1a5d7b7 100644 --- a/vms/tracedvm/block_vm.go +++ b/vms/tracedvm/block_vm.go @@ -50,7 +50,6 @@ type blockVM struct { getAncestorsTag string batchedParseBlockTag string // HeightIndexedChainVM tags - verifyHeightIndexTag string getBlockIDAtHeightTag string // StateSyncableVM tags stateSyncEnabledTag string @@ -85,7 +84,6 @@ func NewBlockVM(vm block.ChainVM, name string, tracer trace.Tracer) block.ChainV buildBlockWithContextTag: name + ".buildBlockWithContext", getAncestorsTag: name + ".getAncestors", batchedParseBlockTag: name + ".batchedParseBlock", - verifyHeightIndexTag: name + ".verifyHeightIndex", getBlockIDAtHeightTag: name + ".getBlockIDAtHeight", stateSyncEnabledTag: name + ".stateSyncEnabled", getOngoingSyncStateSummaryTag: name + ".getOngoingSyncStateSummary", @@ -176,13 +174,6 @@ func (vm *blockVM) LastAccepted(ctx context.Context) (ids.ID, error) { return vm.ChainVM.LastAccepted(ctx) } -func (vm *blockVM) VerifyHeightIndex(ctx context.Context) error { - ctx, span := vm.tracer.Start(ctx, vm.verifyHeightIndexTag) - defer span.End() - - return vm.ChainVM.VerifyHeightIndex(ctx) -} - func (vm *blockVM) GetBlockIDAtHeight(ctx context.Context, height uint64) (ids.ID, error) { ctx, span := vm.tracer.Start(ctx, vm.getBlockIDAtHeightTag, oteltrace.WithAttributes( attribute.Int64("height", int64(height)),