github.com/tenywen/fabric@v1.0.0-beta.0.20170620030522-a5b1ed380643/protos/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 proto "github.com/golang/protobuf/proto" 7 import fmt "fmt" 8 import math "math" 9 10 // Reference imports to suppress errors if they are not otherwise used. 11 var _ = proto.Marshal 12 var _ = fmt.Errorf 13 var _ = math.Inf 14 15 // This structure is necessary to sign the proposal which contains the header 16 // and the payload. Without this structure, we would have to concatenate the 17 // header and the payload to verify the signature, which could be expensive 18 // with large payload 19 // 20 // When an endorser receives a SignedProposal message, it should verify the 21 // signature over the proposal bytes. This verification requires the following 22 // steps: 23 // 1. Verification of the validity of the certificate that was used to produce 24 // the signature. The certificate will be available once proposalBytes has 25 // been unmarshalled to a Proposal message, and Proposal.header has been 26 // unmarshalled to a Header message. While this unmarshalling-before-verifying 27 // might not be ideal, it is unavoidable because i) the signature needs to also 28 // protect the signing certificate; ii) it is desirable that Header is created 29 // once by the client and never changed (for the sake of accountability and 30 // non-repudiation). Note also that it is actually impossible to conclusively 31 // verify the validity of the certificate included in a Proposal, because the 32 // proposal needs to first be endorsed and ordered with respect to certificate 33 // expiration transactions. Still, it is useful to pre-filter expired 34 // certificates at this stage. 35 // 2. Verification that the certificate is trusted (signed by a trusted CA) and 36 // that it is allowed to transact with us (with respect to some ACLs); 37 // 3. Verification that the signature on proposalBytes is valid; 38 // 4. Detect replay attacks; 39 type SignedProposal struct { 40 // The bytes of Proposal 41 ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposal_bytes,json=proposalBytes,proto3" json:"proposal_bytes,omitempty"` 42 // Signaure over proposalBytes; this signature is to be verified against 43 // the creator identity contained in the header of the Proposal message 44 // marshaled as proposalBytes 45 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 46 } 47 48 func (m *SignedProposal) Reset() { *m = SignedProposal{} } 49 func (m *SignedProposal) String() string { return proto.CompactTextString(m) } 50 func (*SignedProposal) ProtoMessage() {} 51 func (*SignedProposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } 52 53 func (m *SignedProposal) GetProposalBytes() []byte { 54 if m != nil { 55 return m.ProposalBytes 56 } 57 return nil 58 } 59 60 func (m *SignedProposal) GetSignature() []byte { 61 if m != nil { 62 return m.Signature 63 } 64 return nil 65 } 66 67 // A Proposal is sent to an endorser for endorsement. The proposal contains: 68 // 1. A header which should be unmarshaled to a Header message. Note that 69 // Header is both the header of a Proposal and of a Transaction, in that i) 70 // both headers should be unmarshaled to this message; and ii) it is used to 71 // compute cryptographic hashes and signatures. The header has fields common 72 // to all proposals/transactions. In addition it has a type field for 73 // additional customization. An example of this is the ChaincodeHeaderExtension 74 // message used to extend the Header for type CHAINCODE. 75 // 2. A payload whose type depends on the header's type field. 76 // 3. An extension whose type depends on the header's type field. 77 // 78 // Let us see an example. For type CHAINCODE (see the Header message), 79 // we have the following: 80 // 1. The header is a Header message whose extensions field is a 81 // ChaincodeHeaderExtension message. 82 // 2. The payload is a ChaincodeProposalPayload message. 83 // 3. The extension is a ChaincodeAction that might be used to ask the 84 // endorsers to endorse a specific ChaincodeAction, thus emulating the 85 // submitting peer model. 86 type Proposal struct { 87 // The header of the proposal. It is the bytes of the Header 88 Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 89 // The payload of the proposal as defined by the type in the proposal 90 // header. 91 Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` 92 // Optional extensions to the proposal. Its content depends on the Header's 93 // type field. For the type CHAINCODE, it might be the bytes of a 94 // ChaincodeAction message. 95 Extension []byte `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` 96 } 97 98 func (m *Proposal) Reset() { *m = Proposal{} } 99 func (m *Proposal) String() string { return proto.CompactTextString(m) } 100 func (*Proposal) ProtoMessage() {} 101 func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } 102 103 func (m *Proposal) GetHeader() []byte { 104 if m != nil { 105 return m.Header 106 } 107 return nil 108 } 109 110 func (m *Proposal) GetPayload() []byte { 111 if m != nil { 112 return m.Payload 113 } 114 return nil 115 } 116 117 func (m *Proposal) GetExtension() []byte { 118 if m != nil { 119 return m.Extension 120 } 121 return nil 122 } 123 124 // ChaincodeHeaderExtension is the Header's extentions message to be used when 125 // the Header's type is CHAINCODE. This extensions is used to specify which 126 // chaincode to invoke and what should appear on the ledger. 127 type ChaincodeHeaderExtension struct { 128 // The PayloadVisibility field controls to what extent the Proposal's payload 129 // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload 130 // message) field will be visible in the final transaction and in the ledger. 131 // Ideally, it would be configurable, supporting at least 3 main visibility 132 // modes: 133 // 1. all bytes of the payload are visible; 134 // 2. only a hash of the payload is visible; 135 // 3. nothing is visible. 136 // Notice that the visibility function may be potentially part of the ESCC. 137 // In that case it overrides PayloadVisibility field. Finally notice that 138 // this field impacts the content of ProposalResponsePayload.proposalHash. 139 PayloadVisibility []byte `protobuf:"bytes,1,opt,name=payload_visibility,json=payloadVisibility,proto3" json:"payload_visibility,omitempty"` 140 // The ID of the chaincode to target. 141 ChaincodeId *ChaincodeID `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId" json:"chaincode_id,omitempty"` 142 } 143 144 func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtension{} } 145 func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) } 146 func (*ChaincodeHeaderExtension) ProtoMessage() {} 147 func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } 148 149 func (m *ChaincodeHeaderExtension) GetPayloadVisibility() []byte { 150 if m != nil { 151 return m.PayloadVisibility 152 } 153 return nil 154 } 155 156 func (m *ChaincodeHeaderExtension) GetChaincodeId() *ChaincodeID { 157 if m != nil { 158 return m.ChaincodeId 159 } 160 return nil 161 } 162 163 // ChaincodeProposalPayload is the Proposal's payload message to be used when 164 // the Header's type is CHAINCODE. It contains the arguments for this 165 // invocation. 166 type ChaincodeProposalPayload struct { 167 // Input contains the arguments for this invocation. If this invocation 168 // deploys a new chaincode, ESCC/VSCC are part of this field. 169 Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` 170 // TransientMap contains data (e.g. cryptographic material) that might be used 171 // to implement some form of application-level confidentiality. The contents 172 // of this field are supposed to always be omitted from the transaction and 173 // excluded from the ledger. 174 TransientMap map[string][]byte `protobuf:"bytes,2,rep,name=TransientMap" json:"TransientMap,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"` 175 } 176 177 func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPayload{} } 178 func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) } 179 func (*ChaincodeProposalPayload) ProtoMessage() {} 180 func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{3} } 181 182 func (m *ChaincodeProposalPayload) GetInput() []byte { 183 if m != nil { 184 return m.Input 185 } 186 return nil 187 } 188 189 func (m *ChaincodeProposalPayload) GetTransientMap() map[string][]byte { 190 if m != nil { 191 return m.TransientMap 192 } 193 return nil 194 } 195 196 // ChaincodeAction contains the actions the events generated by the execution 197 // of the chaincode. 198 type ChaincodeAction struct { 199 // This field contains the read set and the write set produced by the 200 // chaincode executing this invocation. 201 Results []byte `protobuf:"bytes,1,opt,name=results,proto3" json:"results,omitempty"` 202 // This field contains the events generated by the chaincode executing this 203 // invocation. 204 Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"` 205 // This field contains the result of executing this invocation. 206 Response *Response `protobuf:"bytes,3,opt,name=response" json:"response,omitempty"` 207 // This field contains the ChaincodeID of executing this invocation. Endorser 208 // will set it with the ChaincodeID called by endorser while simulating proposal. 209 // Committer will validate the version matching with latest chaincode version. 210 // Adding ChaincodeID to keep version opens up the possibility of multiple 211 // ChaincodeAction per transaction. 212 ChaincodeId *ChaincodeID `protobuf:"bytes,4,opt,name=chaincode_id,json=chaincodeId" json:"chaincode_id,omitempty"` 213 } 214 215 func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} } 216 func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) } 217 func (*ChaincodeAction) ProtoMessage() {} 218 func (*ChaincodeAction) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{4} } 219 220 func (m *ChaincodeAction) GetResults() []byte { 221 if m != nil { 222 return m.Results 223 } 224 return nil 225 } 226 227 func (m *ChaincodeAction) GetEvents() []byte { 228 if m != nil { 229 return m.Events 230 } 231 return nil 232 } 233 234 func (m *ChaincodeAction) GetResponse() *Response { 235 if m != nil { 236 return m.Response 237 } 238 return nil 239 } 240 241 func (m *ChaincodeAction) GetChaincodeId() *ChaincodeID { 242 if m != nil { 243 return m.ChaincodeId 244 } 245 return nil 246 } 247 248 func init() { 249 proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal") 250 proto.RegisterType((*Proposal)(nil), "protos.Proposal") 251 proto.RegisterType((*ChaincodeHeaderExtension)(nil), "protos.ChaincodeHeaderExtension") 252 proto.RegisterType((*ChaincodeProposalPayload)(nil), "protos.ChaincodeProposalPayload") 253 proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction") 254 } 255 256 func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor7) } 257 258 var fileDescriptor7 = []byte{ 259 // 452 bytes of a gzipped FileDescriptorProto 260 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x53, 0x4d, 0x6f, 0xd3, 0x4c, 261 0x10, 0x96, 0x93, 0xf7, 0xed, 0xc7, 0x24, 0xf4, 0x63, 0x5b, 0x21, 0x2b, 0xea, 0xa1, 0xb2, 0x84, 262 0x54, 0x24, 0xb0, 0xa5, 0x20, 0x21, 0xc4, 0x05, 0x11, 0xa8, 0x44, 0x0f, 0x48, 0x95, 0x81, 0x1e, 263 0x7a, 0x09, 0x6b, 0x7b, 0x70, 0x56, 0x35, 0xbb, 0xab, 0xdd, 0x75, 0x84, 0x8f, 0xfc, 0x1c, 0x7e, 264 0x0a, 0xff, 0x0a, 0xd9, 0xfb, 0xd1, 0x94, 0x5c, 0x38, 0x25, 0x33, 0xf3, 0x3c, 0xcf, 0xcc, 0x3c, 265 0xb3, 0x86, 0x13, 0x89, 0xa8, 0x32, 0xa9, 0x84, 0x14, 0x9a, 0x36, 0xa9, 0x54, 0xc2, 0x08, 0xb2, 266 0x33, 0xfc, 0xe8, 0xd9, 0xe9, 0x50, 0x2c, 0x57, 0x94, 0xf1, 0x52, 0x54, 0x68, 0xab, 0xb3, 0xb3, 267 0x07, 0x94, 0xa5, 0x42, 0x2d, 0x05, 0xd7, 0xae, 0x9a, 0x7c, 0x81, 0x83, 0x4f, 0xac, 0xe6, 0x58, 268 0x5d, 0x3b, 0x00, 0x79, 0x02, 0x07, 0x01, 0x5c, 0x74, 0x06, 0x75, 0x1c, 0x9d, 0x47, 0x17, 0xd3, 269 0xfc, 0x91, 0xcf, 0x2e, 0xfa, 0x24, 0x39, 0x83, 0x7d, 0xcd, 0x6a, 0x4e, 0x4d, 0xab, 0x30, 0x1e, 270 0x0d, 0x88, 0xfb, 0x44, 0x72, 0x0b, 0x7b, 0x41, 0xf0, 0x31, 0xec, 0xac, 0x90, 0x56, 0xa8, 0x9c, 271 0x90, 0x8b, 0x48, 0x0c, 0xbb, 0x92, 0x76, 0x8d, 0xa0, 0x95, 0xe3, 0xfb, 0xb0, 0xd7, 0xc6, 0x1f, 272 0x06, 0xb9, 0x66, 0x82, 0xc7, 0x63, 0xab, 0x1d, 0x12, 0xc9, 0xcf, 0x08, 0xe2, 0x77, 0x7e, 0xc9, 273 0x0f, 0x83, 0xd6, 0xa5, 0x2f, 0x92, 0xe7, 0x40, 0x9c, 0xca, 0x72, 0xcd, 0x34, 0x2b, 0x58, 0xc3, 274 0x4c, 0xe7, 0x1a, 0x1f, 0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