github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/protos/peer/transaction.pb.go (about) 1 // Code generated by protoc-gen-go. 2 // source: peer/transaction.proto 3 // DO NOT EDIT! 4 5 package peer 6 7 import proto "github.com/golang/protobuf/proto" 8 import fmt "fmt" 9 import math "math" 10 import _ "github.com/golang/protobuf/ptypes/timestamp" 11 import common "github.com/hyperledger/fabric/protos/common" 12 13 // Reference imports to suppress errors if they are not otherwise used. 14 var _ = proto.Marshal 15 var _ = fmt.Errorf 16 var _ = math.Inf 17 18 type TxValidationCode int32 19 20 const ( 21 TxValidationCode_VALID TxValidationCode = 0 22 TxValidationCode_NIL_ENVELOPE TxValidationCode = 1 23 TxValidationCode_BAD_PAYLOAD TxValidationCode = 2 24 TxValidationCode_BAD_COMMON_HEADER TxValidationCode = 3 25 TxValidationCode_BAD_CREATOR_SIGNATURE TxValidationCode = 4 26 TxValidationCode_INVALID_ENDORSER_TRANSACTION TxValidationCode = 5 27 TxValidationCode_INVALID_CONFIG_TRANSACTION TxValidationCode = 6 28 TxValidationCode_UNSUPPORTED_TX_PAYLOAD TxValidationCode = 7 29 TxValidationCode_BAD_PROPOSAL_TXID TxValidationCode = 8 30 TxValidationCode_DUPLICATE_TXID TxValidationCode = 9 31 TxValidationCode_ENDORSEMENT_POLICY_FAILURE TxValidationCode = 10 32 TxValidationCode_MVCC_READ_CONFLICT TxValidationCode = 11 33 TxValidationCode_PHANTOM_READ_CONFLICT TxValidationCode = 12 34 TxValidationCode_UNKNOWN_TX_TYPE TxValidationCode = 13 35 TxValidationCode_TARGET_CHAIN_NOT_FOUND TxValidationCode = 14 36 TxValidationCode_MARSHAL_TX_ERROR TxValidationCode = 15 37 TxValidationCode_NIL_TXACTION TxValidationCode = 16 38 TxValidationCode_EXPIRED_CHAINCODE TxValidationCode = 17 39 TxValidationCode_INVALID_OTHER_REASON TxValidationCode = 255 40 ) 41 42 var TxValidationCode_name = map[int32]string{ 43 0: "VALID", 44 1: "NIL_ENVELOPE", 45 2: "BAD_PAYLOAD", 46 3: "BAD_COMMON_HEADER", 47 4: "BAD_CREATOR_SIGNATURE", 48 5: "INVALID_ENDORSER_TRANSACTION", 49 6: "INVALID_CONFIG_TRANSACTION", 50 7: "UNSUPPORTED_TX_PAYLOAD", 51 8: "BAD_PROPOSAL_TXID", 52 9: "DUPLICATE_TXID", 53 10: "ENDORSEMENT_POLICY_FAILURE", 54 11: "MVCC_READ_CONFLICT", 55 12: "PHANTOM_READ_CONFLICT", 56 13: "UNKNOWN_TX_TYPE", 57 14: "TARGET_CHAIN_NOT_FOUND", 58 15: "MARSHAL_TX_ERROR", 59 16: "NIL_TXACTION", 60 17: "EXPIRED_CHAINCODE", 61 255: "INVALID_OTHER_REASON", 62 } 63 var TxValidationCode_value = map[string]int32{ 64 "VALID": 0, 65 "NIL_ENVELOPE": 1, 66 "BAD_PAYLOAD": 2, 67 "BAD_COMMON_HEADER": 3, 68 "BAD_CREATOR_SIGNATURE": 4, 69 "INVALID_ENDORSER_TRANSACTION": 5, 70 "INVALID_CONFIG_TRANSACTION": 6, 71 "UNSUPPORTED_TX_PAYLOAD": 7, 72 "BAD_PROPOSAL_TXID": 8, 73 "DUPLICATE_TXID": 9, 74 "ENDORSEMENT_POLICY_FAILURE": 10, 75 "MVCC_READ_CONFLICT": 11, 76 "PHANTOM_READ_CONFLICT": 12, 77 "UNKNOWN_TX_TYPE": 13, 78 "TARGET_CHAIN_NOT_FOUND": 14, 79 "MARSHAL_TX_ERROR": 15, 80 "NIL_TXACTION": 16, 81 "EXPIRED_CHAINCODE": 17, 82 "INVALID_OTHER_REASON": 255, 83 } 84 85 func (x TxValidationCode) String() string { 86 return proto.EnumName(TxValidationCode_name, int32(x)) 87 } 88 func (TxValidationCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } 89 90 // This message is necessary to facilitate the verification of the signature 91 // (in the signature field) over the bytes of the transaction (in the 92 // transactionBytes field). 93 type SignedTransaction struct { 94 // The bytes of the Transaction. NDD 95 TransactionBytes []byte `protobuf:"bytes,1,opt,name=transaction_bytes,json=transactionBytes,proto3" json:"transaction_bytes,omitempty"` 96 // Signature of the transactionBytes The public key of the signature is in 97 // the header field of TransactionAction There might be multiple 98 // TransactionAction, so multiple headers, but there should be same 99 // transactor identity (cert) in all headers 100 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 101 } 102 103 func (m *SignedTransaction) Reset() { *m = SignedTransaction{} } 104 func (m *SignedTransaction) String() string { return proto.CompactTextString(m) } 105 func (*SignedTransaction) ProtoMessage() {} 106 func (*SignedTransaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{0} } 107 108 // ProcessedTransaction wraps an Envelope that includes a transaction along with an indication 109 // of whether the transaction was validated or invalidated by committing peer. 110 // The use case is that GetTransactionByID API needs to retrieve the transaction Envelope 111 // from block storage, and return it to a client, and indicate whether the transaction 112 // was validated or invalidated by committing peer. So that the originally submitted 113 // transaction Envelope is not modified, the ProcessedTransaction wrapper is returned. 114 type ProcessedTransaction struct { 115 // An Envelope which includes a processed transaction 116 TransactionEnvelope *common.Envelope `protobuf:"bytes,1,opt,name=transactionEnvelope" json:"transactionEnvelope,omitempty"` 117 // An indication of whether the transaction was validated or invalidated by committing peer 118 ValidationCode int32 `protobuf:"varint,2,opt,name=validationCode" json:"validationCode,omitempty"` 119 } 120 121 func (m *ProcessedTransaction) Reset() { *m = ProcessedTransaction{} } 122 func (m *ProcessedTransaction) String() string { return proto.CompactTextString(m) } 123 func (*ProcessedTransaction) ProtoMessage() {} 124 func (*ProcessedTransaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{1} } 125 126 func (m *ProcessedTransaction) GetTransactionEnvelope() *common.Envelope { 127 if m != nil { 128 return m.TransactionEnvelope 129 } 130 return nil 131 } 132 133 // The transaction to be sent to the ordering service. A transaction contains 134 // one or more TransactionAction. Each TransactionAction binds a proposal to 135 // potentially multiple actions. The transaction is atomic meaning that either 136 // all actions in the transaction will be committed or none will. Note that 137 // while a Transaction might include more than one Header, the Header.creator 138 // field must be the same in each. 139 // A single client is free to issue a number of independent Proposal, each with 140 // their header (Header) and request payload (ChaincodeProposalPayload). Each 141 // proposal is independently endorsed generating an action 142 // (ProposalResponsePayload) with one signature per Endorser. Any number of 143 // independent proposals (and their action) might be included in a transaction 144 // to ensure that they are treated atomically. 145 type Transaction struct { 146 // The payload is an array of TransactionAction. An array is necessary to 147 // accommodate multiple actions per transaction 148 Actions []*TransactionAction `protobuf:"bytes,1,rep,name=actions" json:"actions,omitempty"` 149 } 150 151 func (m *Transaction) Reset() { *m = Transaction{} } 152 func (m *Transaction) String() string { return proto.CompactTextString(m) } 153 func (*Transaction) ProtoMessage() {} 154 func (*Transaction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{2} } 155 156 func (m *Transaction) GetActions() []*TransactionAction { 157 if m != nil { 158 return m.Actions 159 } 160 return nil 161 } 162 163 // TransactionAction binds a proposal to its action. The type field in the 164 // header dictates the type of action to be applied to the ledger. 165 type TransactionAction struct { 166 // The header of the proposal action, which is the proposal header 167 Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 168 // The payload of the action as defined by the type in the header For 169 // chaincode, it's the bytes of ChaincodeActionPayload 170 Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` 171 } 172 173 func (m *TransactionAction) Reset() { *m = TransactionAction{} } 174 func (m *TransactionAction) String() string { return proto.CompactTextString(m) } 175 func (*TransactionAction) ProtoMessage() {} 176 func (*TransactionAction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{3} } 177 178 // ChaincodeActionPayload is the message to be used for the TransactionAction's 179 // payload when the Header's type is set to CHAINCODE. It carries the 180 // chaincodeProposalPayload and an endorsed action to apply to the ledger. 181 type ChaincodeActionPayload struct { 182 // This field contains the bytes of the ChaincodeProposalPayload message from 183 // the original invocation (essentially the arguments) after the application 184 // of the visibility function. The main visibility modes are "full" (the 185 // entire ChaincodeProposalPayload message is included here), "hash" (only 186 // the hash of the ChaincodeProposalPayload message is included) or 187 // "nothing". This field will be used to check the consistency of 188 // ProposalResponsePayload.proposalHash. For the CHAINCODE type, 189 // ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || 190 // f(ChaincodeProposalPayload)) where f is the visibility function. 191 ChaincodeProposalPayload []byte `protobuf:"bytes,1,opt,name=chaincode_proposal_payload,json=chaincodeProposalPayload,proto3" json:"chaincode_proposal_payload,omitempty"` 192 // The list of actions to apply to the ledger 193 Action *ChaincodeEndorsedAction `protobuf:"bytes,2,opt,name=action" json:"action,omitempty"` 194 } 195 196 func (m *ChaincodeActionPayload) Reset() { *m = ChaincodeActionPayload{} } 197 func (m *ChaincodeActionPayload) String() string { return proto.CompactTextString(m) } 198 func (*ChaincodeActionPayload) ProtoMessage() {} 199 func (*ChaincodeActionPayload) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{4} } 200 201 func (m *ChaincodeActionPayload) GetAction() *ChaincodeEndorsedAction { 202 if m != nil { 203 return m.Action 204 } 205 return nil 206 } 207 208 // ChaincodeEndorsedAction carries information about the endorsement of a 209 // specific proposal 210 type ChaincodeEndorsedAction struct { 211 // This is the bytes of the ProposalResponsePayload message signed by the 212 // endorsers. Recall that for the CHAINCODE type, the 213 // ProposalResponsePayload's extenstion field carries a ChaincodeAction 214 ProposalResponsePayload []byte `protobuf:"bytes,1,opt,name=proposal_response_payload,json=proposalResponsePayload,proto3" json:"proposal_response_payload,omitempty"` 215 // The endorsement of the proposal, basically the endorser's signature over 216 // proposalResponsePayload 217 Endorsements []*Endorsement `protobuf:"bytes,2,rep,name=endorsements" json:"endorsements,omitempty"` 218 } 219 220 func (m *ChaincodeEndorsedAction) Reset() { *m = ChaincodeEndorsedAction{} } 221 func (m *ChaincodeEndorsedAction) String() string { return proto.CompactTextString(m) } 222 func (*ChaincodeEndorsedAction) ProtoMessage() {} 223 func (*ChaincodeEndorsedAction) Descriptor() ([]byte, []int) { return fileDescriptor11, []int{5} } 224 225 func (m *ChaincodeEndorsedAction) GetEndorsements() []*Endorsement { 226 if m != nil { 227 return m.Endorsements 228 } 229 return nil 230 } 231 232 func init() { 233 proto.RegisterType((*SignedTransaction)(nil), "protos.SignedTransaction") 234 proto.RegisterType((*ProcessedTransaction)(nil), "protos.ProcessedTransaction") 235 proto.RegisterType((*Transaction)(nil), "protos.Transaction") 236 proto.RegisterType((*TransactionAction)(nil), "protos.TransactionAction") 237 proto.RegisterType((*ChaincodeActionPayload)(nil), "protos.ChaincodeActionPayload") 238 proto.RegisterType((*ChaincodeEndorsedAction)(nil), "protos.ChaincodeEndorsedAction") 239 proto.RegisterEnum("protos.TxValidationCode", TxValidationCode_name, TxValidationCode_value) 240 } 241 242 func init() { proto.RegisterFile("peer/transaction.proto", fileDescriptor11) } 243 244 var fileDescriptor11 = []byte{ 245 // 761 bytes of a gzipped FileDescriptorProto 246 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x54, 0xc1, 0x6e, 0xe3, 0x36, 247 0x14, 0xac, 0x93, 0x26, 0x69, 0x9e, 0xd3, 0x84, 0x66, 0xb2, 0x5e, 0xc7, 0x08, 0xba, 0x0b, 0x1f, 248 0x8a, 0x6d, 0x0b, 0xd8, 0x40, 0xf6, 0x50, 0xa0, 0xe8, 0x85, 0x96, 0x98, 0x58, 0xa8, 0x4c, 0x0a, 249 0x34, 0x9d, 0x26, 0x3d, 0x94, 0x90, 0x2d, 0xae, 0x63, 0xd4, 0x16, 0x05, 0x49, 0x59, 0x34, 0xd7, 250 0x7e, 0x40, 0xfb, 0x7d, 0xfd, 0x9a, 0x16, 0x12, 0xa5, 0xc4, 0xce, 0xb6, 0x17, 0xcb, 0x9c, 0x19, 251 0xbe, 0x99, 0xf7, 0x44, 0x11, 0xda, 0x89, 0xd6, 0xe9, 0x20, 0x4f, 0xc3, 0x38, 0x0b, 0xe7, 0xf9, 252 0xd2, 0xc4, 0xfd, 0x24, 0x35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1a, 0x51, 0xe2, 0x52, 275 0x81, 0x76, 0xf1, 0x39, 0xbc, 0x2a, 0x61, 0x41, 0x89, 0xe4, 0x42, 0x4d, 0xbc, 0x6b, 0x46, 0xe4, 276 0x54, 0x50, 0xf4, 0x39, 0x7e, 0x0b, 0x17, 0x1e, 0x2b, 0x1d, 0x14, 0x65, 0x2e, 0x17, 0x13, 0x2a, 277 0x94, 0x14, 0x84, 0x4d, 0x88, 0x23, 0x3d, 0xce, 0xd0, 0x1e, 0xfe, 0x0a, 0xba, 0xb5, 0xc2, 0xe1, 278 0xec, 0xca, 0xbb, 0xde, 0xe2, 0xf7, 0x71, 0x17, 0xda, 0x53, 0x36, 0x99, 0x06, 0x01, 0x17, 0x92, 279 0xba, 0x4a, 0xde, 0x3e, 0xe5, 0x39, 0xa8, 0xf3, 0x04, 0x82, 0x07, 0x7c, 0x42, 0x7c, 0x25, 0x6f, 280 0x3d, 0x17, 0x7d, 0x81, 0x31, 0x1c, 0xbb, 0xd3, 0xc0, 0xf7, 0x1c, 0x22, 0xa9, 0xc5, 0x0e, 0x0b, 281 0x9b, 0x2a, 0xc0, 0x98, 0x32, 0xa9, 0x02, 0xee, 0x7b, 0xce, 0x9d, 0xba, 0x22, 0x9e, 0x5f, 0x04, 282 0x05, 0xdc, 0x06, 0x3c, 0xbe, 0x71, 0x1c, 0x25, 0x28, 0xb1, 0x41, 0x7c, 0xcf, 0x91, 0xa8, 0x59, 283 0xf4, 0x16, 0x8c, 0x08, 0x93, 0x7c, 0xfc, 0x82, 0x3a, 0xc2, 0xa7, 0x70, 0x32, 0x65, 0x3f, 0x31, 284 0xfe, 0x33, 0x2b, 0x52, 0xc9, 0xbb, 0x80, 0xa2, 0x2f, 0x8b, 0xb8, 0x92, 0x88, 0x6b, 0x2a, 0x95, 285 0x33, 0x22, 0x1e, 0x53, 0x8c, 0x4b, 0x75, 0xc5, 0xa7, 0xcc, 0x45, 0xc7, 0xf8, 0x0c, 0xd0, 0x98, 286 0x88, 0xc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