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

     1  // Copyright 2017 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  
    18  option java_multiple_files = true;
    19  option java_package = "sawtooth.sdk.protobuf";
    20  option go_package = "client_batch_submit_pb2";
    21  
    22  import "batch.proto";
    23  
    24  
    25  // Information about the status of a batch submitted to the validator.
    26  //
    27  // Attributes:
    28  //     batch_id: The id (header_signature) of the batch
    29  //     status: The committed status of the batch
    30  //     invalid_transactions: Info for transactions that failed, if any
    31  //
    32  // Statuses:
    33  //     COMMITTED - the batch was accepted and has been committed to the chain
    34  //     INVALID - the batch failed validation, it should be resubmitted
    35  //     PENDING - the batch is still being processed
    36  //     UNKNOWN - no status for the batch could be found (possibly invalid)
    37  message ClientBatchStatus {
    38      enum Status {
    39          STATUS_UNSET = 0;
    40          COMMITTED = 1;
    41          INVALID = 2;
    42          PENDING = 3;
    43          UNKNOWN = 4;
    44      }
    45      message InvalidTransaction {
    46          string transaction_id = 1;
    47          string message = 2;
    48          bytes extended_data = 3;
    49      }
    50      string batch_id = 1;
    51      Status status = 2;
    52      repeated InvalidTransaction invalid_transactions = 3;
    53  }
    54  
    55  // Submits a list of Batches to be added to the blockchain.
    56  message ClientBatchSubmitRequest {
    57      repeated Batch batches = 1;
    58  }
    59  
    60  // This is a response to a submission of one or more Batches.
    61  // Statuses:
    62  //   * OK - everything with the request worked as expected
    63  //   * INTERNAL_ERROR - general error, such as protobuf failing to deserialize
    64  //   * INVALID_BATCH - the batch failed validation, likely due to a bad signature
    65  //   * QUEUE_FULL - the batch is unable to be queued for processing, due to
    66  //        a full processing queue.  The batch may be submitted again.
    67  message ClientBatchSubmitResponse {
    68      enum Status {
    69          STATUS_UNSET = 0;
    70          OK = 1;
    71          INTERNAL_ERROR = 2;
    72          INVALID_BATCH = 3;
    73          QUEUE_FULL = 4;
    74      }
    75      Status status = 1;
    76  }
    77  
    78  // A request for the status of one or more batches, specified by id.
    79  // If `wait` is set to true, the validator will wait to respond until all
    80  // batches are committed, or until the specified `timeout` in seconds has
    81  // elapsed. Defaults to 300.
    82  message ClientBatchStatusRequest {
    83      repeated string batch_ids = 1;
    84      bool wait = 2;
    85      uint32 timeout = 3;
    86  }
    87  
    88  // This is a response to a request for the status of specific batches.
    89  // Statuses:
    90  //   * OK - everything with the request worked as expected
    91  //   * INTERNAL_ERROR - general error, such as protobuf failing to deserialize
    92  //   * NO_RESOURCE - the response contains no data, likely because
    93  //     no ids were specified in the request
    94  message ClientBatchStatusResponse {
    95      enum Status {
    96          STATUS_UNSET = 0;
    97          OK = 1;
    98          INTERNAL_ERROR = 2;
    99          NO_RESOURCE = 5;
   100          INVALID_ID = 8;
   101      }
   102      Status status = 1;
   103      repeated ClientBatchStatus batch_statuses = 2;
   104  }