github.com/ZihuaZhang/fabric-protos-go@v1.0.7/peer/proposal.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: peer/proposal.proto 3 4 package peer 5 6 import ( 7 fmt "fmt" 8 proto "github.com/golang/protobuf/proto" 9 math "math" 10 ) 11 12 // Reference imports to suppress errors if they are not otherwise used. 13 var _ = proto.Marshal 14 var _ = fmt.Errorf 15 var _ = math.Inf 16 17 // This is a compile-time assertion to ensure that this generated file 18 // is compatible with the proto package it is being compiled against. 19 // A compilation error at this line likely means your copy of the 20 // proto package needs to be updated. 21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 22 23 // This structure is necessary to sign the proposal which contains the header 24 // and the payload. Without this structure, we would have to concatenate the 25 // header and the payload to verify the signature, which could be expensive 26 // with large payload 27 // 28 // When an endorser receives a SignedProposal message, it should verify the 29 // signature over the proposal bytes. This verification requires the following 30 // steps: 31 // 1. Verification of the validity of the certificate that was used to produce 32 // the signature. The certificate will be available once proposalBytes has 33 // been unmarshalled to a Proposal message, and Proposal.header has been 34 // unmarshalled to a Header message. While this unmarshalling-before-verifying 35 // might not be ideal, it is unavoidable because i) the signature needs to also 36 // protect the signing certificate; ii) it is desirable that Header is created 37 // once by the client and never changed (for the sake of accountability and 38 // non-repudiation). Note also that it is actually impossible to conclusively 39 // verify the validity of the certificate included in a Proposal, because the 40 // proposal needs to first be endorsed and ordered with respect to certificate 41 // expiration transactions. Still, it is useful to pre-filter expired 42 // certificates at this stage. 43 // 2. Verification that the certificate is trusted (signed by a trusted CA) and 44 // that it is allowed to transact with us (with respect to some ACLs); 45 // 3. Verification that the signature on proposalBytes is valid; 46 // 4. Detect replay attacks; 47 type SignedProposal struct { 48 // The bytes of Proposal 49 ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposal_bytes,json=proposalBytes,proto3" json:"proposal_bytes,omitempty"` 50 // Signaure over proposalBytes; this signature is to be verified against 51 // the creator identity contained in the header of the Proposal message 52 // marshaled as proposalBytes 53 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 54 XXX_NoUnkeyedLiteral struct{} `json:"-"` 55 XXX_unrecognized []byte `json:"-"` 56 XXX_sizecache int32 `json:"-"` 57 } 58 59 func (m *SignedProposal) Reset() { *m = SignedProposal{} } 60 func (m *SignedProposal) String() string { return proto.CompactTextString(m) } 61 func (*SignedProposal) ProtoMessage() {} 62 func (*SignedProposal) Descriptor() ([]byte, []int) { 63 return fileDescriptor_c4dbb4372a94bd5b, []int{0} 64 } 65 66 func (m *SignedProposal) XXX_Unmarshal(b []byte) error { 67 return xxx_messageInfo_SignedProposal.Unmarshal(m, b) 68 } 69 func (m *SignedProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 70 return xxx_messageInfo_SignedProposal.Marshal(b, m, deterministic) 71 } 72 func (m *SignedProposal) XXX_Merge(src proto.Message) { 73 xxx_messageInfo_SignedProposal.Merge(m, src) 74 } 75 func (m *SignedProposal) XXX_Size() int { 76 return xxx_messageInfo_SignedProposal.Size(m) 77 } 78 func (m *SignedProposal) XXX_DiscardUnknown() { 79 xxx_messageInfo_SignedProposal.DiscardUnknown(m) 80 } 81 82 var xxx_messageInfo_SignedProposal proto.InternalMessageInfo 83 84 func (m *SignedProposal) GetProposalBytes() []byte { 85 if m != nil { 86 return m.ProposalBytes 87 } 88 return nil 89 } 90 91 func (m *SignedProposal) GetSignature() []byte { 92 if m != nil { 93 return m.Signature 94 } 95 return nil 96 } 97 98 // A Proposal is sent to an endorser for endorsement. The proposal contains: 99 // 1. A header which should be unmarshaled to a Header message. Note that 100 // Header is both the header of a Proposal and of a Transaction, in that i) 101 // both headers should be unmarshaled to this message; and ii) it is used to 102 // compute cryptographic hashes and signatures. The header has fields common 103 // to all proposals/transactions. In addition it has a type field for 104 // additional customization. An example of this is the ChaincodeHeaderExtension 105 // message used to extend the Header for type CHAINCODE. 106 // 2. A payload whose type depends on the header's type field. 107 // 3. An extension whose type depends on the header's type field. 108 // 109 // Let us see an example. For type CHAINCODE (see the Header message), 110 // we have the following: 111 // 1. The header is a Header message whose extensions field is a 112 // ChaincodeHeaderExtension message. 113 // 2. The payload is a ChaincodeProposalPayload message. 114 // 3. The extension is a ChaincodeAction that might be used to ask the 115 // endorsers to endorse a specific ChaincodeAction, thus emulating the 116 // submitting peer model. 117 type Proposal struct { 118 // The header of the proposal. It is the bytes of the Header 119 Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 120 // The payload of the proposal as defined by the type in the proposal 121 // header. 122 Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` 123 // Optional extensions to the proposal. Its content depends on the Header's 124 // type field. For the type CHAINCODE, it might be the bytes of a 125 // ChaincodeAction message. 126 Extension []byte `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` 127 XXX_NoUnkeyedLiteral struct{} `json:"-"` 128 XXX_unrecognized []byte `json:"-"` 129 XXX_sizecache int32 `json:"-"` 130 } 131 132 func (m *Proposal) Reset() { *m = Proposal{} } 133 func (m *Proposal) String() string { return proto.CompactTextString(m) } 134 func (*Proposal) ProtoMessage() {} 135 func (*Proposal) Descriptor() ([]byte, []int) { 136 return fileDescriptor_c4dbb4372a94bd5b, []int{1} 137 } 138 139 func (m *Proposal) XXX_Unmarshal(b []byte) error { 140 return xxx_messageInfo_Proposal.Unmarshal(m, b) 141 } 142 func (m *Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 143 return xxx_messageInfo_Proposal.Marshal(b, m, deterministic) 144 } 145 func (m *Proposal) XXX_Merge(src proto.Message) { 146 xxx_messageInfo_Proposal.Merge(m, src) 147 } 148 func (m *Proposal) XXX_Size() int { 149 return xxx_messageInfo_Proposal.Size(m) 150 } 151 func (m *Proposal) XXX_DiscardUnknown() { 152 xxx_messageInfo_Proposal.DiscardUnknown(m) 153 } 154 155 var xxx_messageInfo_Proposal proto.InternalMessageInfo 156 157 func (m *Proposal) GetHeader() []byte { 158 if m != nil { 159 return m.Header 160 } 161 return nil 162 } 163 164 func (m *Proposal) GetPayload() []byte { 165 if m != nil { 166 return m.Payload 167 } 168 return nil 169 } 170 171 func (m *Proposal) GetExtension() []byte { 172 if m != nil { 173 return m.Extension 174 } 175 return nil 176 } 177 178 // ChaincodeHeaderExtension is the Header's extentions message to be used when 179 // the Header's type is CHAINCODE. This extensions is used to specify which 180 // chaincode to invoke and what should appear on the ledger. 181 type ChaincodeHeaderExtension struct { 182 // The ID of the chaincode to target. 183 ChaincodeId *ChaincodeID `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"` 184 XXX_NoUnkeyedLiteral struct{} `json:"-"` 185 XXX_unrecognized []byte `json:"-"` 186 XXX_sizecache int32 `json:"-"` 187 } 188 189 func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtension{} } 190 func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) } 191 func (*ChaincodeHeaderExtension) ProtoMessage() {} 192 func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) { 193 return fileDescriptor_c4dbb4372a94bd5b, []int{2} 194 } 195 196 func (m *ChaincodeHeaderExtension) XXX_Unmarshal(b []byte) error { 197 return xxx_messageInfo_ChaincodeHeaderExtension.Unmarshal(m, b) 198 } 199 func (m *ChaincodeHeaderExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 200 return xxx_messageInfo_ChaincodeHeaderExtension.Marshal(b, m, deterministic) 201 } 202 func (m *ChaincodeHeaderExtension) XXX_Merge(src proto.Message) { 203 xxx_messageInfo_ChaincodeHeaderExtension.Merge(m, src) 204 } 205 func (m *ChaincodeHeaderExtension) XXX_Size() int { 206 return xxx_messageInfo_ChaincodeHeaderExtension.Size(m) 207 } 208 func (m *ChaincodeHeaderExtension) XXX_DiscardUnknown() { 209 xxx_messageInfo_ChaincodeHeaderExtension.DiscardUnknown(m) 210 } 211 212 var xxx_messageInfo_ChaincodeHeaderExtension proto.InternalMessageInfo 213 214 func (m *ChaincodeHeaderExtension) GetChaincodeId() *ChaincodeID { 215 if m != nil { 216 return m.ChaincodeId 217 } 218 return nil 219 } 220 221 // ChaincodeProposalPayload is the Proposal's payload message to be used when 222 // the Header's type is CHAINCODE. It contains the arguments for this 223 // invocation. 224 type ChaincodeProposalPayload struct { 225 // Input contains the arguments for this invocation. If this invocation 226 // deploys a new chaincode, ESCC/VSCC are part of this field. 227 // This is usually a marshaled ChaincodeInvocationSpec 228 Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` 229 // TransientMap contains data (e.g. cryptographic material) that might be used 230 // to implement some form of application-level confidentiality. The contents 231 // of this field are supposed to always be omitted from the transaction and 232 // excluded from the ledger. 233 TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap,proto3" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 234 XXX_NoUnkeyedLiteral struct{} `json:"-"` 235 XXX_unrecognized []byte `json:"-"` 236 XXX_sizecache int32 `json:"-"` 237 } 238 239 func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPayload{} } 240 func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) } 241 func (*ChaincodeProposalPayload) ProtoMessage() {} 242 func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) { 243 return fileDescriptor_c4dbb4372a94bd5b, []int{3} 244 } 245 246 func (m *ChaincodeProposalPayload) XXX_Unmarshal(b []byte) error { 247 return xxx_messageInfo_ChaincodeProposalPayload.Unmarshal(m, b) 248 } 249 func (m *ChaincodeProposalPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 250 return xxx_messageInfo_ChaincodeProposalPayload.Marshal(b, m, deterministic) 251 } 252 func (m *ChaincodeProposalPayload) XXX_Merge(src proto.Message) { 253 xxx_messageInfo_ChaincodeProposalPayload.Merge(m, src) 254 } 255 func (m *ChaincodeProposalPayload) XXX_Size() int { 256 return xxx_messageInfo_ChaincodeProposalPayload.Size(m) 257 } 258 func (m *ChaincodeProposalPayload) XXX_DiscardUnknown() { 259 xxx_messageInfo_ChaincodeProposalPayload.DiscardUnknown(m) 260 } 261 262 var xxx_messageInfo_ChaincodeProposalPayload proto.InternalMessageInfo 263 264 func (m *ChaincodeProposalPayload) GetInput() []byte { 265 if m != nil { 266 return m.Input 267 } 268 return nil 269 } 270 271 func (m *ChaincodeProposalPayload) GetTransientMap() map[string][]byte { 272 if m != nil { 273 return m.TransientMap 274 } 275 return nil 276 } 277 278 // ChaincodeAction contains the executed chaincode results, response, and event. 279 type ChaincodeAction struct { 280 // This field contains the read set and the write set produced by the 281 // chaincode executing this invocation. 282 Results []byte `protobuf:"bytes,1,opt,name=results,proto3" json:"results,omitempty"` 283 // This field contains the event generated by the chaincode. 284 // Only a single marshaled ChaincodeEvent is included. 285 Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"` 286 // This field contains the result of executing this invocation. 287 Response *Response `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` 288 // This field contains the ChaincodeID of executing this invocation. Endorser 289 // will set it with the ChaincodeID called by endorser while simulating proposal. 290 // Committer will validate the version matching with latest chaincode version. 291 // Adding ChaincodeID to keep version opens up the possibility of multiple 292 // ChaincodeAction per transaction. 293 ChaincodeId *ChaincodeID `protobuf:"bytes,4,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"` 294 XXX_NoUnkeyedLiteral struct{} `json:"-"` 295 XXX_unrecognized []byte `json:"-"` 296 XXX_sizecache int32 `json:"-"` 297 } 298 299 func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} } 300 func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) } 301 func (*ChaincodeAction) ProtoMessage() {} 302 func (*ChaincodeAction) Descriptor() ([]byte, []int) { 303 return fileDescriptor_c4dbb4372a94bd5b, []int{4} 304 } 305 306 func (m *ChaincodeAction) XXX_Unmarshal(b []byte) error { 307 return xxx_messageInfo_ChaincodeAction.Unmarshal(m, b) 308 } 309 func (m *ChaincodeAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 310 return xxx_messageInfo_ChaincodeAction.Marshal(b, m, deterministic) 311 } 312 func (m *ChaincodeAction) XXX_Merge(src proto.Message) { 313 xxx_messageInfo_ChaincodeAction.Merge(m, src) 314 } 315 func (m *ChaincodeAction) XXX_Size() int { 316 return xxx_messageInfo_ChaincodeAction.Size(m) 317 } 318 func (m *ChaincodeAction) XXX_DiscardUnknown() { 319 xxx_messageInfo_ChaincodeAction.DiscardUnknown(m) 320 } 321 322 var xxx_messageInfo_ChaincodeAction proto.InternalMessageInfo 323 324 func (m *ChaincodeAction) GetResults() []byte { 325 if m != nil { 326 return m.Results 327 } 328 return nil 329 } 330 331 func (m *ChaincodeAction) GetEvents() []byte { 332 if m != nil { 333 return m.Events 334 } 335 return nil 336 } 337 338 func (m *ChaincodeAction) GetResponse() *Response { 339 if m != nil { 340 return m.Response 341 } 342 return nil 343 } 344 345 func (m *ChaincodeAction) GetChaincodeId() *ChaincodeID { 346 if m != nil { 347 return m.ChaincodeId 348 } 349 return nil 350 } 351 352 func init() { 353 proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal") 354 proto.RegisterType((*Proposal)(nil), "protos.Proposal") 355 proto.RegisterType((*ChaincodeHeaderExtension)(nil), "protos.ChaincodeHeaderExtension") 356 proto.RegisterType((*ChaincodeProposalPayload)(nil), "protos.ChaincodeProposalPayload") 357 proto.RegisterMapType((map[string][]byte)(nil), "protos.ChaincodeProposalPayload.TransientMapEntry") 358 proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction") 359 } 360 361 func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor_c4dbb4372a94bd5b) } 362 363 var fileDescriptor_c4dbb4372a94bd5b = []byte{ 364 // 462 bytes of a gzipped FileDescriptorProto 365 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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