diff --git a/proto/src/proto/executor/v1/executor.proto b/proto/src/proto/executor/v1/executor.proto index afe1a31a00..110ebc4cb4 100644 --- a/proto/src/proto/executor/v1/executor.proto +++ b/proto/src/proto/executor/v1/executor.proto @@ -292,4 +292,6 @@ enum ExecutorError { EXECUTOR_ERROR_UNSUPPORTED_FORK_ID = 8; // EXECUTOR_ERROR_BALANCE_MISMATCH indicates that there is a balance mismatch error in the ROM EXECUTOR_ERROR_BALANCE_MISMATCH = 9; + // EXECUTOR_ERROR_FEA2SCALAR indicates that there is a fea2scalar error in the execution + EXECUTOR_ERROR_FEA2SCALAR = 10; } diff --git a/state/runtime/executor/pb/executor.pb.go b/state/runtime/executor/pb/executor.pb.go index 2d8c67848f..cd47976721 100644 --- a/state/runtime/executor/pb/executor.pb.go +++ b/state/runtime/executor/pb/executor.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.1 // protoc v3.21.12 // source: executor.proto @@ -197,21 +197,24 @@ const ( ExecutorError_EXECUTOR_ERROR_UNSUPPORTED_FORK_ID ExecutorError = 8 // EXECUTOR_ERROR_BALANCE_MISMATCH indicates that there is a balance mismatch error in the ROM ExecutorError_EXECUTOR_ERROR_BALANCE_MISMATCH ExecutorError = 9 + // EXECUTOR_ERROR_FEA2SCALAR indicates that there is a fea2scalar error in the execution + ExecutorError_EXECUTOR_ERROR_FEA2SCALAR ExecutorError = 10 ) // Enum value maps for ExecutorError. var ( ExecutorError_name = map[int32]string{ - 0: "EXECUTOR_ERROR_UNSPECIFIED", - 1: "EXECUTOR_ERROR_NO_ERROR", - 2: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK", - 3: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY", - 4: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM", - 5: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH", - 6: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING", - 7: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON", - 8: "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID", - 9: "EXECUTOR_ERROR_BALANCE_MISMATCH", + 0: "EXECUTOR_ERROR_UNSPECIFIED", + 1: "EXECUTOR_ERROR_NO_ERROR", + 2: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_KECCAK", + 3: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_BINARY", + 4: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_MEM", + 5: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_ARITH", + 6: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_PADDING", + 7: "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON", + 8: "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID", + 9: "EXECUTOR_ERROR_BALANCE_MISMATCH", + 10: "EXECUTOR_ERROR_FEA2SCALAR", } ExecutorError_value = map[string]int32{ "EXECUTOR_ERROR_UNSPECIFIED": 0, @@ -224,6 +227,7 @@ var ( "EXECUTOR_ERROR_COUNTERS_OVERFLOW_POSEIDON": 7, "EXECUTOR_ERROR_UNSUPPORTED_FORK_ID": 8, "EXECUTOR_ERROR_BALANCE_MISMATCH": 9, + "EXECUTOR_ERROR_FEA2SCALAR": 10, } ) @@ -1897,7 +1901,7 @@ var file_executor_proto_rawDesc = []byte{ 0x52, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x42, 0x49, 0x47, 0x10, 0x1b, 0x12, 0x21, 0x0a, 0x1d, 0x52, 0x4f, 0x4d, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x55, 0x50, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x5f, - 0x46, 0x4f, 0x52, 0x4b, 0x5f, 0x49, 0x44, 0x10, 0x1c, 0x2a, 0xa6, 0x03, 0x0a, 0x0d, 0x45, 0x78, + 0x46, 0x4f, 0x52, 0x4b, 0x5f, 0x49, 0x44, 0x10, 0x1c, 0x2a, 0xc5, 0x03, 0x0a, 0x0d, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x45, @@ -1924,18 +1928,20 @@ var file_executor_proto_rawDesc = []byte{ 0x54, 0x45, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x4b, 0x5f, 0x49, 0x44, 0x10, 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x4d, 0x41, 0x54, 0x43, 0x48, - 0x10, 0x09, 0x32, 0x68, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, - 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x5a, 0x3f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, 0x6f, 0x6c, - 0x79, 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, 0x76, 0x6d, - 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x74, - 0x69, 0x6d, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x10, 0x09, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x4f, 0x52, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x46, 0x45, 0x41, 0x32, 0x53, 0x43, 0x41, 0x4c, 0x41, 0x52, 0x10, + 0x0a, 0x32, 0x68, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x5a, 0x3f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, 0x6f, 0x6c, 0x79, + 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, 0x76, 0x6d, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, + 0x6d, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/state/runtime/executor/pb/executor_grpc.pb.go b/state/runtime/executor/pb/executor_grpc.pb.go index 78ac0c2df9..78b00bd149 100644 --- a/state/runtime/executor/pb/executor_grpc.pb.go +++ b/state/runtime/executor/pb/executor_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.21.12 // source: executor.proto @@ -18,11 +18,15 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ExecutorService_ProcessBatch_FullMethodName = "/executor.v1.ExecutorService/ProcessBatch" +) + // ExecutorServiceClient is the client API for ExecutorService 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 ExecutorServiceClient interface { - /// Processes a batch + // / Processes a batch ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) } @@ -36,7 +40,7 @@ func NewExecutorServiceClient(cc grpc.ClientConnInterface) ExecutorServiceClient func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBatchRequest, opts ...grpc.CallOption) (*ProcessBatchResponse, error) { out := new(ProcessBatchResponse) - err := c.cc.Invoke(ctx, "/executor.v1.ExecutorService/ProcessBatch", in, out, opts...) + err := c.cc.Invoke(ctx, ExecutorService_ProcessBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -47,7 +51,7 @@ func (c *executorServiceClient) ProcessBatch(ctx context.Context, in *ProcessBat // All implementations must embed UnimplementedExecutorServiceServer // for forward compatibility type ExecutorServiceServer interface { - /// Processes a batch + // / Processes a batch ProcessBatch(context.Context, *ProcessBatchRequest) (*ProcessBatchResponse, error) mustEmbedUnimplementedExecutorServiceServer() } @@ -82,7 +86,7 @@ func _ExecutorService_ProcessBatch_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/executor.v1.ExecutorService/ProcessBatch", + FullMethod: ExecutorService_ProcessBatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ExecutorServiceServer).ProcessBatch(ctx, req.(*ProcessBatchRequest)) diff --git a/state/state.go b/state/state.go index e3fb316160..72e6a3065a 100644 --- a/state/state.go +++ b/state/state.go @@ -1312,6 +1312,8 @@ func (s *State) internalProcessUnsignedTransaction(ctx context.Context, tx *type // Send Batch to the Executor processBatchResponse, err := s.executorClient.ProcessBatch(ctx, processBatchRequest) if err != nil { + // Log this error as an executor unspecified error + s.LogExecutorError(pb.ExecutorError_EXECUTOR_ERROR_UNSPECIFIED, processBatchRequest) log.Errorf("error processing unsigned transaction ", err) return nil, err } else if processBatchResponse.Error != executor.EXECUTOR_ERROR_NO_ERROR {