github.com/ledgerwatch/erigon-lib@v1.0.0/gointerfaces/execution/execution_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             v4.24.2
     5  // source: execution/execution.proto
     6  
     7  package execution
     8  
     9  import (
    10  	context "context"
    11  	types "github.com/ledgerwatch/erigon-lib/gointerfaces/types"
    12  	grpc "google.golang.org/grpc"
    13  	codes "google.golang.org/grpc/codes"
    14  	status "google.golang.org/grpc/status"
    15  	emptypb "google.golang.org/protobuf/types/known/emptypb"
    16  )
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the grpc package it is being compiled against.
    20  // Requires gRPC-Go v1.32.0 or later.
    21  const _ = grpc.SupportPackageIsVersion7
    22  
    23  const (
    24  	Execution_InsertBlocks_FullMethodName        = "/execution.Execution/InsertBlocks"
    25  	Execution_ValidateChain_FullMethodName       = "/execution.Execution/ValidateChain"
    26  	Execution_UpdateForkChoice_FullMethodName    = "/execution.Execution/UpdateForkChoice"
    27  	Execution_AssembleBlock_FullMethodName       = "/execution.Execution/AssembleBlock"
    28  	Execution_GetAssembledBlock_FullMethodName   = "/execution.Execution/GetAssembledBlock"
    29  	Execution_CurrentHeader_FullMethodName       = "/execution.Execution/CurrentHeader"
    30  	Execution_GetTD_FullMethodName               = "/execution.Execution/GetTD"
    31  	Execution_GetHeader_FullMethodName           = "/execution.Execution/GetHeader"
    32  	Execution_GetBody_FullMethodName             = "/execution.Execution/GetBody"
    33  	Execution_GetBodiesByRange_FullMethodName    = "/execution.Execution/GetBodiesByRange"
    34  	Execution_GetBodiesByHashes_FullMethodName   = "/execution.Execution/GetBodiesByHashes"
    35  	Execution_IsCanonicalHash_FullMethodName     = "/execution.Execution/IsCanonicalHash"
    36  	Execution_GetHeaderHashNumber_FullMethodName = "/execution.Execution/GetHeaderHashNumber"
    37  	Execution_GetForkChoice_FullMethodName       = "/execution.Execution/GetForkChoice"
    38  	Execution_Ready_FullMethodName               = "/execution.Execution/Ready"
    39  )
    40  
    41  // ExecutionClient is the client API for Execution service.
    42  //
    43  // 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.
    44  type ExecutionClient interface {
    45  	// Chain Putters.
    46  	InsertBlocks(ctx context.Context, in *InsertBlocksRequest, opts ...grpc.CallOption) (*InsertionResult, error)
    47  	// Chain Validation and ForkChoice.
    48  	ValidateChain(ctx context.Context, in *ValidationRequest, opts ...grpc.CallOption) (*ValidationReceipt, error)
    49  	UpdateForkChoice(ctx context.Context, in *ForkChoice, opts ...grpc.CallOption) (*ForkChoiceReceipt, error)
    50  	// Block Assembly
    51  	// EAGAIN design here, AssembleBlock initiates the asynchronous request, and GetAssembleBlock just return it if ready.
    52  	AssembleBlock(ctx context.Context, in *AssembleBlockRequest, opts ...grpc.CallOption) (*AssembleBlockResponse, error)
    53  	GetAssembledBlock(ctx context.Context, in *GetAssembledBlockRequest, opts ...grpc.CallOption) (*GetAssembledBlockResponse, error)
    54  	// Chain Getters.
    55  	CurrentHeader(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHeaderResponse, error)
    56  	GetTD(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetTDResponse, error)
    57  	GetHeader(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetHeaderResponse, error)
    58  	GetBody(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetBodyResponse, error)
    59  	// Ranges
    60  	GetBodiesByRange(ctx context.Context, in *GetBodiesByRangeRequest, opts ...grpc.CallOption) (*GetBodiesBatchResponse, error)
    61  	GetBodiesByHashes(ctx context.Context, in *GetBodiesByHashesRequest, opts ...grpc.CallOption) (*GetBodiesBatchResponse, error)
    62  	// Chain checkers
    63  	IsCanonicalHash(ctx context.Context, in *types.H256, opts ...grpc.CallOption) (*IsCanonicalResponse, error)
    64  	GetHeaderHashNumber(ctx context.Context, in *types.H256, opts ...grpc.CallOption) (*GetHeaderHashNumberResponse, error)
    65  	GetForkChoice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ForkChoice, error)
    66  	// Misc
    67  	// We want to figure out whether we processed snapshots and cleanup sync cycles.
    68  	Ready(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyResponse, error)
    69  }
    70  
    71  type executionClient struct {
    72  	cc grpc.ClientConnInterface
    73  }
    74  
    75  func NewExecutionClient(cc grpc.ClientConnInterface) ExecutionClient {
    76  	return &executionClient{cc}
    77  }
    78  
    79  func (c *executionClient) InsertBlocks(ctx context.Context, in *InsertBlocksRequest, opts ...grpc.CallOption) (*InsertionResult, error) {
    80  	out := new(InsertionResult)
    81  	err := c.cc.Invoke(ctx, Execution_InsertBlocks_FullMethodName, in, out, opts...)
    82  	if err != nil {
    83  		return nil, err
    84  	}
    85  	return out, nil
    86  }
    87  
    88  func (c *executionClient) ValidateChain(ctx context.Context, in *ValidationRequest, opts ...grpc.CallOption) (*ValidationReceipt, error) {
    89  	out := new(ValidationReceipt)
    90  	err := c.cc.Invoke(ctx, Execution_ValidateChain_FullMethodName, in, out, opts...)
    91  	if err != nil {
    92  		return nil, err
    93  	}
    94  	return out, nil
    95  }
    96  
    97  func (c *executionClient) UpdateForkChoice(ctx context.Context, in *ForkChoice, opts ...grpc.CallOption) (*ForkChoiceReceipt, error) {
    98  	out := new(ForkChoiceReceipt)
    99  	err := c.cc.Invoke(ctx, Execution_UpdateForkChoice_FullMethodName, in, out, opts...)
   100  	if err != nil {
   101  		return nil, err
   102  	}
   103  	return out, nil
   104  }
   105  
   106  func (c *executionClient) AssembleBlock(ctx context.Context, in *AssembleBlockRequest, opts ...grpc.CallOption) (*AssembleBlockResponse, error) {
   107  	out := new(AssembleBlockResponse)
   108  	err := c.cc.Invoke(ctx, Execution_AssembleBlock_FullMethodName, in, out, opts...)
   109  	if err != nil {
   110  		return nil, err
   111  	}
   112  	return out, nil
   113  }
   114  
   115  func (c *executionClient) GetAssembledBlock(ctx context.Context, in *GetAssembledBlockRequest, opts ...grpc.CallOption) (*GetAssembledBlockResponse, error) {
   116  	out := new(GetAssembledBlockResponse)
   117  	err := c.cc.Invoke(ctx, Execution_GetAssembledBlock_FullMethodName, in, out, opts...)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return out, nil
   122  }
   123  
   124  func (c *executionClient) CurrentHeader(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetHeaderResponse, error) {
   125  	out := new(GetHeaderResponse)
   126  	err := c.cc.Invoke(ctx, Execution_CurrentHeader_FullMethodName, in, out, opts...)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	return out, nil
   131  }
   132  
   133  func (c *executionClient) GetTD(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetTDResponse, error) {
   134  	out := new(GetTDResponse)
   135  	err := c.cc.Invoke(ctx, Execution_GetTD_FullMethodName, in, out, opts...)
   136  	if err != nil {
   137  		return nil, err
   138  	}
   139  	return out, nil
   140  }
   141  
   142  func (c *executionClient) GetHeader(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetHeaderResponse, error) {
   143  	out := new(GetHeaderResponse)
   144  	err := c.cc.Invoke(ctx, Execution_GetHeader_FullMethodName, in, out, opts...)
   145  	if err != nil {
   146  		return nil, err
   147  	}
   148  	return out, nil
   149  }
   150  
   151  func (c *executionClient) GetBody(ctx context.Context, in *GetSegmentRequest, opts ...grpc.CallOption) (*GetBodyResponse, error) {
   152  	out := new(GetBodyResponse)
   153  	err := c.cc.Invoke(ctx, Execution_GetBody_FullMethodName, in, out, opts...)
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  	return out, nil
   158  }
   159  
   160  func (c *executionClient) GetBodiesByRange(ctx context.Context, in *GetBodiesByRangeRequest, opts ...grpc.CallOption) (*GetBodiesBatchResponse, error) {
   161  	out := new(GetBodiesBatchResponse)
   162  	err := c.cc.Invoke(ctx, Execution_GetBodiesByRange_FullMethodName, in, out, opts...)
   163  	if err != nil {
   164  		return nil, err
   165  	}
   166  	return out, nil
   167  }
   168  
   169  func (c *executionClient) GetBodiesByHashes(ctx context.Context, in *GetBodiesByHashesRequest, opts ...grpc.CallOption) (*GetBodiesBatchResponse, error) {
   170  	out := new(GetBodiesBatchResponse)
   171  	err := c.cc.Invoke(ctx, Execution_GetBodiesByHashes_FullMethodName, in, out, opts...)
   172  	if err != nil {
   173  		return nil, err
   174  	}
   175  	return out, nil
   176  }
   177  
   178  func (c *executionClient) IsCanonicalHash(ctx context.Context, in *types.H256, opts ...grpc.CallOption) (*IsCanonicalResponse, error) {
   179  	out := new(IsCanonicalResponse)
   180  	err := c.cc.Invoke(ctx, Execution_IsCanonicalHash_FullMethodName, in, out, opts...)
   181  	if err != nil {
   182  		return nil, err
   183  	}
   184  	return out, nil
   185  }
   186  
   187  func (c *executionClient) GetHeaderHashNumber(ctx context.Context, in *types.H256, opts ...grpc.CallOption) (*GetHeaderHashNumberResponse, error) {
   188  	out := new(GetHeaderHashNumberResponse)
   189  	err := c.cc.Invoke(ctx, Execution_GetHeaderHashNumber_FullMethodName, in, out, opts...)
   190  	if err != nil {
   191  		return nil, err
   192  	}
   193  	return out, nil
   194  }
   195  
   196  func (c *executionClient) GetForkChoice(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ForkChoice, error) {
   197  	out := new(ForkChoice)
   198  	err := c.cc.Invoke(ctx, Execution_GetForkChoice_FullMethodName, in, out, opts...)
   199  	if err != nil {
   200  		return nil, err
   201  	}
   202  	return out, nil
   203  }
   204  
   205  func (c *executionClient) Ready(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadyResponse, error) {
   206  	out := new(ReadyResponse)
   207  	err := c.cc.Invoke(ctx, Execution_Ready_FullMethodName, in, out, opts...)
   208  	if err != nil {
   209  		return nil, err
   210  	}
   211  	return out, nil
   212  }
   213  
   214  // ExecutionServer is the server API for Execution service.
   215  // All implementations must embed UnimplementedExecutionServer
   216  // for forward compatibility
   217  type ExecutionServer interface {
   218  	// Chain Putters.
   219  	InsertBlocks(context.Context, *InsertBlocksRequest) (*InsertionResult, error)
   220  	// Chain Validation and ForkChoice.
   221  	ValidateChain(context.Context, *ValidationRequest) (*ValidationReceipt, error)
   222  	UpdateForkChoice(context.Context, *ForkChoice) (*ForkChoiceReceipt, error)
   223  	// Block Assembly
   224  	// EAGAIN design here, AssembleBlock initiates the asynchronous request, and GetAssembleBlock just return it if ready.
   225  	AssembleBlock(context.Context, *AssembleBlockRequest) (*AssembleBlockResponse, error)
   226  	GetAssembledBlock(context.Context, *GetAssembledBlockRequest) (*GetAssembledBlockResponse, error)
   227  	// Chain Getters.
   228  	CurrentHeader(context.Context, *emptypb.Empty) (*GetHeaderResponse, error)
   229  	GetTD(context.Context, *GetSegmentRequest) (*GetTDResponse, error)
   230  	GetHeader(context.Context, *GetSegmentRequest) (*GetHeaderResponse, error)
   231  	GetBody(context.Context, *GetSegmentRequest) (*GetBodyResponse, error)
   232  	// Ranges
   233  	GetBodiesByRange(context.Context, *GetBodiesByRangeRequest) (*GetBodiesBatchResponse, error)
   234  	GetBodiesByHashes(context.Context, *GetBodiesByHashesRequest) (*GetBodiesBatchResponse, error)
   235  	// Chain checkers
   236  	IsCanonicalHash(context.Context, *types.H256) (*IsCanonicalResponse, error)
   237  	GetHeaderHashNumber(context.Context, *types.H256) (*GetHeaderHashNumberResponse, error)
   238  	GetForkChoice(context.Context, *emptypb.Empty) (*ForkChoice, error)
   239  	// Misc
   240  	// We want to figure out whether we processed snapshots and cleanup sync cycles.
   241  	Ready(context.Context, *emptypb.Empty) (*ReadyResponse, error)
   242  	mustEmbedUnimplementedExecutionServer()
   243  }
   244  
   245  // UnimplementedExecutionServer must be embedded to have forward compatible implementations.
   246  type UnimplementedExecutionServer struct {
   247  }
   248  
   249  func (UnimplementedExecutionServer) InsertBlocks(context.Context, *InsertBlocksRequest) (*InsertionResult, error) {
   250  	return nil, status.Errorf(codes.Unimplemented, "method InsertBlocks not implemented")
   251  }
   252  func (UnimplementedExecutionServer) ValidateChain(context.Context, *ValidationRequest) (*ValidationReceipt, error) {
   253  	return nil, status.Errorf(codes.Unimplemented, "method ValidateChain not implemented")
   254  }
   255  func (UnimplementedExecutionServer) UpdateForkChoice(context.Context, *ForkChoice) (*ForkChoiceReceipt, error) {
   256  	return nil, status.Errorf(codes.Unimplemented, "method UpdateForkChoice not implemented")
   257  }
   258  func (UnimplementedExecutionServer) AssembleBlock(context.Context, *AssembleBlockRequest) (*AssembleBlockResponse, error) {
   259  	return nil, status.Errorf(codes.Unimplemented, "method AssembleBlock not implemented")
   260  }
   261  func (UnimplementedExecutionServer) GetAssembledBlock(context.Context, *GetAssembledBlockRequest) (*GetAssembledBlockResponse, error) {
   262  	return nil, status.Errorf(codes.Unimplemented, "method GetAssembledBlock not implemented")
   263  }
   264  func (UnimplementedExecutionServer) CurrentHeader(context.Context, *emptypb.Empty) (*GetHeaderResponse, error) {
   265  	return nil, status.Errorf(codes.Unimplemented, "method CurrentHeader not implemented")
   266  }
   267  func (UnimplementedExecutionServer) GetTD(context.Context, *GetSegmentRequest) (*GetTDResponse, error) {
   268  	return nil, status.Errorf(codes.Unimplemented, "method GetTD not implemented")
   269  }
   270  func (UnimplementedExecutionServer) GetHeader(context.Context, *GetSegmentRequest) (*GetHeaderResponse, error) {
   271  	return nil, status.Errorf(codes.Unimplemented, "method GetHeader not implemented")
   272  }
   273  func (UnimplementedExecutionServer) GetBody(context.Context, *GetSegmentRequest) (*GetBodyResponse, error) {
   274  	return nil, status.Errorf(codes.Unimplemented, "method GetBody not implemented")
   275  }
   276  func (UnimplementedExecutionServer) GetBodiesByRange(context.Context, *GetBodiesByRangeRequest) (*GetBodiesBatchResponse, error) {
   277  	return nil, status.Errorf(codes.Unimplemented, "method GetBodiesByRange not implemented")
   278  }
   279  func (UnimplementedExecutionServer) GetBodiesByHashes(context.Context, *GetBodiesByHashesRequest) (*GetBodiesBatchResponse, error) {
   280  	return nil, status.Errorf(codes.Unimplemented, "method GetBodiesByHashes not implemented")
   281  }
   282  func (UnimplementedExecutionServer) IsCanonicalHash(context.Context, *types.H256) (*IsCanonicalResponse, error) {
   283  	return nil, status.Errorf(codes.Unimplemented, "method IsCanonicalHash not implemented")
   284  }
   285  func (UnimplementedExecutionServer) GetHeaderHashNumber(context.Context, *types.H256) (*GetHeaderHashNumberResponse, error) {
   286  	return nil, status.Errorf(codes.Unimplemented, "method GetHeaderHashNumber not implemented")
   287  }
   288  func (UnimplementedExecutionServer) GetForkChoice(context.Context, *emptypb.Empty) (*ForkChoice, error) {
   289  	return nil, status.Errorf(codes.Unimplemented, "method GetForkChoice not implemented")
   290  }
   291  func (UnimplementedExecutionServer) Ready(context.Context, *emptypb.Empty) (*ReadyResponse, error) {
   292  	return nil, status.Errorf(codes.Unimplemented, "method Ready not implemented")
   293  }
   294  func (UnimplementedExecutionServer) mustEmbedUnimplementedExecutionServer() {}
   295  
   296  // UnsafeExecutionServer may be embedded to opt out of forward compatibility for this service.
   297  // Use of this interface is not recommended, as added methods to ExecutionServer will
   298  // result in compilation errors.
   299  type UnsafeExecutionServer interface {
   300  	mustEmbedUnimplementedExecutionServer()
   301  }
   302  
   303  func RegisterExecutionServer(s grpc.ServiceRegistrar, srv ExecutionServer) {
   304  	s.RegisterService(&Execution_ServiceDesc, srv)
   305  }
   306  
   307  func _Execution_InsertBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   308  	in := new(InsertBlocksRequest)
   309  	if err := dec(in); err != nil {
   310  		return nil, err
   311  	}
   312  	if interceptor == nil {
   313  		return srv.(ExecutionServer).InsertBlocks(ctx, in)
   314  	}
   315  	info := &grpc.UnaryServerInfo{
   316  		Server:     srv,
   317  		FullMethod: Execution_InsertBlocks_FullMethodName,
   318  	}
   319  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   320  		return srv.(ExecutionServer).InsertBlocks(ctx, req.(*InsertBlocksRequest))
   321  	}
   322  	return interceptor(ctx, in, info, handler)
   323  }
   324  
   325  func _Execution_ValidateChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   326  	in := new(ValidationRequest)
   327  	if err := dec(in); err != nil {
   328  		return nil, err
   329  	}
   330  	if interceptor == nil {
   331  		return srv.(ExecutionServer).ValidateChain(ctx, in)
   332  	}
   333  	info := &grpc.UnaryServerInfo{
   334  		Server:     srv,
   335  		FullMethod: Execution_ValidateChain_FullMethodName,
   336  	}
   337  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   338  		return srv.(ExecutionServer).ValidateChain(ctx, req.(*ValidationRequest))
   339  	}
   340  	return interceptor(ctx, in, info, handler)
   341  }
   342  
   343  func _Execution_UpdateForkChoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   344  	in := new(ForkChoice)
   345  	if err := dec(in); err != nil {
   346  		return nil, err
   347  	}
   348  	if interceptor == nil {
   349  		return srv.(ExecutionServer).UpdateForkChoice(ctx, in)
   350  	}
   351  	info := &grpc.UnaryServerInfo{
   352  		Server:     srv,
   353  		FullMethod: Execution_UpdateForkChoice_FullMethodName,
   354  	}
   355  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   356  		return srv.(ExecutionServer).UpdateForkChoice(ctx, req.(*ForkChoice))
   357  	}
   358  	return interceptor(ctx, in, info, handler)
   359  }
   360  
   361  func _Execution_AssembleBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   362  	in := new(AssembleBlockRequest)
   363  	if err := dec(in); err != nil {
   364  		return nil, err
   365  	}
   366  	if interceptor == nil {
   367  		return srv.(ExecutionServer).AssembleBlock(ctx, in)
   368  	}
   369  	info := &grpc.UnaryServerInfo{
   370  		Server:     srv,
   371  		FullMethod: Execution_AssembleBlock_FullMethodName,
   372  	}
   373  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   374  		return srv.(ExecutionServer).AssembleBlock(ctx, req.(*AssembleBlockRequest))
   375  	}
   376  	return interceptor(ctx, in, info, handler)
   377  }
   378  
   379  func _Execution_GetAssembledBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   380  	in := new(GetAssembledBlockRequest)
   381  	if err := dec(in); err != nil {
   382  		return nil, err
   383  	}
   384  	if interceptor == nil {
   385  		return srv.(ExecutionServer).GetAssembledBlock(ctx, in)
   386  	}
   387  	info := &grpc.UnaryServerInfo{
   388  		Server:     srv,
   389  		FullMethod: Execution_GetAssembledBlock_FullMethodName,
   390  	}
   391  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   392  		return srv.(ExecutionServer).GetAssembledBlock(ctx, req.(*GetAssembledBlockRequest))
   393  	}
   394  	return interceptor(ctx, in, info, handler)
   395  }
   396  
   397  func _Execution_CurrentHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   398  	in := new(emptypb.Empty)
   399  	if err := dec(in); err != nil {
   400  		return nil, err
   401  	}
   402  	if interceptor == nil {
   403  		return srv.(ExecutionServer).CurrentHeader(ctx, in)
   404  	}
   405  	info := &grpc.UnaryServerInfo{
   406  		Server:     srv,
   407  		FullMethod: Execution_CurrentHeader_FullMethodName,
   408  	}
   409  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   410  		return srv.(ExecutionServer).CurrentHeader(ctx, req.(*emptypb.Empty))
   411  	}
   412  	return interceptor(ctx, in, info, handler)
   413  }
   414  
   415  func _Execution_GetTD_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   416  	in := new(GetSegmentRequest)
   417  	if err := dec(in); err != nil {
   418  		return nil, err
   419  	}
   420  	if interceptor == nil {
   421  		return srv.(ExecutionServer).GetTD(ctx, in)
   422  	}
   423  	info := &grpc.UnaryServerInfo{
   424  		Server:     srv,
   425  		FullMethod: Execution_GetTD_FullMethodName,
   426  	}
   427  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   428  		return srv.(ExecutionServer).GetTD(ctx, req.(*GetSegmentRequest))
   429  	}
   430  	return interceptor(ctx, in, info, handler)
   431  }
   432  
   433  func _Execution_GetHeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   434  	in := new(GetSegmentRequest)
   435  	if err := dec(in); err != nil {
   436  		return nil, err
   437  	}
   438  	if interceptor == nil {
   439  		return srv.(ExecutionServer).GetHeader(ctx, in)
   440  	}
   441  	info := &grpc.UnaryServerInfo{
   442  		Server:     srv,
   443  		FullMethod: Execution_GetHeader_FullMethodName,
   444  	}
   445  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   446  		return srv.(ExecutionServer).GetHeader(ctx, req.(*GetSegmentRequest))
   447  	}
   448  	return interceptor(ctx, in, info, handler)
   449  }
   450  
   451  func _Execution_GetBody_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   452  	in := new(GetSegmentRequest)
   453  	if err := dec(in); err != nil {
   454  		return nil, err
   455  	}
   456  	if interceptor == nil {
   457  		return srv.(ExecutionServer).GetBody(ctx, in)
   458  	}
   459  	info := &grpc.UnaryServerInfo{
   460  		Server:     srv,
   461  		FullMethod: Execution_GetBody_FullMethodName,
   462  	}
   463  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   464  		return srv.(ExecutionServer).GetBody(ctx, req.(*GetSegmentRequest))
   465  	}
   466  	return interceptor(ctx, in, info, handler)
   467  }
   468  
   469  func _Execution_GetBodiesByRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   470  	in := new(GetBodiesByRangeRequest)
   471  	if err := dec(in); err != nil {
   472  		return nil, err
   473  	}
   474  	if interceptor == nil {
   475  		return srv.(ExecutionServer).GetBodiesByRange(ctx, in)
   476  	}
   477  	info := &grpc.UnaryServerInfo{
   478  		Server:     srv,
   479  		FullMethod: Execution_GetBodiesByRange_FullMethodName,
   480  	}
   481  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   482  		return srv.(ExecutionServer).GetBodiesByRange(ctx, req.(*GetBodiesByRangeRequest))
   483  	}
   484  	return interceptor(ctx, in, info, handler)
   485  }
   486  
   487  func _Execution_GetBodiesByHashes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   488  	in := new(GetBodiesByHashesRequest)
   489  	if err := dec(in); err != nil {
   490  		return nil, err
   491  	}
   492  	if interceptor == nil {
   493  		return srv.(ExecutionServer).GetBodiesByHashes(ctx, in)
   494  	}
   495  	info := &grpc.UnaryServerInfo{
   496  		Server:     srv,
   497  		FullMethod: Execution_GetBodiesByHashes_FullMethodName,
   498  	}
   499  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   500  		return srv.(ExecutionServer).GetBodiesByHashes(ctx, req.(*GetBodiesByHashesRequest))
   501  	}
   502  	return interceptor(ctx, in, info, handler)
   503  }
   504  
   505  func _Execution_IsCanonicalHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   506  	in := new(types.H256)
   507  	if err := dec(in); err != nil {
   508  		return nil, err
   509  	}
   510  	if interceptor == nil {
   511  		return srv.(ExecutionServer).IsCanonicalHash(ctx, in)
   512  	}
   513  	info := &grpc.UnaryServerInfo{
   514  		Server:     srv,
   515  		FullMethod: Execution_IsCanonicalHash_FullMethodName,
   516  	}
   517  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   518  		return srv.(ExecutionServer).IsCanonicalHash(ctx, req.(*types.H256))
   519  	}
   520  	return interceptor(ctx, in, info, handler)
   521  }
   522  
   523  func _Execution_GetHeaderHashNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   524  	in := new(types.H256)
   525  	if err := dec(in); err != nil {
   526  		return nil, err
   527  	}
   528  	if interceptor == nil {
   529  		return srv.(ExecutionServer).GetHeaderHashNumber(ctx, in)
   530  	}
   531  	info := &grpc.UnaryServerInfo{
   532  		Server:     srv,
   533  		FullMethod: Execution_GetHeaderHashNumber_FullMethodName,
   534  	}
   535  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   536  		return srv.(ExecutionServer).GetHeaderHashNumber(ctx, req.(*types.H256))
   537  	}
   538  	return interceptor(ctx, in, info, handler)
   539  }
   540  
   541  func _Execution_GetForkChoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   542  	in := new(emptypb.Empty)
   543  	if err := dec(in); err != nil {
   544  		return nil, err
   545  	}
   546  	if interceptor == nil {
   547  		return srv.(ExecutionServer).GetForkChoice(ctx, in)
   548  	}
   549  	info := &grpc.UnaryServerInfo{
   550  		Server:     srv,
   551  		FullMethod: Execution_GetForkChoice_FullMethodName,
   552  	}
   553  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   554  		return srv.(ExecutionServer).GetForkChoice(ctx, req.(*emptypb.Empty))
   555  	}
   556  	return interceptor(ctx, in, info, handler)
   557  }
   558  
   559  func _Execution_Ready_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   560  	in := new(emptypb.Empty)
   561  	if err := dec(in); err != nil {
   562  		return nil, err
   563  	}
   564  	if interceptor == nil {
   565  		return srv.(ExecutionServer).Ready(ctx, in)
   566  	}
   567  	info := &grpc.UnaryServerInfo{
   568  		Server:     srv,
   569  		FullMethod: Execution_Ready_FullMethodName,
   570  	}
   571  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   572  		return srv.(ExecutionServer).Ready(ctx, req.(*emptypb.Empty))
   573  	}
   574  	return interceptor(ctx, in, info, handler)
   575  }
   576  
   577  // Execution_ServiceDesc is the grpc.ServiceDesc for Execution service.
   578  // It's only intended for direct use with grpc.RegisterService,
   579  // and not to be introspected or modified (even as a copy)
   580  var Execution_ServiceDesc = grpc.ServiceDesc{
   581  	ServiceName: "execution.Execution",
   582  	HandlerType: (*ExecutionServer)(nil),
   583  	Methods: []grpc.MethodDesc{
   584  		{
   585  			MethodName: "InsertBlocks",
   586  			Handler:    _Execution_InsertBlocks_Handler,
   587  		},
   588  		{
   589  			MethodName: "ValidateChain",
   590  			Handler:    _Execution_ValidateChain_Handler,
   591  		},
   592  		{
   593  			MethodName: "UpdateForkChoice",
   594  			Handler:    _Execution_UpdateForkChoice_Handler,
   595  		},
   596  		{
   597  			MethodName: "AssembleBlock",
   598  			Handler:    _Execution_AssembleBlock_Handler,
   599  		},
   600  		{
   601  			MethodName: "GetAssembledBlock",
   602  			Handler:    _Execution_GetAssembledBlock_Handler,
   603  		},
   604  		{
   605  			MethodName: "CurrentHeader",
   606  			Handler:    _Execution_CurrentHeader_Handler,
   607  		},
   608  		{
   609  			MethodName: "GetTD",
   610  			Handler:    _Execution_GetTD_Handler,
   611  		},
   612  		{
   613  			MethodName: "GetHeader",
   614  			Handler:    _Execution_GetHeader_Handler,
   615  		},
   616  		{
   617  			MethodName: "GetBody",
   618  			Handler:    _Execution_GetBody_Handler,
   619  		},
   620  		{
   621  			MethodName: "GetBodiesByRange",
   622  			Handler:    _Execution_GetBodiesByRange_Handler,
   623  		},
   624  		{
   625  			MethodName: "GetBodiesByHashes",
   626  			Handler:    _Execution_GetBodiesByHashes_Handler,
   627  		},
   628  		{
   629  			MethodName: "IsCanonicalHash",
   630  			Handler:    _Execution_IsCanonicalHash_Handler,
   631  		},
   632  		{
   633  			MethodName: "GetHeaderHashNumber",
   634  			Handler:    _Execution_GetHeaderHashNumber_Handler,
   635  		},
   636  		{
   637  			MethodName: "GetForkChoice",
   638  			Handler:    _Execution_GetForkChoice_Handler,
   639  		},
   640  		{
   641  			MethodName: "Ready",
   642  			Handler:    _Execution_Ready_Handler,
   643  		},
   644  	},
   645  	Streams:  []grpc.StreamDesc{},
   646  	Metadata: "execution/execution.proto",
   647  }