github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/protos/peer/proposal.pb.go (about) 1 // Code generated by protoc-gen-go. 2 // source: peer/proposal.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 11 // Reference imports to suppress errors if they are not otherwise used. 12 var _ = proto.Marshal 13 var _ = fmt.Errorf 14 var _ = math.Inf 15 16 // This structure is necessary to sign the proposal which contains the header 17 // and the payload. Without this structure, we would have to concatenate the 18 // header and the payload to verify the signature, which could be expensive 19 // with large payload 20 // 21 // When an endorser receives a SignedProposal message, it should verify the 22 // signature over the proposal bytes. This verification requires the following 23 // steps: 24 // 1. Verification of the validity of the certificate that was used to produce 25 // the signature. The certificate will be available once proposalBytes has 26 // been unmarshalled to a Proposal message, and Proposal.header has been 27 // unmarshalled to a Header message. While this unmarshalling-before-verifying 28 // might not be ideal, it is unavoidable because i) the signature needs to also 29 // protect the signing certificate; ii) it is desirable that Header is created 30 // once by the client and never changed (for the sake of accountability and 31 // non-repudiation). Note also that it is actually impossible to conclusively 32 // verify the validity of the certificate included in a Proposal, because the 33 // proposal needs to first be endorsed and ordered with respect to certificate 34 // expiration transactions. Still, it is useful to pre-filter expired 35 // certificates at this stage. 36 // 2. Verification that the certificate is trusted (signed by a trusted CA) and 37 // that it is allowed to transact with us (with respect to some ACLs); 38 // 3. Verification that the signature on proposalBytes is valid; 39 // 4. Detect replay attacks; 40 type SignedProposal struct { 41 // The bytes of Proposal 42 ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposal_bytes,json=proposalBytes,proto3" json:"proposal_bytes,omitempty"` 43 // Signaure over proposalBytes; this signature is to be verified against 44 // the creator identity contained in the header of the Proposal message 45 // marshaled as proposalBytes 46 Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` 47 } 48 49 func (m *SignedProposal) Reset() { *m = SignedProposal{} } 50 func (m *SignedProposal) String() string { return proto.CompactTextString(m) } 51 func (*SignedProposal) ProtoMessage() {} 52 func (*SignedProposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} } 53 54 // A Proposal is sent to an endorser for endorsement. The proposal contains: 55 // 1. A header which should be unmarshaled to a Header message. Note that 56 // Header is both the header of a Proposal and of a Transaction, in that i) 57 // both headers should be unmarshaled to this message; and ii) it is used to 58 // compute cryptographic hashes and signatures. The header has fields common 59 // to all proposals/transactions. In addition it has a type field for 60 // additional customization. An example of this is the ChaincodeHeaderExtension 61 // message used to extend the Header for type CHAINCODE. 62 // 2. A payload whose type depends on the header's type field. 63 // 3. An extension whose type depends on the header's type field. 64 // 65 // Let us see an example. For type CHAINCODE (see the Header message), 66 // we have the following: 67 // 1. The header is a Header message whose extensions field is a 68 // ChaincodeHeaderExtension message. 69 // 2. The payload is a ChaincodeProposalPayload message. 70 // 3. The extension is a ChaincodeAction that might be used to ask the 71 // endorsers to endorse a specific ChaincodeAction, thus emulating the 72 // submitting peer model. 73 type Proposal struct { 74 // The header of the proposal. It is the bytes of the Header 75 Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` 76 // The payload of the proposal as defined by the type in the proposal 77 // header. 78 Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` 79 // Optional extensions to the proposal. Its content depends on the Header's 80 // type field. For the type CHAINCODE, it might be the bytes of a 81 // ChaincodeAction message. 82 Extension []byte `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"` 83 } 84 85 func (m *Proposal) Reset() { *m = Proposal{} } 86 func (m *Proposal) String() string { return proto.CompactTextString(m) } 87 func (*Proposal) ProtoMessage() {} 88 func (*Proposal) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{1} } 89 90 // ChaincodeHeaderExtension is the Header's extentions message to be used when 91 // the Header's type is CHAINCODE. This extensions is used to specify which 92 // chaincode to invoke and what should appear on the ledger. 93 type ChaincodeHeaderExtension struct { 94 // The PayloadVisibility field controls to what extent the Proposal's payload 95 // (recall that for the type CHAINCODE, it is ChaincodeProposalPayload 96 // message) field will be visible in the final transaction and in the ledger. 97 // Ideally, it would be configurable, supporting at least 3 main visibility 98 // modes: 99 // 1. all bytes of the payload are visible; 100 // 2. only a hash of the payload is visible; 101 // 3. nothing is visible. 102 // Notice that the visibility function may be potentially part of the ESCC. 103 // In that case it overrides PayloadVisibility field. Finally notice that 104 // this field impacts the content of ProposalResponsePayload.proposalHash. 105 PayloadVisibility []byte `protobuf:"bytes,1,opt,name=payload_visibility,json=payloadVisibility,proto3" json:"payload_visibility,omitempty"` 106 // The ID of the chaincode to target. 107 ChaincodeId *ChaincodeID `protobuf:"bytes,2,opt,name=chaincode_id,json=chaincodeId" json:"chaincode_id,omitempty"` 108 } 109 110 func (m *ChaincodeHeaderExtension) Reset() { *m = ChaincodeHeaderExtension{} } 111 func (m *ChaincodeHeaderExtension) String() string { return proto.CompactTextString(m) } 112 func (*ChaincodeHeaderExtension) ProtoMessage() {} 113 func (*ChaincodeHeaderExtension) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{2} } 114 115 func (m *ChaincodeHeaderExtension) GetChaincodeId() *ChaincodeID { 116 if m != nil { 117 return m.ChaincodeId 118 } 119 return nil 120 } 121 122 // ChaincodeProposalPayload is the Proposal's payload message to be used when 123 // the Header's type is CHAINCODE. It contains the arguments for this 124 // invocation. 125 type ChaincodeProposalPayload struct { 126 // Input contains the arguments for this invocation. If this invocation 127 // deploys a new chaincode, ESCC/VSCC are part of this field. 128 Input []byte `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` 129 // TransientMap contains data (e.g. cryptographic material) that might be used 130 // to implement some form of application-level confidentiality. The contents 131 // of this field are supposed to always be omitted from the transaction and 132 // excluded from the ledger. 133 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"` 134 } 135 136 func (m *ChaincodeProposalPayload) Reset() { *m = ChaincodeProposalPayload{} } 137 func (m *ChaincodeProposalPayload) String() string { return proto.CompactTextString(m) } 138 func (*ChaincodeProposalPayload) ProtoMessage() {} 139 func (*ChaincodeProposalPayload) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{3} } 140 141 func (m *ChaincodeProposalPayload) GetTransientMap() map[string][]byte { 142 if m != nil { 143 return m.TransientMap 144 } 145 return nil 146 } 147 148 // ChaincodeAction contains the actions the events generated by the execution 149 // of the chaincode. 150 type ChaincodeAction struct { 151 // This field contains the read set and the write set produced by the 152 // chaincode executing this invocation. 153 Results []byte `protobuf:"bytes,1,opt,name=results,proto3" json:"results,omitempty"` 154 // This field contains the events generated by the chaincode executing this 155 // invocation. 156 Events []byte `protobuf:"bytes,2,opt,name=events,proto3" json:"events,omitempty"` 157 // This field contains the result of executing this invocation. 158 Response *Response `protobuf:"bytes,3,opt,name=response" json:"response,omitempty"` 159 } 160 161 func (m *ChaincodeAction) Reset() { *m = ChaincodeAction{} } 162 func (m *ChaincodeAction) String() string { return proto.CompactTextString(m) } 163 func (*ChaincodeAction) ProtoMessage() {} 164 func (*ChaincodeAction) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{4} } 165 166 func (m *ChaincodeAction) GetResponse() *Response { 167 if m != nil { 168 return m.Response 169 } 170 return nil 171 } 172 173 func init() { 174 proto.RegisterType((*SignedProposal)(nil), "protos.SignedProposal") 175 proto.RegisterType((*Proposal)(nil), "protos.Proposal") 176 proto.RegisterType((*ChaincodeHeaderExtension)(nil), "protos.ChaincodeHeaderExtension") 177 proto.RegisterType((*ChaincodeProposalPayload)(nil), "protos.ChaincodeProposalPayload") 178 proto.RegisterType((*ChaincodeAction)(nil), "protos.ChaincodeAction") 179 } 180 181 func init() { proto.RegisterFile("peer/proposal.proto", fileDescriptor7) } 182 183 var fileDescriptor7 = []byte{ 184 // 419 bytes of a gzipped FileDescriptorProto 185 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x64, 0x52, 0xdf, 0x6b, 0xd4, 0x40, 186 0x10, 0xe6, 0xee, 0xb0, 0x3f, 0x26, 0x67, 0x6d, 0xb7, 0x45, 0xc2, 0xd1, 0x87, 0x12, 0x10, 0x2a, 187 0x6a, 0x02, 0x11, 0x44, 0x7c, 0x11, 0xab, 0x05, 0xfb, 0x20, 0x94, 0xa8, 0x7d, 0xe8, 0xcb, 0xb1, 188 0x49, 0xc6, 0x64, 0x31, 0xee, 0xae, 0xbb, 0x9b, 0xc3, 0x3c, 0xfa, 0xe7, 0xf9, 0x5f, 0x49, 0xb2, 189 0x3f, 0x6c, 0xbd, 0xa7, 0xe4, 0x9b, 0xef, 0x9b, 0x6f, 0x66, 0x76, 0x06, 0x8e, 0x25, 0xa2, 0xca, 190 0xa4, 0x12, 0x52, 0x68, 0xda, 0xa5, 0x52, 0x09, 0x23, 0xc8, 0xce, 0xf4, 0xd1, 0xab, 0x93, 0x89, 191 0xac, 0x5a, 0xca, 0x78, 0x25, 0x6a, 0xb4, 0xec, 0xea, 0xf4, 0x5e, 0xca, 0x5a, 0xa1, 0x96, 0x82, 192 0x6b, 0xc7, 0x26, 0x5f, 0xe1, 0xe0, 0x33, 0x6b, 0x38, 0xd6, 0xd7, 0x4e, 0x40, 0x9e, 0xc0, 0x41, 193 0x10, 0x97, 0x83, 0x41, 0x1d, 0xcf, 0xce, 0x66, 0xe7, 0xcb, 0xe2, 0xa1, 0x8f, 0x5e, 0x8c, 0x41, 194 0x72, 0x0a, 0xfb, 0x9a, 0x35, 0x9c, 0x9a, 0x5e, 0x61, 0x3c, 0x9f, 0x14, 0xff, 0x02, 0xc9, 0x2d, 195 0xec, 0x05, 0xc3, 0xc7, 0xb0, 0xd3, 0x22, 0xad, 0x51, 0x39, 0x23, 0x87, 0x48, 0x0c, 0xbb, 0x92, 196 0x0e, 0x9d, 0xa0, 0xb5, 0xcb, 0xf7, 0x70, 0xf4, 0xc6, 0x5f, 0x06, 0x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0x70, 208 0xf1, 0x22, 0x28, 0x2e, 0x9e, 0xdd, 0x3e, 0x6d, 0x98, 0x69, 0xfb, 0x32, 0xad, 0xc4, 0x8f, 0xac, 209 0x1d, 0x24, 0xaa, 0x0e, 0xeb, 0x06, 0x55, 0xf6, 0x8d, 0x96, 0x8a, 0x55, 0x99, 0x4d, 0xcd, 0xc6, 210 0xd3, 0x2d, 0xed, 0x79, 0xbf, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x28, 0x14, 0xac, 0x8e, 0xfc, 211 0x02, 0x00, 0x00, 212 }