github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/processor.proto (about)

     1  // Copyright 2016 Intel Corporation
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  // -----------------------------------------------------------------------------
    15  
    16  syntax = "proto3";
    17  option java_multiple_files = true;
    18  option java_package = "sawtooth.sdk.protobuf";
    19  option go_package = "processor_pb2";
    20  
    21  import "transaction.proto";
    22  
    23  
    24  // The registration request from the transaction processor to the
    25  // validator/executor
    26  message TpRegisterRequest {
    27  
    28      // A settled upon name for the capabilities of the transaction processor.
    29      // For example: intkey, xo
    30      string family = 1;
    31  
    32      // The version supported.  For example:
    33      //      1.0  for version 1.0
    34      //      2.1  for version 2.1
    35      string version = 2;
    36  
    37      // The namespaces this transaction processor expects to interact with
    38      // when processing transactions matching this specification; will be
    39      // enforced by the state API on the validator.
    40      repeated string namespaces = 4;
    41  
    42      // The maximum number of transactions that this transaction processor can
    43      // handle at once.
    44      uint32 max_occupancy = 5;
    45  }
    46  
    47  // A response sent from the validator to the transaction processor
    48  // acknowledging the registration
    49  message TpRegisterResponse {
    50      enum Status {
    51          STATUS_UNSET = 0;
    52          OK = 1;
    53          ERROR = 2;
    54      }
    55  
    56      Status status = 1;
    57  }
    58  
    59  // The unregistration request from the transaction processor to the
    60  // validator/executor. The correct handlers are determined from the
    61  // zeromq identity of the tp, on the validator side.
    62  message TpUnregisterRequest {
    63  
    64  }
    65  
    66  // A response sent from the validator to the transaction processor
    67  // acknowledging the unregistration
    68  message TpUnregisterResponse {
    69      enum Status {
    70          STATUS_UNSET = 0;
    71          OK = 1;
    72          ERROR = 2;
    73      }
    74  
    75      Status status = 1;
    76  }
    77  
    78  
    79  // The request from the validator/executor of the transaction processor
    80  // to verify a transaction.
    81  message TpProcessRequest {
    82      TransactionHeader header = 1;  // The transaction header
    83      bytes payload = 2;  // The transaction payload
    84      string signature = 3;  // The transaction header_signature
    85      string context_id = 4; // The context_id for state requests.
    86  }
    87  
    88  
    89  // The response from the transaction processor to the validator/executor
    90  // used to respond about the validity of a transaction
    91  message TpProcessResponse {
    92      enum Status {
    93          STATUS_UNSET = 0;
    94          OK = 1;
    95          INVALID_TRANSACTION = 2;
    96          INTERNAL_ERROR = 3;
    97      }
    98  
    99      Status status = 1;
   100  
   101      // A message to include on responses in the cases where
   102      // status is either INVALID_TRANSACTION or INTERNAL_ERROR
   103      string message = 2;
   104  
   105      // Information that may be included with the response.
   106      // This information is an opaque, application-specific encoded block of
   107      // data that will be propagated back to the transaction submitter.
   108      bytes extended_data = 3;
   109  }