github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/protos/validator.proto (about) 1 // Copyright 2016, 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 = "validator_pb2"; 21 22 // A list of messages to be transmitted together. 23 message MessageList { 24 repeated Message messages = 1; 25 } 26 27 // The message passed between the validator and client, containing the 28 // header fields and content. 29 message Message { 30 31 enum MessageType { 32 DEFAULT = 0; 33 // Registration request from the transaction processor to the validator 34 TP_REGISTER_REQUEST = 1; 35 // Registration response from the validator to the 36 // transaction processor 37 TP_REGISTER_RESPONSE = 2; 38 // Tell the validator that the transaction processor 39 // won't take any more transactions 40 TP_UNREGISTER_REQUEST = 3; 41 // Response from the validator to the tp that it won't 42 // send any more transactions 43 TP_UNREGISTER_RESPONSE = 4; 44 // Process Request from the validator/executor to the 45 // transaction processor 46 TP_PROCESS_REQUEST = 5; 47 // Process response from the transaction processor to the validator/executor 48 TP_PROCESS_RESPONSE = 6; 49 // State get request from the transaction processor to validator/context_manager 50 TP_STATE_GET_REQUEST = 7; 51 // State get response from the validator/context_manager to the transaction processor 52 TP_STATE_GET_RESPONSE = 8; 53 // State set request from the transaction processor to the validator/context_manager 54 TP_STATE_SET_REQUEST = 9; 55 // State set response from the validator/context_manager to the transaction processor 56 TP_STATE_SET_RESPONSE = 10; 57 // State delete request from the transaction processor to the validator/context_manager 58 TP_STATE_DELETE_REQUEST = 11; 59 // State delete response from the validator/context_manager to the transaction processor 60 TP_STATE_DELETE_RESPONSE = 12; 61 // Message to append data to a transaction receipt 62 TP_RECEIPT_ADD_DATA_REQUEST = 13; 63 // Response from validator to tell transaction processor that data has been appended 64 TP_RECEIPT_ADD_DATA_RESPONSE = 14; 65 // Message to add event 66 TP_EVENT_ADD_REQUEST = 15; 67 // Response from validator to tell transaction processor that event has been created 68 TP_EVENT_ADD_RESPONSE = 16; 69 70 // Submission of a batchlist from the web api or another client to the validator 71 CLIENT_BATCH_SUBMIT_REQUEST = 100; 72 // Response from the validator to the web api/client that the submission was accepted 73 CLIENT_BATCH_SUBMIT_RESPONSE = 101; 74 // A request to list blocks from the web api/client to the validator 75 CLIENT_BLOCK_LIST_REQUEST = 102; 76 CLIENT_BLOCK_LIST_RESPONSE = 103; 77 CLIENT_BLOCK_GET_BY_ID_REQUEST = 104; 78 CLIENT_BLOCK_GET_RESPONSE = 105; 79 CLIENT_BATCH_LIST_REQUEST = 106; 80 CLIENT_BATCH_LIST_RESPONSE = 107; 81 CLIENT_BATCH_GET_REQUEST = 108; 82 CLIENT_BATCH_GET_RESPONSE = 109; 83 CLIENT_TRANSACTION_LIST_REQUEST = 110; 84 CLIENT_TRANSACTION_LIST_RESPONSE = 111; 85 CLIENT_TRANSACTION_GET_REQUEST = 112; 86 CLIENT_TRANSACTION_GET_RESPONSE = 113; 87 // Client state request of the current state hash to be retrieved from the journal 88 CLIENT_STATE_CURRENT_REQUEST = 114; 89 // Response with the current state hash 90 CLIENT_STATE_CURRENT_RESPONSE = 115; 91 // A request of all the addresses under a particular prefix, for a state hash. 92 CLIENT_STATE_LIST_REQUEST = 116; 93 // The response of the addresses 94 CLIENT_STATE_LIST_RESPONSE = 117; 95 // Get the address:data entry at a particular address 96 CLIENT_STATE_GET_REQUEST = 118; 97 // The response with the entry 98 CLIENT_STATE_GET_RESPONSE = 119; 99 // A request for the status of a batch or batches 100 CLIENT_BATCH_STATUS_REQUEST = 120; 101 // A response with the batch statuses 102 CLIENT_BATCH_STATUS_RESPONSE = 121; 103 // A request for one or more transaction receipts 104 CLIENT_RECEIPT_GET_REQUEST = 122; 105 // A response with the receipts 106 CLIENT_RECEIPT_GET_RESPONSE = 123; 107 CLIENT_BLOCK_GET_BY_NUM_REQUEST = 124; 108 // A request for a validator's peers 109 CLIENT_PEERS_GET_REQUEST = 125; 110 // A response with the validator's peers 111 CLIENT_PEERS_GET_RESPONSE = 126; 112 CLIENT_BLOCK_GET_BY_TRANSACTION_ID_REQUEST = 127; 113 CLIENT_BLOCK_GET_BY_BATCH_ID_REQUEST = 128; 114 // A request for a validator's status 115 CLIENT_STATUS_GET_REQUEST = 129; 116 // A response with the validator's status 117 CLIENT_STATUS_GET_RESPONSE = 130; 118 119 // Message types for events 120 CLIENT_EVENTS_SUBSCRIBE_REQUEST = 500; 121 CLIENT_EVENTS_SUBSCRIBE_RESPONSE = 501; 122 CLIENT_EVENTS_UNSUBSCRIBE_REQUEST = 502; 123 CLIENT_EVENTS_UNSUBSCRIBE_RESPONSE = 503; 124 CLIENT_EVENTS = 504; 125 CLIENT_EVENTS_GET_REQUEST = 505; 126 CLIENT_EVENTS_GET_RESPONSE = 506; 127 128 // Temp message types until a discussion can be had about gossip msg 129 GOSSIP_MESSAGE = 200; 130 GOSSIP_REGISTER = 201; 131 GOSSIP_UNREGISTER = 202; 132 GOSSIP_BLOCK_REQUEST = 205; 133 GOSSIP_BLOCK_RESPONSE = 206; 134 GOSSIP_BATCH_BY_BATCH_ID_REQUEST = 207; 135 GOSSIP_BATCH_BY_TRANSACTION_ID_REQUEST = 208; 136 GOSSIP_BATCH_RESPONSE = 209; 137 GOSSIP_GET_PEERS_REQUEST = 210; 138 GOSSIP_GET_PEERS_RESPONSE = 211; 139 GOSSIP_CONSENSUS_MESSAGE = 212; 140 141 NETWORK_ACK = 300; 142 NETWORK_CONNECT = 301; 143 NETWORK_DISCONNECT = 302; 144 145 // Message types for Authorization Types 146 AUTHORIZATION_CONNECTION_RESPONSE = 600; 147 AUTHORIZATION_VIOLATION = 601; 148 AUTHORIZATION_TRUST_REQUEST = 602; 149 AUTHORIZATION_TRUST_RESPONSE = 603; 150 AUTHORIZATION_CHALLENGE_REQUEST = 604; 151 AUTHORIZATION_CHALLENGE_RESPONSE = 605; 152 AUTHORIZATION_CHALLENGE_SUBMIT = 606; 153 AUTHORIZATION_CHALLENGE_RESULT = 607; 154 155 PING_REQUEST = 700; 156 PING_RESPONSE = 701; 157 158 // Consensus service messages 159 CONSENSUS_REGISTER_REQUEST = 800; 160 CONSENSUS_REGISTER_RESPONSE = 801; 161 162 CONSENSUS_SEND_TO_REQUEST = 802; 163 CONSENSUS_SEND_TO_RESPONSE = 803; 164 CONSENSUS_BROADCAST_REQUEST = 804; 165 CONSENSUS_BROADCAST_RESPONSE = 805; 166 167 CONSENSUS_INITIALIZE_BLOCK_REQUEST = 806; 168 CONSENSUS_INITIALIZE_BLOCK_RESPONSE = 807; 169 CONSENSUS_FINALIZE_BLOCK_REQUEST = 808; 170 CONSENSUS_FINALIZE_BLOCK_RESPONSE = 809; 171 CONSENSUS_SUMMARIZE_BLOCK_REQUEST = 828; 172 CONSENSUS_SUMMARIZE_BLOCK_RESPONSE = 829; 173 CONSENSUS_CANCEL_BLOCK_REQUEST = 810; 174 CONSENSUS_CANCEL_BLOCK_RESPONSE = 811; 175 176 CONSENSUS_CHECK_BLOCKS_REQUEST = 812; 177 CONSENSUS_CHECK_BLOCKS_RESPONSE = 813; 178 CONSENSUS_COMMIT_BLOCK_REQUEST = 814; 179 CONSENSUS_COMMIT_BLOCK_RESPONSE = 815; 180 CONSENSUS_IGNORE_BLOCK_REQUEST = 816; 181 CONSENSUS_IGNORE_BLOCK_RESPONSE = 817; 182 CONSENSUS_FAIL_BLOCK_REQUEST = 818; 183 CONSENSUS_FAIL_BLOCK_RESPONSE = 819; 184 185 CONSENSUS_SETTINGS_GET_REQUEST = 820; 186 CONSENSUS_SETTINGS_GET_RESPONSE = 821; 187 CONSENSUS_STATE_GET_REQUEST = 822; 188 CONSENSUS_STATE_GET_RESPONSE = 823; 189 CONSENSUS_BLOCKS_GET_REQUEST = 824; 190 CONSENSUS_BLOCKS_GET_RESPONSE = 825; 191 CONSENSUS_CHAIN_HEAD_GET_REQUEST = 826; 192 CONSENSUS_CHAIN_HEAD_GET_RESPONSE = 827; 193 194 // Consensus notification messages 195 CONSENSUS_NOTIFY_PEER_CONNECTED = 900; 196 CONSENSUS_NOTIFY_PEER_DISCONNECTED = 901; 197 CONSENSUS_NOTIFY_PEER_MESSAGE = 902; 198 199 CONSENSUS_NOTIFY_BLOCK_NEW = 903; 200 CONSENSUS_NOTIFY_BLOCK_VALID = 904; 201 CONSENSUS_NOTIFY_BLOCK_INVALID = 905; 202 CONSENSUS_NOTIFY_BLOCK_COMMIT = 906; 203 204 CONSENSUS_NOTIFY_ACK = 999; 205 } 206 // The type of message, used to determine how to 'route' the message 207 // to the appropriate handler as well as how to deserialize the 208 // content. 209 MessageType message_type = 1; 210 211 // The identifier used to correlate response messages to their related 212 // request messages. correlation_id should be set to a random string 213 // for messages which are not responses to previously sent messages. For 214 // response messages, correlation_id should be set to the same string as 215 // contained in the request message. 216 string correlation_id = 2; 217 218 // The content of the message, defined by message_type. In many 219 // cases, this data has been serialized with Protocol Buffers or 220 // CBOR. 221 bytes content = 3; 222 223 }