github.com/MetalBlockchain/metalgo@v1.11.9/proto/pb/vm/vm_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc (unknown) 5 // source: vm/vm.proto 6 7 package vm 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 emptypb "google.golang.org/protobuf/types/known/emptypb" 15 ) 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the grpc package it is being compiled against. 19 // Requires gRPC-Go v1.32.0 or later. 20 const _ = grpc.SupportPackageIsVersion7 21 22 const ( 23 VM_Initialize_FullMethodName = "/vm.VM/Initialize" 24 VM_SetState_FullMethodName = "/vm.VM/SetState" 25 VM_Shutdown_FullMethodName = "/vm.VM/Shutdown" 26 VM_CreateHandlers_FullMethodName = "/vm.VM/CreateHandlers" 27 VM_Connected_FullMethodName = "/vm.VM/Connected" 28 VM_Disconnected_FullMethodName = "/vm.VM/Disconnected" 29 VM_BuildBlock_FullMethodName = "/vm.VM/BuildBlock" 30 VM_ParseBlock_FullMethodName = "/vm.VM/ParseBlock" 31 VM_GetBlock_FullMethodName = "/vm.VM/GetBlock" 32 VM_SetPreference_FullMethodName = "/vm.VM/SetPreference" 33 VM_Health_FullMethodName = "/vm.VM/Health" 34 VM_Version_FullMethodName = "/vm.VM/Version" 35 VM_AppRequest_FullMethodName = "/vm.VM/AppRequest" 36 VM_AppRequestFailed_FullMethodName = "/vm.VM/AppRequestFailed" 37 VM_AppResponse_FullMethodName = "/vm.VM/AppResponse" 38 VM_AppGossip_FullMethodName = "/vm.VM/AppGossip" 39 VM_Gather_FullMethodName = "/vm.VM/Gather" 40 VM_CrossChainAppRequest_FullMethodName = "/vm.VM/CrossChainAppRequest" 41 VM_CrossChainAppRequestFailed_FullMethodName = "/vm.VM/CrossChainAppRequestFailed" 42 VM_CrossChainAppResponse_FullMethodName = "/vm.VM/CrossChainAppResponse" 43 VM_GetAncestors_FullMethodName = "/vm.VM/GetAncestors" 44 VM_BatchedParseBlock_FullMethodName = "/vm.VM/BatchedParseBlock" 45 VM_GetBlockIDAtHeight_FullMethodName = "/vm.VM/GetBlockIDAtHeight" 46 VM_StateSyncEnabled_FullMethodName = "/vm.VM/StateSyncEnabled" 47 VM_GetOngoingSyncStateSummary_FullMethodName = "/vm.VM/GetOngoingSyncStateSummary" 48 VM_GetLastStateSummary_FullMethodName = "/vm.VM/GetLastStateSummary" 49 VM_ParseStateSummary_FullMethodName = "/vm.VM/ParseStateSummary" 50 VM_GetStateSummary_FullMethodName = "/vm.VM/GetStateSummary" 51 VM_BlockVerify_FullMethodName = "/vm.VM/BlockVerify" 52 VM_BlockAccept_FullMethodName = "/vm.VM/BlockAccept" 53 VM_BlockReject_FullMethodName = "/vm.VM/BlockReject" 54 VM_StateSummaryAccept_FullMethodName = "/vm.VM/StateSummaryAccept" 55 ) 56 57 // VMClient is the client API for VM service. 58 // 59 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 60 type VMClient interface { 61 // ChainVM 62 // 63 // Initialize this VM. 64 Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) 65 // SetState communicates to VM its next state it starts 66 SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) 67 // Shutdown is called when the node is shutting down. 68 Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) 69 // Creates the HTTP handlers for custom chain network calls. 70 CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) 71 Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 72 Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 73 // Attempt to create a new block from data contained in the VM. 74 BuildBlock(ctx context.Context, in *BuildBlockRequest, opts ...grpc.CallOption) (*BuildBlockResponse, error) 75 // Attempt to create a block from a stream of bytes. 76 ParseBlock(ctx context.Context, in *ParseBlockRequest, opts ...grpc.CallOption) (*ParseBlockResponse, error) 77 // Attempt to load a block. 78 GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) 79 // Notify the VM of the currently preferred block. 80 SetPreference(ctx context.Context, in *SetPreferenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 81 // Attempt to verify the health of the VM. 82 Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) 83 // Version returns the version of the VM. 84 Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) 85 // Notify this engine of a request for data from [nodeID]. 86 AppRequest(ctx context.Context, in *AppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 87 // Notify this engine that an AppRequest message it sent to [nodeID] with 88 // request ID [requestID] failed. 89 AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 90 // Notify this engine of a response to the AppRequest message it sent to 91 // [nodeID] with request ID [requestID]. 92 AppResponse(ctx context.Context, in *AppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 93 // Notify this engine of a gossip message from [nodeID]. 94 AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 95 // Attempts to gather metrics from a VM. 96 Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) 97 CrossChainAppRequest(ctx context.Context, in *CrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 98 CrossChainAppRequestFailed(ctx context.Context, in *CrossChainAppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 99 CrossChainAppResponse(ctx context.Context, in *CrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) 100 // BatchedChainVM 101 GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) 102 BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) 103 // HeightIndexedChainVM 104 GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) 105 // StateSyncableVM 106 // 107 // StateSyncEnabled indicates whether the state sync is enabled for this VM. 108 StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateSyncEnabledResponse, error) 109 // GetOngoingSyncStateSummary returns an in-progress state summary if it exists. 110 GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOngoingSyncStateSummaryResponse, error) 111 // GetLastStateSummary returns the latest state summary. 112 GetLastStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLastStateSummaryResponse, error) 113 // ParseStateSummary parses a state summary out of [summaryBytes]. 114 ParseStateSummary(ctx context.Context, in *ParseStateSummaryRequest, opts ...grpc.CallOption) (*ParseStateSummaryResponse, error) 115 // GetStateSummary retrieves the state summary that was generated at height 116 // [summaryHeight]. 117 GetStateSummary(ctx context.Context, in *GetStateSummaryRequest, opts ...grpc.CallOption) (*GetStateSummaryResponse, error) 118 // Block 119 BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts ...grpc.CallOption) (*BlockVerifyResponse, error) 120 BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 121 BlockReject(ctx context.Context, in *BlockRejectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 122 // StateSummary 123 StateSummaryAccept(ctx context.Context, in *StateSummaryAcceptRequest, opts ...grpc.CallOption) (*StateSummaryAcceptResponse, error) 124 } 125 126 type vMClient struct { 127 cc grpc.ClientConnInterface 128 } 129 130 func NewVMClient(cc grpc.ClientConnInterface) VMClient { 131 return &vMClient{cc} 132 } 133 134 func (c *vMClient) Initialize(ctx context.Context, in *InitializeRequest, opts ...grpc.CallOption) (*InitializeResponse, error) { 135 out := new(InitializeResponse) 136 err := c.cc.Invoke(ctx, VM_Initialize_FullMethodName, in, out, opts...) 137 if err != nil { 138 return nil, err 139 } 140 return out, nil 141 } 142 143 func (c *vMClient) SetState(ctx context.Context, in *SetStateRequest, opts ...grpc.CallOption) (*SetStateResponse, error) { 144 out := new(SetStateResponse) 145 err := c.cc.Invoke(ctx, VM_SetState_FullMethodName, in, out, opts...) 146 if err != nil { 147 return nil, err 148 } 149 return out, nil 150 } 151 152 func (c *vMClient) Shutdown(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) { 153 out := new(emptypb.Empty) 154 err := c.cc.Invoke(ctx, VM_Shutdown_FullMethodName, in, out, opts...) 155 if err != nil { 156 return nil, err 157 } 158 return out, nil 159 } 160 161 func (c *vMClient) CreateHandlers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*CreateHandlersResponse, error) { 162 out := new(CreateHandlersResponse) 163 err := c.cc.Invoke(ctx, VM_CreateHandlers_FullMethodName, in, out, opts...) 164 if err != nil { 165 return nil, err 166 } 167 return out, nil 168 } 169 170 func (c *vMClient) Connected(ctx context.Context, in *ConnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 171 out := new(emptypb.Empty) 172 err := c.cc.Invoke(ctx, VM_Connected_FullMethodName, in, out, opts...) 173 if err != nil { 174 return nil, err 175 } 176 return out, nil 177 } 178 179 func (c *vMClient) Disconnected(ctx context.Context, in *DisconnectedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 180 out := new(emptypb.Empty) 181 err := c.cc.Invoke(ctx, VM_Disconnected_FullMethodName, in, out, opts...) 182 if err != nil { 183 return nil, err 184 } 185 return out, nil 186 } 187 188 func (c *vMClient) BuildBlock(ctx context.Context, in *BuildBlockRequest, opts ...grpc.CallOption) (*BuildBlockResponse, error) { 189 out := new(BuildBlockResponse) 190 err := c.cc.Invoke(ctx, VM_BuildBlock_FullMethodName, in, out, opts...) 191 if err != nil { 192 return nil, err 193 } 194 return out, nil 195 } 196 197 func (c *vMClient) ParseBlock(ctx context.Context, in *ParseBlockRequest, opts ...grpc.CallOption) (*ParseBlockResponse, error) { 198 out := new(ParseBlockResponse) 199 err := c.cc.Invoke(ctx, VM_ParseBlock_FullMethodName, in, out, opts...) 200 if err != nil { 201 return nil, err 202 } 203 return out, nil 204 } 205 206 func (c *vMClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*GetBlockResponse, error) { 207 out := new(GetBlockResponse) 208 err := c.cc.Invoke(ctx, VM_GetBlock_FullMethodName, in, out, opts...) 209 if err != nil { 210 return nil, err 211 } 212 return out, nil 213 } 214 215 func (c *vMClient) SetPreference(ctx context.Context, in *SetPreferenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 216 out := new(emptypb.Empty) 217 err := c.cc.Invoke(ctx, VM_SetPreference_FullMethodName, in, out, opts...) 218 if err != nil { 219 return nil, err 220 } 221 return out, nil 222 } 223 224 func (c *vMClient) Health(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HealthResponse, error) { 225 out := new(HealthResponse) 226 err := c.cc.Invoke(ctx, VM_Health_FullMethodName, in, out, opts...) 227 if err != nil { 228 return nil, err 229 } 230 return out, nil 231 } 232 233 func (c *vMClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionResponse, error) { 234 out := new(VersionResponse) 235 err := c.cc.Invoke(ctx, VM_Version_FullMethodName, in, out, opts...) 236 if err != nil { 237 return nil, err 238 } 239 return out, nil 240 } 241 242 func (c *vMClient) AppRequest(ctx context.Context, in *AppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 243 out := new(emptypb.Empty) 244 err := c.cc.Invoke(ctx, VM_AppRequest_FullMethodName, in, out, opts...) 245 if err != nil { 246 return nil, err 247 } 248 return out, nil 249 } 250 251 func (c *vMClient) AppRequestFailed(ctx context.Context, in *AppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 252 out := new(emptypb.Empty) 253 err := c.cc.Invoke(ctx, VM_AppRequestFailed_FullMethodName, in, out, opts...) 254 if err != nil { 255 return nil, err 256 } 257 return out, nil 258 } 259 260 func (c *vMClient) AppResponse(ctx context.Context, in *AppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 261 out := new(emptypb.Empty) 262 err := c.cc.Invoke(ctx, VM_AppResponse_FullMethodName, in, out, opts...) 263 if err != nil { 264 return nil, err 265 } 266 return out, nil 267 } 268 269 func (c *vMClient) AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 270 out := new(emptypb.Empty) 271 err := c.cc.Invoke(ctx, VM_AppGossip_FullMethodName, in, out, opts...) 272 if err != nil { 273 return nil, err 274 } 275 return out, nil 276 } 277 278 func (c *vMClient) Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) { 279 out := new(GatherResponse) 280 err := c.cc.Invoke(ctx, VM_Gather_FullMethodName, in, out, opts...) 281 if err != nil { 282 return nil, err 283 } 284 return out, nil 285 } 286 287 func (c *vMClient) CrossChainAppRequest(ctx context.Context, in *CrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 288 out := new(emptypb.Empty) 289 err := c.cc.Invoke(ctx, VM_CrossChainAppRequest_FullMethodName, in, out, opts...) 290 if err != nil { 291 return nil, err 292 } 293 return out, nil 294 } 295 296 func (c *vMClient) CrossChainAppRequestFailed(ctx context.Context, in *CrossChainAppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 297 out := new(emptypb.Empty) 298 err := c.cc.Invoke(ctx, VM_CrossChainAppRequestFailed_FullMethodName, in, out, opts...) 299 if err != nil { 300 return nil, err 301 } 302 return out, nil 303 } 304 305 func (c *vMClient) CrossChainAppResponse(ctx context.Context, in *CrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { 306 out := new(emptypb.Empty) 307 err := c.cc.Invoke(ctx, VM_CrossChainAppResponse_FullMethodName, in, out, opts...) 308 if err != nil { 309 return nil, err 310 } 311 return out, nil 312 } 313 314 func (c *vMClient) GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) { 315 out := new(GetAncestorsResponse) 316 err := c.cc.Invoke(ctx, VM_GetAncestors_FullMethodName, in, out, opts...) 317 if err != nil { 318 return nil, err 319 } 320 return out, nil 321 } 322 323 func (c *vMClient) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) { 324 out := new(BatchedParseBlockResponse) 325 err := c.cc.Invoke(ctx, VM_BatchedParseBlock_FullMethodName, in, out, opts...) 326 if err != nil { 327 return nil, err 328 } 329 return out, nil 330 } 331 332 func (c *vMClient) GetBlockIDAtHeight(ctx context.Context, in *GetBlockIDAtHeightRequest, opts ...grpc.CallOption) (*GetBlockIDAtHeightResponse, error) { 333 out := new(GetBlockIDAtHeightResponse) 334 err := c.cc.Invoke(ctx, VM_GetBlockIDAtHeight_FullMethodName, in, out, opts...) 335 if err != nil { 336 return nil, err 337 } 338 return out, nil 339 } 340 341 func (c *vMClient) StateSyncEnabled(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*StateSyncEnabledResponse, error) { 342 out := new(StateSyncEnabledResponse) 343 err := c.cc.Invoke(ctx, VM_StateSyncEnabled_FullMethodName, in, out, opts...) 344 if err != nil { 345 return nil, err 346 } 347 return out, nil 348 } 349 350 func (c *vMClient) GetOngoingSyncStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOngoingSyncStateSummaryResponse, error) { 351 out := new(GetOngoingSyncStateSummaryResponse) 352 err := c.cc.Invoke(ctx, VM_GetOngoingSyncStateSummary_FullMethodName, in, out, opts...) 353 if err != nil { 354 return nil, err 355 } 356 return out, nil 357 } 358 359 func (c *vMClient) GetLastStateSummary(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetLastStateSummaryResponse, error) { 360 out := new(GetLastStateSummaryResponse) 361 err := c.cc.Invoke(ctx, VM_GetLastStateSummary_FullMethodName, in, out, opts...) 362 if err != nil { 363 return nil, err 364 } 365 return out, nil 366 } 367 368 func (c *vMClient) ParseStateSummary(ctx context.Context, in *ParseStateSummaryRequest, opts ...grpc.CallOption) (*ParseStateSummaryResponse, error) { 369 out := new(ParseStateSummaryResponse) 370 err := c.cc.Invoke(ctx, VM_ParseStateSummary_FullMethodName, in, out, opts...) 371 if err != nil { 372 return nil, err 373 } 374 return out, nil 375 } 376 377 func (c *vMClient) GetStateSummary(ctx context.Context, in *GetStateSummaryRequest, opts ...grpc.CallOption) (*GetStateSummaryResponse, error) { 378 out := new(GetStateSummaryResponse) 379 err := c.cc.Invoke(ctx, VM_GetStateSummary_FullMethodName, in, out, opts...) 380 if err != nil { 381 return nil, err 382 } 383 return out, nil 384 } 385 386 func (c *vMClient) BlockVerify(ctx context.Context, in *BlockVerifyRequest, opts ...grpc.CallOption) (*BlockVerifyResponse, error) { 387 out := new(BlockVerifyResponse) 388 err := c.cc.Invoke(ctx, VM_BlockVerify_FullMethodName, in, out, opts...) 389 if err != nil { 390 return nil, err 391 } 392 return out, nil 393 } 394 395 func (c *vMClient) BlockAccept(ctx context.Context, in *BlockAcceptRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 396 out := new(emptypb.Empty) 397 err := c.cc.Invoke(ctx, VM_BlockAccept_FullMethodName, in, out, opts...) 398 if err != nil { 399 return nil, err 400 } 401 return out, nil 402 } 403 404 func (c *vMClient) BlockReject(ctx context.Context, in *BlockRejectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 405 out := new(emptypb.Empty) 406 err := c.cc.Invoke(ctx, VM_BlockReject_FullMethodName, in, out, opts...) 407 if err != nil { 408 return nil, err 409 } 410 return out, nil 411 } 412 413 func (c *vMClient) StateSummaryAccept(ctx context.Context, in *StateSummaryAcceptRequest, opts ...grpc.CallOption) (*StateSummaryAcceptResponse, error) { 414 out := new(StateSummaryAcceptResponse) 415 err := c.cc.Invoke(ctx, VM_StateSummaryAccept_FullMethodName, in, out, opts...) 416 if err != nil { 417 return nil, err 418 } 419 return out, nil 420 } 421 422 // VMServer is the server API for VM service. 423 // All implementations must embed UnimplementedVMServer 424 // for forward compatibility 425 type VMServer interface { 426 // ChainVM 427 // 428 // Initialize this VM. 429 Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error) 430 // SetState communicates to VM its next state it starts 431 SetState(context.Context, *SetStateRequest) (*SetStateResponse, error) 432 // Shutdown is called when the node is shutting down. 433 Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) 434 // Creates the HTTP handlers for custom chain network calls. 435 CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) 436 Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) 437 Disconnected(context.Context, *DisconnectedRequest) (*emptypb.Empty, error) 438 // Attempt to create a new block from data contained in the VM. 439 BuildBlock(context.Context, *BuildBlockRequest) (*BuildBlockResponse, error) 440 // Attempt to create a block from a stream of bytes. 441 ParseBlock(context.Context, *ParseBlockRequest) (*ParseBlockResponse, error) 442 // Attempt to load a block. 443 GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) 444 // Notify the VM of the currently preferred block. 445 SetPreference(context.Context, *SetPreferenceRequest) (*emptypb.Empty, error) 446 // Attempt to verify the health of the VM. 447 Health(context.Context, *emptypb.Empty) (*HealthResponse, error) 448 // Version returns the version of the VM. 449 Version(context.Context, *emptypb.Empty) (*VersionResponse, error) 450 // Notify this engine of a request for data from [nodeID]. 451 AppRequest(context.Context, *AppRequestMsg) (*emptypb.Empty, error) 452 // Notify this engine that an AppRequest message it sent to [nodeID] with 453 // request ID [requestID] failed. 454 AppRequestFailed(context.Context, *AppRequestFailedMsg) (*emptypb.Empty, error) 455 // Notify this engine of a response to the AppRequest message it sent to 456 // [nodeID] with request ID [requestID]. 457 AppResponse(context.Context, *AppResponseMsg) (*emptypb.Empty, error) 458 // Notify this engine of a gossip message from [nodeID]. 459 AppGossip(context.Context, *AppGossipMsg) (*emptypb.Empty, error) 460 // Attempts to gather metrics from a VM. 461 Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) 462 CrossChainAppRequest(context.Context, *CrossChainAppRequestMsg) (*emptypb.Empty, error) 463 CrossChainAppRequestFailed(context.Context, *CrossChainAppRequestFailedMsg) (*emptypb.Empty, error) 464 CrossChainAppResponse(context.Context, *CrossChainAppResponseMsg) (*emptypb.Empty, error) 465 // BatchedChainVM 466 GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) 467 BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) 468 // HeightIndexedChainVM 469 GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) 470 // StateSyncableVM 471 // 472 // StateSyncEnabled indicates whether the state sync is enabled for this VM. 473 StateSyncEnabled(context.Context, *emptypb.Empty) (*StateSyncEnabledResponse, error) 474 // GetOngoingSyncStateSummary returns an in-progress state summary if it exists. 475 GetOngoingSyncStateSummary(context.Context, *emptypb.Empty) (*GetOngoingSyncStateSummaryResponse, error) 476 // GetLastStateSummary returns the latest state summary. 477 GetLastStateSummary(context.Context, *emptypb.Empty) (*GetLastStateSummaryResponse, error) 478 // ParseStateSummary parses a state summary out of [summaryBytes]. 479 ParseStateSummary(context.Context, *ParseStateSummaryRequest) (*ParseStateSummaryResponse, error) 480 // GetStateSummary retrieves the state summary that was generated at height 481 // [summaryHeight]. 482 GetStateSummary(context.Context, *GetStateSummaryRequest) (*GetStateSummaryResponse, error) 483 // Block 484 BlockVerify(context.Context, *BlockVerifyRequest) (*BlockVerifyResponse, error) 485 BlockAccept(context.Context, *BlockAcceptRequest) (*emptypb.Empty, error) 486 BlockReject(context.Context, *BlockRejectRequest) (*emptypb.Empty, error) 487 // StateSummary 488 StateSummaryAccept(context.Context, *StateSummaryAcceptRequest) (*StateSummaryAcceptResponse, error) 489 mustEmbedUnimplementedVMServer() 490 } 491 492 // UnimplementedVMServer must be embedded to have forward compatible implementations. 493 type UnimplementedVMServer struct { 494 } 495 496 func (UnimplementedVMServer) Initialize(context.Context, *InitializeRequest) (*InitializeResponse, error) { 497 return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented") 498 } 499 func (UnimplementedVMServer) SetState(context.Context, *SetStateRequest) (*SetStateResponse, error) { 500 return nil, status.Errorf(codes.Unimplemented, "method SetState not implemented") 501 } 502 func (UnimplementedVMServer) Shutdown(context.Context, *emptypb.Empty) (*emptypb.Empty, error) { 503 return nil, status.Errorf(codes.Unimplemented, "method Shutdown not implemented") 504 } 505 func (UnimplementedVMServer) CreateHandlers(context.Context, *emptypb.Empty) (*CreateHandlersResponse, error) { 506 return nil, status.Errorf(codes.Unimplemented, "method CreateHandlers not implemented") 507 } 508 func (UnimplementedVMServer) Connected(context.Context, *ConnectedRequest) (*emptypb.Empty, error) { 509 return nil, status.Errorf(codes.Unimplemented, "method Connected not implemented") 510 } 511 func (UnimplementedVMServer) Disconnected(context.Context, *DisconnectedRequest) (*emptypb.Empty, error) { 512 return nil, status.Errorf(codes.Unimplemented, "method Disconnected not implemented") 513 } 514 func (UnimplementedVMServer) BuildBlock(context.Context, *BuildBlockRequest) (*BuildBlockResponse, error) { 515 return nil, status.Errorf(codes.Unimplemented, "method BuildBlock not implemented") 516 } 517 func (UnimplementedVMServer) ParseBlock(context.Context, *ParseBlockRequest) (*ParseBlockResponse, error) { 518 return nil, status.Errorf(codes.Unimplemented, "method ParseBlock not implemented") 519 } 520 func (UnimplementedVMServer) GetBlock(context.Context, *GetBlockRequest) (*GetBlockResponse, error) { 521 return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented") 522 } 523 func (UnimplementedVMServer) SetPreference(context.Context, *SetPreferenceRequest) (*emptypb.Empty, error) { 524 return nil, status.Errorf(codes.Unimplemented, "method SetPreference not implemented") 525 } 526 func (UnimplementedVMServer) Health(context.Context, *emptypb.Empty) (*HealthResponse, error) { 527 return nil, status.Errorf(codes.Unimplemented, "method Health not implemented") 528 } 529 func (UnimplementedVMServer) Version(context.Context, *emptypb.Empty) (*VersionResponse, error) { 530 return nil, status.Errorf(codes.Unimplemented, "method Version not implemented") 531 } 532 func (UnimplementedVMServer) AppRequest(context.Context, *AppRequestMsg) (*emptypb.Empty, error) { 533 return nil, status.Errorf(codes.Unimplemented, "method AppRequest not implemented") 534 } 535 func (UnimplementedVMServer) AppRequestFailed(context.Context, *AppRequestFailedMsg) (*emptypb.Empty, error) { 536 return nil, status.Errorf(codes.Unimplemented, "method AppRequestFailed not implemented") 537 } 538 func (UnimplementedVMServer) AppResponse(context.Context, *AppResponseMsg) (*emptypb.Empty, error) { 539 return nil, status.Errorf(codes.Unimplemented, "method AppResponse not implemented") 540 } 541 func (UnimplementedVMServer) AppGossip(context.Context, *AppGossipMsg) (*emptypb.Empty, error) { 542 return nil, status.Errorf(codes.Unimplemented, "method AppGossip not implemented") 543 } 544 func (UnimplementedVMServer) Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) { 545 return nil, status.Errorf(codes.Unimplemented, "method Gather not implemented") 546 } 547 func (UnimplementedVMServer) CrossChainAppRequest(context.Context, *CrossChainAppRequestMsg) (*emptypb.Empty, error) { 548 return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppRequest not implemented") 549 } 550 func (UnimplementedVMServer) CrossChainAppRequestFailed(context.Context, *CrossChainAppRequestFailedMsg) (*emptypb.Empty, error) { 551 return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppRequestFailed not implemented") 552 } 553 func (UnimplementedVMServer) CrossChainAppResponse(context.Context, *CrossChainAppResponseMsg) (*emptypb.Empty, error) { 554 return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppResponse not implemented") 555 } 556 func (UnimplementedVMServer) GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) { 557 return nil, status.Errorf(codes.Unimplemented, "method GetAncestors not implemented") 558 } 559 func (UnimplementedVMServer) BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) { 560 return nil, status.Errorf(codes.Unimplemented, "method BatchedParseBlock not implemented") 561 } 562 func (UnimplementedVMServer) GetBlockIDAtHeight(context.Context, *GetBlockIDAtHeightRequest) (*GetBlockIDAtHeightResponse, error) { 563 return nil, status.Errorf(codes.Unimplemented, "method GetBlockIDAtHeight not implemented") 564 } 565 func (UnimplementedVMServer) StateSyncEnabled(context.Context, *emptypb.Empty) (*StateSyncEnabledResponse, error) { 566 return nil, status.Errorf(codes.Unimplemented, "method StateSyncEnabled not implemented") 567 } 568 func (UnimplementedVMServer) GetOngoingSyncStateSummary(context.Context, *emptypb.Empty) (*GetOngoingSyncStateSummaryResponse, error) { 569 return nil, status.Errorf(codes.Unimplemented, "method GetOngoingSyncStateSummary not implemented") 570 } 571 func (UnimplementedVMServer) GetLastStateSummary(context.Context, *emptypb.Empty) (*GetLastStateSummaryResponse, error) { 572 return nil, status.Errorf(codes.Unimplemented, "method GetLastStateSummary not implemented") 573 } 574 func (UnimplementedVMServer) ParseStateSummary(context.Context, *ParseStateSummaryRequest) (*ParseStateSummaryResponse, error) { 575 return nil, status.Errorf(codes.Unimplemented, "method ParseStateSummary not implemented") 576 } 577 func (UnimplementedVMServer) GetStateSummary(context.Context, *GetStateSummaryRequest) (*GetStateSummaryResponse, error) { 578 return nil, status.Errorf(codes.Unimplemented, "method GetStateSummary not implemented") 579 } 580 func (UnimplementedVMServer) BlockVerify(context.Context, *BlockVerifyRequest) (*BlockVerifyResponse, error) { 581 return nil, status.Errorf(codes.Unimplemented, "method BlockVerify not implemented") 582 } 583 func (UnimplementedVMServer) BlockAccept(context.Context, *BlockAcceptRequest) (*emptypb.Empty, error) { 584 return nil, status.Errorf(codes.Unimplemented, "method BlockAccept not implemented") 585 } 586 func (UnimplementedVMServer) BlockReject(context.Context, *BlockRejectRequest) (*emptypb.Empty, error) { 587 return nil, status.Errorf(codes.Unimplemented, "method BlockReject not implemented") 588 } 589 func (UnimplementedVMServer) StateSummaryAccept(context.Context, *StateSummaryAcceptRequest) (*StateSummaryAcceptResponse, error) { 590 return nil, status.Errorf(codes.Unimplemented, "method StateSummaryAccept not implemented") 591 } 592 func (UnimplementedVMServer) mustEmbedUnimplementedVMServer() {} 593 594 // UnsafeVMServer may be embedded to opt out of forward compatibility for this service. 595 // Use of this interface is not recommended, as added methods to VMServer will 596 // result in compilation errors. 597 type UnsafeVMServer interface { 598 mustEmbedUnimplementedVMServer() 599 } 600 601 func RegisterVMServer(s grpc.ServiceRegistrar, srv VMServer) { 602 s.RegisterService(&VM_ServiceDesc, srv) 603 } 604 605 func _VM_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 606 in := new(InitializeRequest) 607 if err := dec(in); err != nil { 608 return nil, err 609 } 610 if interceptor == nil { 611 return srv.(VMServer).Initialize(ctx, in) 612 } 613 info := &grpc.UnaryServerInfo{ 614 Server: srv, 615 FullMethod: VM_Initialize_FullMethodName, 616 } 617 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 618 return srv.(VMServer).Initialize(ctx, req.(*InitializeRequest)) 619 } 620 return interceptor(ctx, in, info, handler) 621 } 622 623 func _VM_SetState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 624 in := new(SetStateRequest) 625 if err := dec(in); err != nil { 626 return nil, err 627 } 628 if interceptor == nil { 629 return srv.(VMServer).SetState(ctx, in) 630 } 631 info := &grpc.UnaryServerInfo{ 632 Server: srv, 633 FullMethod: VM_SetState_FullMethodName, 634 } 635 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 636 return srv.(VMServer).SetState(ctx, req.(*SetStateRequest)) 637 } 638 return interceptor(ctx, in, info, handler) 639 } 640 641 func _VM_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 642 in := new(emptypb.Empty) 643 if err := dec(in); err != nil { 644 return nil, err 645 } 646 if interceptor == nil { 647 return srv.(VMServer).Shutdown(ctx, in) 648 } 649 info := &grpc.UnaryServerInfo{ 650 Server: srv, 651 FullMethod: VM_Shutdown_FullMethodName, 652 } 653 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 654 return srv.(VMServer).Shutdown(ctx, req.(*emptypb.Empty)) 655 } 656 return interceptor(ctx, in, info, handler) 657 } 658 659 func _VM_CreateHandlers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 660 in := new(emptypb.Empty) 661 if err := dec(in); err != nil { 662 return nil, err 663 } 664 if interceptor == nil { 665 return srv.(VMServer).CreateHandlers(ctx, in) 666 } 667 info := &grpc.UnaryServerInfo{ 668 Server: srv, 669 FullMethod: VM_CreateHandlers_FullMethodName, 670 } 671 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 672 return srv.(VMServer).CreateHandlers(ctx, req.(*emptypb.Empty)) 673 } 674 return interceptor(ctx, in, info, handler) 675 } 676 677 func _VM_Connected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 678 in := new(ConnectedRequest) 679 if err := dec(in); err != nil { 680 return nil, err 681 } 682 if interceptor == nil { 683 return srv.(VMServer).Connected(ctx, in) 684 } 685 info := &grpc.UnaryServerInfo{ 686 Server: srv, 687 FullMethod: VM_Connected_FullMethodName, 688 } 689 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 690 return srv.(VMServer).Connected(ctx, req.(*ConnectedRequest)) 691 } 692 return interceptor(ctx, in, info, handler) 693 } 694 695 func _VM_Disconnected_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 696 in := new(DisconnectedRequest) 697 if err := dec(in); err != nil { 698 return nil, err 699 } 700 if interceptor == nil { 701 return srv.(VMServer).Disconnected(ctx, in) 702 } 703 info := &grpc.UnaryServerInfo{ 704 Server: srv, 705 FullMethod: VM_Disconnected_FullMethodName, 706 } 707 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 708 return srv.(VMServer).Disconnected(ctx, req.(*DisconnectedRequest)) 709 } 710 return interceptor(ctx, in, info, handler) 711 } 712 713 func _VM_BuildBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 714 in := new(BuildBlockRequest) 715 if err := dec(in); err != nil { 716 return nil, err 717 } 718 if interceptor == nil { 719 return srv.(VMServer).BuildBlock(ctx, in) 720 } 721 info := &grpc.UnaryServerInfo{ 722 Server: srv, 723 FullMethod: VM_BuildBlock_FullMethodName, 724 } 725 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 726 return srv.(VMServer).BuildBlock(ctx, req.(*BuildBlockRequest)) 727 } 728 return interceptor(ctx, in, info, handler) 729 } 730 731 func _VM_ParseBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 732 in := new(ParseBlockRequest) 733 if err := dec(in); err != nil { 734 return nil, err 735 } 736 if interceptor == nil { 737 return srv.(VMServer).ParseBlock(ctx, in) 738 } 739 info := &grpc.UnaryServerInfo{ 740 Server: srv, 741 FullMethod: VM_ParseBlock_FullMethodName, 742 } 743 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 744 return srv.(VMServer).ParseBlock(ctx, req.(*ParseBlockRequest)) 745 } 746 return interceptor(ctx, in, info, handler) 747 } 748 749 func _VM_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 750 in := new(GetBlockRequest) 751 if err := dec(in); err != nil { 752 return nil, err 753 } 754 if interceptor == nil { 755 return srv.(VMServer).GetBlock(ctx, in) 756 } 757 info := &grpc.UnaryServerInfo{ 758 Server: srv, 759 FullMethod: VM_GetBlock_FullMethodName, 760 } 761 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 762 return srv.(VMServer).GetBlock(ctx, req.(*GetBlockRequest)) 763 } 764 return interceptor(ctx, in, info, handler) 765 } 766 767 func _VM_SetPreference_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 768 in := new(SetPreferenceRequest) 769 if err := dec(in); err != nil { 770 return nil, err 771 } 772 if interceptor == nil { 773 return srv.(VMServer).SetPreference(ctx, in) 774 } 775 info := &grpc.UnaryServerInfo{ 776 Server: srv, 777 FullMethod: VM_SetPreference_FullMethodName, 778 } 779 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 780 return srv.(VMServer).SetPreference(ctx, req.(*SetPreferenceRequest)) 781 } 782 return interceptor(ctx, in, info, handler) 783 } 784 785 func _VM_Health_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 786 in := new(emptypb.Empty) 787 if err := dec(in); err != nil { 788 return nil, err 789 } 790 if interceptor == nil { 791 return srv.(VMServer).Health(ctx, in) 792 } 793 info := &grpc.UnaryServerInfo{ 794 Server: srv, 795 FullMethod: VM_Health_FullMethodName, 796 } 797 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 798 return srv.(VMServer).Health(ctx, req.(*emptypb.Empty)) 799 } 800 return interceptor(ctx, in, info, handler) 801 } 802 803 func _VM_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 804 in := new(emptypb.Empty) 805 if err := dec(in); err != nil { 806 return nil, err 807 } 808 if interceptor == nil { 809 return srv.(VMServer).Version(ctx, in) 810 } 811 info := &grpc.UnaryServerInfo{ 812 Server: srv, 813 FullMethod: VM_Version_FullMethodName, 814 } 815 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 816 return srv.(VMServer).Version(ctx, req.(*emptypb.Empty)) 817 } 818 return interceptor(ctx, in, info, handler) 819 } 820 821 func _VM_AppRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 822 in := new(AppRequestMsg) 823 if err := dec(in); err != nil { 824 return nil, err 825 } 826 if interceptor == nil { 827 return srv.(VMServer).AppRequest(ctx, in) 828 } 829 info := &grpc.UnaryServerInfo{ 830 Server: srv, 831 FullMethod: VM_AppRequest_FullMethodName, 832 } 833 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 834 return srv.(VMServer).AppRequest(ctx, req.(*AppRequestMsg)) 835 } 836 return interceptor(ctx, in, info, handler) 837 } 838 839 func _VM_AppRequestFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 840 in := new(AppRequestFailedMsg) 841 if err := dec(in); err != nil { 842 return nil, err 843 } 844 if interceptor == nil { 845 return srv.(VMServer).AppRequestFailed(ctx, in) 846 } 847 info := &grpc.UnaryServerInfo{ 848 Server: srv, 849 FullMethod: VM_AppRequestFailed_FullMethodName, 850 } 851 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 852 return srv.(VMServer).AppRequestFailed(ctx, req.(*AppRequestFailedMsg)) 853 } 854 return interceptor(ctx, in, info, handler) 855 } 856 857 func _VM_AppResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 858 in := new(AppResponseMsg) 859 if err := dec(in); err != nil { 860 return nil, err 861 } 862 if interceptor == nil { 863 return srv.(VMServer).AppResponse(ctx, in) 864 } 865 info := &grpc.UnaryServerInfo{ 866 Server: srv, 867 FullMethod: VM_AppResponse_FullMethodName, 868 } 869 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 870 return srv.(VMServer).AppResponse(ctx, req.(*AppResponseMsg)) 871 } 872 return interceptor(ctx, in, info, handler) 873 } 874 875 func _VM_AppGossip_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 876 in := new(AppGossipMsg) 877 if err := dec(in); err != nil { 878 return nil, err 879 } 880 if interceptor == nil { 881 return srv.(VMServer).AppGossip(ctx, in) 882 } 883 info := &grpc.UnaryServerInfo{ 884 Server: srv, 885 FullMethod: VM_AppGossip_FullMethodName, 886 } 887 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 888 return srv.(VMServer).AppGossip(ctx, req.(*AppGossipMsg)) 889 } 890 return interceptor(ctx, in, info, handler) 891 } 892 893 func _VM_Gather_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 894 in := new(emptypb.Empty) 895 if err := dec(in); err != nil { 896 return nil, err 897 } 898 if interceptor == nil { 899 return srv.(VMServer).Gather(ctx, in) 900 } 901 info := &grpc.UnaryServerInfo{ 902 Server: srv, 903 FullMethod: VM_Gather_FullMethodName, 904 } 905 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 906 return srv.(VMServer).Gather(ctx, req.(*emptypb.Empty)) 907 } 908 return interceptor(ctx, in, info, handler) 909 } 910 911 func _VM_CrossChainAppRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 912 in := new(CrossChainAppRequestMsg) 913 if err := dec(in); err != nil { 914 return nil, err 915 } 916 if interceptor == nil { 917 return srv.(VMServer).CrossChainAppRequest(ctx, in) 918 } 919 info := &grpc.UnaryServerInfo{ 920 Server: srv, 921 FullMethod: VM_CrossChainAppRequest_FullMethodName, 922 } 923 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 924 return srv.(VMServer).CrossChainAppRequest(ctx, req.(*CrossChainAppRequestMsg)) 925 } 926 return interceptor(ctx, in, info, handler) 927 } 928 929 func _VM_CrossChainAppRequestFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 930 in := new(CrossChainAppRequestFailedMsg) 931 if err := dec(in); err != nil { 932 return nil, err 933 } 934 if interceptor == nil { 935 return srv.(VMServer).CrossChainAppRequestFailed(ctx, in) 936 } 937 info := &grpc.UnaryServerInfo{ 938 Server: srv, 939 FullMethod: VM_CrossChainAppRequestFailed_FullMethodName, 940 } 941 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 942 return srv.(VMServer).CrossChainAppRequestFailed(ctx, req.(*CrossChainAppRequestFailedMsg)) 943 } 944 return interceptor(ctx, in, info, handler) 945 } 946 947 func _VM_CrossChainAppResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 948 in := new(CrossChainAppResponseMsg) 949 if err := dec(in); err != nil { 950 return nil, err 951 } 952 if interceptor == nil { 953 return srv.(VMServer).CrossChainAppResponse(ctx, in) 954 } 955 info := &grpc.UnaryServerInfo{ 956 Server: srv, 957 FullMethod: VM_CrossChainAppResponse_FullMethodName, 958 } 959 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 960 return srv.(VMServer).CrossChainAppResponse(ctx, req.(*CrossChainAppResponseMsg)) 961 } 962 return interceptor(ctx, in, info, handler) 963 } 964 965 func _VM_GetAncestors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 966 in := new(GetAncestorsRequest) 967 if err := dec(in); err != nil { 968 return nil, err 969 } 970 if interceptor == nil { 971 return srv.(VMServer).GetAncestors(ctx, in) 972 } 973 info := &grpc.UnaryServerInfo{ 974 Server: srv, 975 FullMethod: VM_GetAncestors_FullMethodName, 976 } 977 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 978 return srv.(VMServer).GetAncestors(ctx, req.(*GetAncestorsRequest)) 979 } 980 return interceptor(ctx, in, info, handler) 981 } 982 983 func _VM_BatchedParseBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 984 in := new(BatchedParseBlockRequest) 985 if err := dec(in); err != nil { 986 return nil, err 987 } 988 if interceptor == nil { 989 return srv.(VMServer).BatchedParseBlock(ctx, in) 990 } 991 info := &grpc.UnaryServerInfo{ 992 Server: srv, 993 FullMethod: VM_BatchedParseBlock_FullMethodName, 994 } 995 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 996 return srv.(VMServer).BatchedParseBlock(ctx, req.(*BatchedParseBlockRequest)) 997 } 998 return interceptor(ctx, in, info, handler) 999 } 1000 1001 func _VM_GetBlockIDAtHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1002 in := new(GetBlockIDAtHeightRequest) 1003 if err := dec(in); err != nil { 1004 return nil, err 1005 } 1006 if interceptor == nil { 1007 return srv.(VMServer).GetBlockIDAtHeight(ctx, in) 1008 } 1009 info := &grpc.UnaryServerInfo{ 1010 Server: srv, 1011 FullMethod: VM_GetBlockIDAtHeight_FullMethodName, 1012 } 1013 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1014 return srv.(VMServer).GetBlockIDAtHeight(ctx, req.(*GetBlockIDAtHeightRequest)) 1015 } 1016 return interceptor(ctx, in, info, handler) 1017 } 1018 1019 func _VM_StateSyncEnabled_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1020 in := new(emptypb.Empty) 1021 if err := dec(in); err != nil { 1022 return nil, err 1023 } 1024 if interceptor == nil { 1025 return srv.(VMServer).StateSyncEnabled(ctx, in) 1026 } 1027 info := &grpc.UnaryServerInfo{ 1028 Server: srv, 1029 FullMethod: VM_StateSyncEnabled_FullMethodName, 1030 } 1031 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1032 return srv.(VMServer).StateSyncEnabled(ctx, req.(*emptypb.Empty)) 1033 } 1034 return interceptor(ctx, in, info, handler) 1035 } 1036 1037 func _VM_GetOngoingSyncStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1038 in := new(emptypb.Empty) 1039 if err := dec(in); err != nil { 1040 return nil, err 1041 } 1042 if interceptor == nil { 1043 return srv.(VMServer).GetOngoingSyncStateSummary(ctx, in) 1044 } 1045 info := &grpc.UnaryServerInfo{ 1046 Server: srv, 1047 FullMethod: VM_GetOngoingSyncStateSummary_FullMethodName, 1048 } 1049 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1050 return srv.(VMServer).GetOngoingSyncStateSummary(ctx, req.(*emptypb.Empty)) 1051 } 1052 return interceptor(ctx, in, info, handler) 1053 } 1054 1055 func _VM_GetLastStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1056 in := new(emptypb.Empty) 1057 if err := dec(in); err != nil { 1058 return nil, err 1059 } 1060 if interceptor == nil { 1061 return srv.(VMServer).GetLastStateSummary(ctx, in) 1062 } 1063 info := &grpc.UnaryServerInfo{ 1064 Server: srv, 1065 FullMethod: VM_GetLastStateSummary_FullMethodName, 1066 } 1067 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1068 return srv.(VMServer).GetLastStateSummary(ctx, req.(*emptypb.Empty)) 1069 } 1070 return interceptor(ctx, in, info, handler) 1071 } 1072 1073 func _VM_ParseStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1074 in := new(ParseStateSummaryRequest) 1075 if err := dec(in); err != nil { 1076 return nil, err 1077 } 1078 if interceptor == nil { 1079 return srv.(VMServer).ParseStateSummary(ctx, in) 1080 } 1081 info := &grpc.UnaryServerInfo{ 1082 Server: srv, 1083 FullMethod: VM_ParseStateSummary_FullMethodName, 1084 } 1085 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1086 return srv.(VMServer).ParseStateSummary(ctx, req.(*ParseStateSummaryRequest)) 1087 } 1088 return interceptor(ctx, in, info, handler) 1089 } 1090 1091 func _VM_GetStateSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1092 in := new(GetStateSummaryRequest) 1093 if err := dec(in); err != nil { 1094 return nil, err 1095 } 1096 if interceptor == nil { 1097 return srv.(VMServer).GetStateSummary(ctx, in) 1098 } 1099 info := &grpc.UnaryServerInfo{ 1100 Server: srv, 1101 FullMethod: VM_GetStateSummary_FullMethodName, 1102 } 1103 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1104 return srv.(VMServer).GetStateSummary(ctx, req.(*GetStateSummaryRequest)) 1105 } 1106 return interceptor(ctx, in, info, handler) 1107 } 1108 1109 func _VM_BlockVerify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1110 in := new(BlockVerifyRequest) 1111 if err := dec(in); err != nil { 1112 return nil, err 1113 } 1114 if interceptor == nil { 1115 return srv.(VMServer).BlockVerify(ctx, in) 1116 } 1117 info := &grpc.UnaryServerInfo{ 1118 Server: srv, 1119 FullMethod: VM_BlockVerify_FullMethodName, 1120 } 1121 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1122 return srv.(VMServer).BlockVerify(ctx, req.(*BlockVerifyRequest)) 1123 } 1124 return interceptor(ctx, in, info, handler) 1125 } 1126 1127 func _VM_BlockAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1128 in := new(BlockAcceptRequest) 1129 if err := dec(in); err != nil { 1130 return nil, err 1131 } 1132 if interceptor == nil { 1133 return srv.(VMServer).BlockAccept(ctx, in) 1134 } 1135 info := &grpc.UnaryServerInfo{ 1136 Server: srv, 1137 FullMethod: VM_BlockAccept_FullMethodName, 1138 } 1139 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1140 return srv.(VMServer).BlockAccept(ctx, req.(*BlockAcceptRequest)) 1141 } 1142 return interceptor(ctx, in, info, handler) 1143 } 1144 1145 func _VM_BlockReject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1146 in := new(BlockRejectRequest) 1147 if err := dec(in); err != nil { 1148 return nil, err 1149 } 1150 if interceptor == nil { 1151 return srv.(VMServer).BlockReject(ctx, in) 1152 } 1153 info := &grpc.UnaryServerInfo{ 1154 Server: srv, 1155 FullMethod: VM_BlockReject_FullMethodName, 1156 } 1157 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1158 return srv.(VMServer).BlockReject(ctx, req.(*BlockRejectRequest)) 1159 } 1160 return interceptor(ctx, in, info, handler) 1161 } 1162 1163 func _VM_StateSummaryAccept_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 1164 in := new(StateSummaryAcceptRequest) 1165 if err := dec(in); err != nil { 1166 return nil, err 1167 } 1168 if interceptor == nil { 1169 return srv.(VMServer).StateSummaryAccept(ctx, in) 1170 } 1171 info := &grpc.UnaryServerInfo{ 1172 Server: srv, 1173 FullMethod: VM_StateSummaryAccept_FullMethodName, 1174 } 1175 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 1176 return srv.(VMServer).StateSummaryAccept(ctx, req.(*StateSummaryAcceptRequest)) 1177 } 1178 return interceptor(ctx, in, info, handler) 1179 } 1180 1181 // VM_ServiceDesc is the grpc.ServiceDesc for VM service. 1182 // It's only intended for direct use with grpc.RegisterService, 1183 // and not to be introspected or modified (even as a copy) 1184 var VM_ServiceDesc = grpc.ServiceDesc{ 1185 ServiceName: "vm.VM", 1186 HandlerType: (*VMServer)(nil), 1187 Methods: []grpc.MethodDesc{ 1188 { 1189 MethodName: "Initialize", 1190 Handler: _VM_Initialize_Handler, 1191 }, 1192 { 1193 MethodName: "SetState", 1194 Handler: _VM_SetState_Handler, 1195 }, 1196 { 1197 MethodName: "Shutdown", 1198 Handler: _VM_Shutdown_Handler, 1199 }, 1200 { 1201 MethodName: "CreateHandlers", 1202 Handler: _VM_CreateHandlers_Handler, 1203 }, 1204 { 1205 MethodName: "Connected", 1206 Handler: _VM_Connected_Handler, 1207 }, 1208 { 1209 MethodName: "Disconnected", 1210 Handler: _VM_Disconnected_Handler, 1211 }, 1212 { 1213 MethodName: "BuildBlock", 1214 Handler: _VM_BuildBlock_Handler, 1215 }, 1216 { 1217 MethodName: "ParseBlock", 1218 Handler: _VM_ParseBlock_Handler, 1219 }, 1220 { 1221 MethodName: "GetBlock", 1222 Handler: _VM_GetBlock_Handler, 1223 }, 1224 { 1225 MethodName: "SetPreference", 1226 Handler: _VM_SetPreference_Handler, 1227 }, 1228 { 1229 MethodName: "Health", 1230 Handler: _VM_Health_Handler, 1231 }, 1232 { 1233 MethodName: "Version", 1234 Handler: _VM_Version_Handler, 1235 }, 1236 { 1237 MethodName: "AppRequest", 1238 Handler: _VM_AppRequest_Handler, 1239 }, 1240 { 1241 MethodName: "AppRequestFailed", 1242 Handler: _VM_AppRequestFailed_Handler, 1243 }, 1244 { 1245 MethodName: "AppResponse", 1246 Handler: _VM_AppResponse_Handler, 1247 }, 1248 { 1249 MethodName: "AppGossip", 1250 Handler: _VM_AppGossip_Handler, 1251 }, 1252 { 1253 MethodName: "Gather", 1254 Handler: _VM_Gather_Handler, 1255 }, 1256 { 1257 MethodName: "CrossChainAppRequest", 1258 Handler: _VM_CrossChainAppRequest_Handler, 1259 }, 1260 { 1261 MethodName: "CrossChainAppRequestFailed", 1262 Handler: _VM_CrossChainAppRequestFailed_Handler, 1263 }, 1264 { 1265 MethodName: "CrossChainAppResponse", 1266 Handler: _VM_CrossChainAppResponse_Handler, 1267 }, 1268 { 1269 MethodName: "GetAncestors", 1270 Handler: _VM_GetAncestors_Handler, 1271 }, 1272 { 1273 MethodName: "BatchedParseBlock", 1274 Handler: _VM_BatchedParseBlock_Handler, 1275 }, 1276 { 1277 MethodName: "GetBlockIDAtHeight", 1278 Handler: _VM_GetBlockIDAtHeight_Handler, 1279 }, 1280 { 1281 MethodName: "StateSyncEnabled", 1282 Handler: _VM_StateSyncEnabled_Handler, 1283 }, 1284 { 1285 MethodName: "GetOngoingSyncStateSummary", 1286 Handler: _VM_GetOngoingSyncStateSummary_Handler, 1287 }, 1288 { 1289 MethodName: "GetLastStateSummary", 1290 Handler: _VM_GetLastStateSummary_Handler, 1291 }, 1292 { 1293 MethodName: "ParseStateSummary", 1294 Handler: _VM_ParseStateSummary_Handler, 1295 }, 1296 { 1297 MethodName: "GetStateSummary", 1298 Handler: _VM_GetStateSummary_Handler, 1299 }, 1300 { 1301 MethodName: "BlockVerify", 1302 Handler: _VM_BlockVerify_Handler, 1303 }, 1304 { 1305 MethodName: "BlockAccept", 1306 Handler: _VM_BlockAccept_Handler, 1307 }, 1308 { 1309 MethodName: "BlockReject", 1310 Handler: _VM_BlockReject_Handler, 1311 }, 1312 { 1313 MethodName: "StateSummaryAccept", 1314 Handler: _VM_StateSummaryAccept_Handler, 1315 }, 1316 }, 1317 Streams: []grpc.StreamDesc{}, 1318 Metadata: "vm/vm.proto", 1319 }