mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
273 lines
11 KiB
Go
273 lines
11 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.3.0
|
|
// - protoc (unknown)
|
|
// source: astria/execution/v1alpha2/execution.proto
|
|
|
|
package executionv1alpha2
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
const (
|
|
ExecutionService_GetBlock_FullMethodName = "/astria.execution.v1alpha2.ExecutionService/GetBlock"
|
|
ExecutionService_BatchGetBlocks_FullMethodName = "/astria.execution.v1alpha2.ExecutionService/BatchGetBlocks"
|
|
ExecutionService_ExecuteBlock_FullMethodName = "/astria.execution.v1alpha2.ExecutionService/ExecuteBlock"
|
|
ExecutionService_GetCommitmentState_FullMethodName = "/astria.execution.v1alpha2.ExecutionService/GetCommitmentState"
|
|
ExecutionService_UpdateCommitmentState_FullMethodName = "/astria.execution.v1alpha2.ExecutionService/UpdateCommitmentState"
|
|
)
|
|
|
|
// ExecutionServiceClient is the client API for ExecutionService service.
|
|
//
|
|
// 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.
|
|
type ExecutionServiceClient interface {
|
|
// GetBlock will return a block given an identifier.
|
|
GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*Block, error)
|
|
// BatchGetBlocks will return an array of Blocks given an array of block
|
|
// identifiers.
|
|
BatchGetBlocks(ctx context.Context, in *BatchGetBlocksRequest, opts ...grpc.CallOption) (*BatchGetBlocksResponse, error)
|
|
// ExecuteBlock is called to deterministically derive a rollup block from
|
|
// filtered sequencer block information.
|
|
ExecuteBlock(ctx context.Context, in *ExecuteBlockRequest, opts ...grpc.CallOption) (*Block, error)
|
|
// GetCommitmentState fetches the current CommitmentState of the chain.
|
|
GetCommitmentState(ctx context.Context, in *GetCommitmentStateRequest, opts ...grpc.CallOption) (*CommitmentState, error)
|
|
// UpdateCommitmentState replaces the whole CommitmentState with a new
|
|
// CommitmentState.
|
|
UpdateCommitmentState(ctx context.Context, in *UpdateCommitmentStateRequest, opts ...grpc.CallOption) (*CommitmentState, error)
|
|
}
|
|
|
|
type executionServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewExecutionServiceClient(cc grpc.ClientConnInterface) ExecutionServiceClient {
|
|
return &executionServiceClient{cc}
|
|
}
|
|
|
|
func (c *executionServiceClient) GetBlock(ctx context.Context, in *GetBlockRequest, opts ...grpc.CallOption) (*Block, error) {
|
|
out := new(Block)
|
|
err := c.cc.Invoke(ctx, ExecutionService_GetBlock_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *executionServiceClient) BatchGetBlocks(ctx context.Context, in *BatchGetBlocksRequest, opts ...grpc.CallOption) (*BatchGetBlocksResponse, error) {
|
|
out := new(BatchGetBlocksResponse)
|
|
err := c.cc.Invoke(ctx, ExecutionService_BatchGetBlocks_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *executionServiceClient) ExecuteBlock(ctx context.Context, in *ExecuteBlockRequest, opts ...grpc.CallOption) (*Block, error) {
|
|
out := new(Block)
|
|
err := c.cc.Invoke(ctx, ExecutionService_ExecuteBlock_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *executionServiceClient) GetCommitmentState(ctx context.Context, in *GetCommitmentStateRequest, opts ...grpc.CallOption) (*CommitmentState, error) {
|
|
out := new(CommitmentState)
|
|
err := c.cc.Invoke(ctx, ExecutionService_GetCommitmentState_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *executionServiceClient) UpdateCommitmentState(ctx context.Context, in *UpdateCommitmentStateRequest, opts ...grpc.CallOption) (*CommitmentState, error) {
|
|
out := new(CommitmentState)
|
|
err := c.cc.Invoke(ctx, ExecutionService_UpdateCommitmentState_FullMethodName, in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ExecutionServiceServer is the server API for ExecutionService service.
|
|
// All implementations must embed UnimplementedExecutionServiceServer
|
|
// for forward compatibility
|
|
type ExecutionServiceServer interface {
|
|
// GetBlock will return a block given an identifier.
|
|
GetBlock(context.Context, *GetBlockRequest) (*Block, error)
|
|
// BatchGetBlocks will return an array of Blocks given an array of block
|
|
// identifiers.
|
|
BatchGetBlocks(context.Context, *BatchGetBlocksRequest) (*BatchGetBlocksResponse, error)
|
|
// ExecuteBlock is called to deterministically derive a rollup block from
|
|
// filtered sequencer block information.
|
|
ExecuteBlock(context.Context, *ExecuteBlockRequest) (*Block, error)
|
|
// GetCommitmentState fetches the current CommitmentState of the chain.
|
|
GetCommitmentState(context.Context, *GetCommitmentStateRequest) (*CommitmentState, error)
|
|
// UpdateCommitmentState replaces the whole CommitmentState with a new
|
|
// CommitmentState.
|
|
UpdateCommitmentState(context.Context, *UpdateCommitmentStateRequest) (*CommitmentState, error)
|
|
mustEmbedUnimplementedExecutionServiceServer()
|
|
}
|
|
|
|
// UnimplementedExecutionServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedExecutionServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedExecutionServiceServer) GetBlock(context.Context, *GetBlockRequest) (*Block, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBlock not implemented")
|
|
}
|
|
func (UnimplementedExecutionServiceServer) BatchGetBlocks(context.Context, *BatchGetBlocksRequest) (*BatchGetBlocksResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method BatchGetBlocks not implemented")
|
|
}
|
|
func (UnimplementedExecutionServiceServer) ExecuteBlock(context.Context, *ExecuteBlockRequest) (*Block, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method ExecuteBlock not implemented")
|
|
}
|
|
func (UnimplementedExecutionServiceServer) GetCommitmentState(context.Context, *GetCommitmentStateRequest) (*CommitmentState, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetCommitmentState not implemented")
|
|
}
|
|
func (UnimplementedExecutionServiceServer) UpdateCommitmentState(context.Context, *UpdateCommitmentStateRequest) (*CommitmentState, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateCommitmentState not implemented")
|
|
}
|
|
func (UnimplementedExecutionServiceServer) mustEmbedUnimplementedExecutionServiceServer() {}
|
|
|
|
// UnsafeExecutionServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to ExecutionServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeExecutionServiceServer interface {
|
|
mustEmbedUnimplementedExecutionServiceServer()
|
|
}
|
|
|
|
func RegisterExecutionServiceServer(s grpc.ServiceRegistrar, srv ExecutionServiceServer) {
|
|
s.RegisterService(&ExecutionService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _ExecutionService_GetBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetBlockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ExecutionServiceServer).GetBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ExecutionService_GetBlock_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ExecutionServiceServer).GetBlock(ctx, req.(*GetBlockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ExecutionService_BatchGetBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(BatchGetBlocksRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ExecutionServiceServer).BatchGetBlocks(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ExecutionService_BatchGetBlocks_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ExecutionServiceServer).BatchGetBlocks(ctx, req.(*BatchGetBlocksRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ExecutionService_ExecuteBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ExecuteBlockRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ExecutionServiceServer).ExecuteBlock(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ExecutionService_ExecuteBlock_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ExecutionServiceServer).ExecuteBlock(ctx, req.(*ExecuteBlockRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ExecutionService_GetCommitmentState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCommitmentStateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ExecutionServiceServer).GetCommitmentState(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ExecutionService_GetCommitmentState_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ExecutionServiceServer).GetCommitmentState(ctx, req.(*GetCommitmentStateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _ExecutionService_UpdateCommitmentState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateCommitmentStateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ExecutionServiceServer).UpdateCommitmentState(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: ExecutionService_UpdateCommitmentState_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ExecutionServiceServer).UpdateCommitmentState(ctx, req.(*UpdateCommitmentStateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// ExecutionService_ServiceDesc is the grpc.ServiceDesc for ExecutionService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var ExecutionService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "astria.execution.v1alpha2.ExecutionService",
|
|
HandlerType: (*ExecutionServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetBlock",
|
|
Handler: _ExecutionService_GetBlock_Handler,
|
|
},
|
|
{
|
|
MethodName: "BatchGetBlocks",
|
|
Handler: _ExecutionService_BatchGetBlocks_Handler,
|
|
},
|
|
{
|
|
MethodName: "ExecuteBlock",
|
|
Handler: _ExecutionService_ExecuteBlock_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCommitmentState",
|
|
Handler: _ExecutionService_GetCommitmentState_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateCommitmentState",
|
|
Handler: _ExecutionService_UpdateCommitmentState_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "astria/execution/v1alpha2/execution.proto",
|
|
}
|