github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/orderer/sbft/simplebft/simplebft.proto (about)

     1  /*
     2  Copyright IBM Corp. 2016 All Rights Reserved.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8  		 http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  syntax = "proto3";
    18  
    19  option go_package = "github.com/hyperledger/fabric/orderer/sbft/simplebft";
    20  
    21  package simplebft;
    22  
    23  message Config {
    24          uint64 n = 1;
    25          uint64 f = 2;
    26          uint64 batch_duration_nsec = 3;
    27          uint64 batch_size_bytes = 4;
    28          uint64 request_timeout_nsec = 5;
    29  };
    30  
    31  message MultiChainMsg {
    32      string chainID = 1;
    33      Msg msg = 2;
    34  }
    35  
    36  message Msg {
    37          oneof type {
    38                  Request request = 1;
    39                  Preprepare preprepare = 2;
    40                  Subject prepare = 3;
    41                  Subject commit = 4;
    42                  Signed view_change = 5;
    43                  NewView new_view = 6;
    44                  Checkpoint checkpoint = 7;
    45                  Hello hello = 8;
    46          };
    47  };
    48  
    49  message Request {
    50          bytes payload = 1;
    51  };
    52  
    53  message SeqView {
    54          uint64 view = 1;
    55          uint64 seq = 2;
    56  };
    57  
    58  message BatchHeader {
    59          uint64 seq = 1;
    60          bytes prev_hash = 2;
    61          bytes data_hash = 3;
    62  };
    63  
    64  message Batch {
    65          bytes header = 1;
    66          repeated bytes payloads = 2;
    67          map<uint64, bytes> signatures = 3;
    68  };
    69  
    70  message Preprepare {
    71          SeqView seq = 1;
    72          Batch batch = 2;
    73  };
    74  
    75  message Subject {
    76          SeqView seq = 1;
    77          bytes digest = 2;
    78  };
    79  
    80  message ViewChange {
    81          uint64 view = 1;
    82          repeated Subject pset = 2;
    83          repeated Subject qset = 3;
    84          Batch checkpoint = 4;
    85  };
    86  
    87  message Signed {
    88          bytes data = 1;
    89          bytes signature = 2;
    90  };
    91  
    92  message NewView {
    93          uint64 view = 1;
    94          map<uint64, Signed> vset = 2;
    95          Subject xset = 3;
    96          Batch batch = 4;
    97  };
    98  
    99  message Checkpoint {
   100          uint64 seq = 1;
   101          bytes digest = 2;
   102          bytes signature = 3;
   103  };
   104  
   105  message Hello {
   106          Batch batch = 1;
   107          NewView new_view = 2;
   108  };