diff --git a/common/collection.pb.go b/common/collection.pb.go index 9650976..3f40021 100644 --- a/common/collection.pb.go +++ b/common/collection.pb.go @@ -71,6 +71,7 @@ func (m *CollectionConfigPackage) GetConfig() []*CollectionConfig { // Deprecated: Do not use. type CollectionConfig struct { // Types that are valid to be assigned to Payload: + // // *CollectionConfig_StaticCollectionConfig Payload isCollectionConfig_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -264,6 +265,7 @@ func (m *StaticCollectionConfig) GetEndorsementPolicy() *ApplicationPolicy { // Deprecated: Do not use. type CollectionPolicyConfig struct { // Types that are valid to be assigned to Payload: + // // *CollectionPolicyConfig_SignaturePolicy Payload isCollectionPolicyConfig_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/common/common.pb.go b/common/common.pb.go index e8e3a45..1fa45ae 100644 --- a/common/common.pb.go +++ b/common/common.pb.go @@ -392,19 +392,19 @@ type ChannelHeader struct { // Identifier of the channel this message is bound for ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // An unique identifier that is used end-to-end. - // - set by higher layers such as end user or SDK - // - passed to the endorser (which will check for uniqueness) - // - as the header is passed along unchanged, it will be + // - set by higher layers such as end user or SDK + // - passed to the endorser (which will check for uniqueness) + // - as the header is passed along unchanged, it will be // be retrieved by the committer (uniqueness check here as well) - // - to be stored in the ledger + // - to be stored in the ledger TxId string `protobuf:"bytes,5,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // The epoch in which this header was generated, where epoch is defined based on block height // Epoch in which the response has been generated. This field identifies a // logical window of time. A proposal response is accepted by a peer only if // two conditions hold: - // 1. the epoch specified in the message is the current epoch - // 2. this message has been only seen once during this epoch (i.e. it hasn't - // been replayed) + // 1. the epoch specified in the message is the current epoch + // 2. this message has been only seen once during this epoch (i.e. it hasn't + // been replayed) Epoch uint64 `protobuf:"varint,6,opt,name=epoch,proto3" json:"epoch,omitempty"` // Extension that may be attached based on the header type Extension []byte `protobuf:"bytes,7,opt,name=extension,proto3" json:"extension,omitempty"` diff --git a/common/configtx.pb.go b/common/configtx.pb.go index fdb3554..7e7fc5e 100644 --- a/common/configtx.pb.go +++ b/common/configtx.pb.go @@ -24,23 +24,23 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // on previous configuration transactions. // // It is generated with the following scheme: -// 1. Retrieve the existing configuration -// 2. Note the config properties (ConfigValue, ConfigPolicy, ConfigGroup) to be modified -// 3. Add any intermediate ConfigGroups to the ConfigUpdate.read_set (sparsely) -// 4. Add any additional desired dependencies to ConfigUpdate.read_set (sparsely) -// 5. Modify the config properties, incrementing each version by 1, set them in the ConfigUpdate.write_set -// Note: any element not modified but specified should already be in the read_set, so may be specified sparsely -// 6. Create ConfigUpdate message and marshal it into ConfigUpdateEnvelope.update and encode the required signatures +// 1. Retrieve the existing configuration +// 2. Note the config properties (ConfigValue, ConfigPolicy, ConfigGroup) to be modified +// 3. Add any intermediate ConfigGroups to the ConfigUpdate.read_set (sparsely) +// 4. Add any additional desired dependencies to ConfigUpdate.read_set (sparsely) +// 5. Modify the config properties, incrementing each version by 1, set them in the ConfigUpdate.write_set +// Note: any element not modified but specified should already be in the read_set, so may be specified sparsely +// 6. Create ConfigUpdate message and marshal it into ConfigUpdateEnvelope.update and encode the required signatures // a) Each signature is of type ConfigSignature // b) The ConfigSignature signature is over the concatenation of signature_header and the ConfigUpdate bytes (which includes a ChainHeader) -// 5. Submit new Config for ordering in Envelope signed by submitter +// 5. Submit new Config for ordering in Envelope signed by submitter // a) The Envelope Payload has data set to the marshaled ConfigEnvelope // b) The Envelope Payload has a header of type Header.Type.CONFIG_UPDATE // // The configuration manager will verify: -// 1. All items in the read_set exist at the read versions -// 2. All items in the write_set at a different version than, or not in, the read_set have been appropriately signed according to their mod_policy -// 3. The new configuration satisfies the ConfigSchema +// 1. All items in the read_set exist at the read versions +// 2. All items in the write_set at a different version than, or not in, the read_set have been appropriately signed according to their mod_policy +// 3. The new configuration satisfies the ConfigSchema type ConfigEnvelope struct { Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` LastUpdate *Envelope `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` @@ -186,12 +186,12 @@ func (m *ConfigUpdateEnvelope) GetSignatures() []*ConfigSignature { // ConfigUpdate is used to submit a subset of config and to have the orderer apply to Config // it is always submitted inside a ConfigUpdateEnvelope which allows the addition of signatures // resulting in a new total configuration. The update is applied as follows: -// 1. The versions from all of the elements in the read_set is verified against the versions in the existing config. -// If there is a mismatch in the read versions, then the config update fails and is rejected. -// 2. Any elements in the write_set with the same version as the read_set are ignored. -// 3. The corresponding mod_policy for every remaining element in the write_set is collected. -// 4. Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected -// 5. The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal +// 1. The versions from all of the elements in the read_set is verified against the versions in the existing config. +// If there is a mismatch in the read versions, then the config update fails and is rejected. +// 2. Any elements in the write_set with the same version as the read_set are ignored. +// 3. The corresponding mod_policy for every remaining element in the write_set is collected. +// 4. Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected +// 5. The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal type ConfigUpdate struct { ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` ReadSet *ConfigGroup `protobuf:"bytes,2,opt,name=read_set,json=readSet,proto3" json:"read_set,omitempty"` diff --git a/common/policies.pb.go b/common/policies.pb.go index eb76cb3..7dcbbdf 100644 --- a/common/policies.pb.go +++ b/common/policies.pb.go @@ -193,6 +193,7 @@ func (m *SignaturePolicyEnvelope) GetIdentities() []*msp.MSPPrincipal { // and will be the CA for more traditional certificates type SignaturePolicy struct { // Types that are valid to be assigned to Type: + // // *SignaturePolicy_SignedBy // *SignaturePolicy_NOutOf_ Type isSignaturePolicy_Type `protobuf_oneof:"Type"` @@ -379,6 +380,7 @@ func (m *ImplicitMetaPolicy) GetRule() ImplicitMetaPolicy_Rule { // Deprecated: Do not use. type ApplicationPolicy struct { // Types that are valid to be assigned to Type: + // // *ApplicationPolicy_SignaturePolicy // *ApplicationPolicy_ChannelConfigPolicyReference Type isApplicationPolicy_Type `protobuf_oneof:"Type"` diff --git a/discovery/protocol.pb.go b/discovery/protocol.pb.go index cef9adc..30fb693 100644 --- a/discovery/protocol.pb.go +++ b/discovery/protocol.pb.go @@ -234,6 +234,7 @@ func (m *AuthInfo) GetClientTlsCertHash() []byte { type Query struct { Channel string `protobuf:"bytes,1,opt,name=channel,proto3" json:"channel,omitempty"` // Types that are valid to be assigned to Query: + // // *Query_ConfigQuery // *Query_PeerQuery // *Query_CcQuery @@ -355,6 +356,7 @@ func (*Query) XXX_OneofWrappers() []interface{} { // QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request. type QueryResult struct { // Types that are valid to be assigned to Result: + // // *QueryResult_Error // *QueryResult_ConfigResult // *QueryResult_CcQueryRes @@ -749,13 +751,13 @@ var xxx_messageInfo_LocalPeerQuery proto.InternalMessageInfo // Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor: // Let e: G --> P be the endorsers_by_groups field that maps a group to a set of peers. // Note that applying e on a group g yields a set of peers. -// 1) Select a layout l: G --> N out of the layouts given. -// l is the quantities_by_group field of a Layout, and it maps a group to an integer. -// 2) R = {} (an empty set of peers) -// 3) For each group g in the layout l, compute n = l(g) -// 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g) -// 3.2) R = R U P_g (add P_g to R) -// 4) The set of peers R is the peers the client needs to request endorsements from +// 1. Select a layout l: G --> N out of the layouts given. +// l is the quantities_by_group field of a Layout, and it maps a group to an integer. +// 2. R = {} (an empty set of peers) +// 3. For each group g in the layout l, compute n = l(g) +// 3.1) Denote P_g as a set of n random peers {p0, p1, ... p_n} selected from e(g) +// 3.2) R = R U P_g (add P_g to R) +// 4. The set of peers R is the peers the client needs to request endorsements from type EndorsementDescriptor struct { Chaincode string `protobuf:"bytes,1,opt,name=chaincode,proto3" json:"chaincode,omitempty"` // Specifies the endorsers, separated to groups. diff --git a/gossip/message.pb.go b/gossip/message.pb.go index c4944b7..92da452 100644 --- a/gossip/message.pb.go +++ b/gossip/message.pb.go @@ -206,6 +206,7 @@ func (m *SecretEnvelope) GetSignature() []byte { // the Envelope shouldn't know the secret's content. type Secret struct { // Types that are valid to be assigned to Content: + // // *Secret_InternalEndpoint Content isSecret_Content `protobuf_oneof:"content"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -282,6 +283,7 @@ type GossipMessage struct { // to forward the message Tag GossipMessage_Tag `protobuf:"varint,3,opt,name=tag,proto3,enum=gossip.GossipMessage_Tag" json:"tag,omitempty"` // Types that are valid to be assigned to Content: + // // *GossipMessage_AliveMsg // *GossipMessage_MemReq // *GossipMessage_MemRes diff --git a/ledger/rwset/kvrwset/kv_rwset.pb.go b/ledger/rwset/kvrwset/kv_rwset.pb.go index 19b86e8..1f98515 100644 --- a/ledger/rwset/kvrwset/kv_rwset.pb.go +++ b/ledger/rwset/kvrwset/kv_rwset.pb.go @@ -566,6 +566,7 @@ type RangeQueryInfo struct { EndKey string `protobuf:"bytes,2,opt,name=end_key,json=endKey,proto3" json:"end_key,omitempty"` ItrExhausted bool `protobuf:"varint,3,opt,name=itr_exhausted,json=itrExhausted,proto3" json:"itr_exhausted,omitempty"` // Types that are valid to be assigned to ReadsInfo: + // // *RangeQueryInfo_RawReads // *RangeQueryInfo_ReadsMerkleHashes ReadsInfo isRangeQueryInfo_ReadsInfo `protobuf_oneof:"reads_info"` diff --git a/msp/msp_principal.pb.go b/msp/msp_principal.pb.go index 028c1a6..8ebc3c9 100644 --- a/msp/msp_principal.pb.go +++ b/msp/msp_principal.pb.go @@ -122,22 +122,23 @@ func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor() ([]byte, [ // MSPPrincipal aims to represent an MSP-centric set of identities. // In particular, this structure allows for definition of -// - a group of identities that are member of the same MSP -// - a group of identities that are member of the same organization unit -// in the same MSP -// - a group of identities that are administering a specific MSP -// - a specific identity +// - a group of identities that are member of the same MSP +// - a group of identities that are member of the same organization unit +// in the same MSP +// - a group of identities that are administering a specific MSP +// - a specific identity +// // Expressing these groups is done given two fields of the fields below -// - Classification, that defines the type of classification of identities -// in an MSP this principal would be defined on; Classification can take -// three values: +// - Classification, that defines the type of classification of identities +// in an MSP this principal would be defined on; Classification can take +// three values: // (i) ByMSPRole: that represents a classification of identities within -// MSP based on one of the two pre-defined MSP rules, "member" and "admin" +// MSP based on one of the two pre-defined MSP rules, "member" and "admin" // (ii) ByOrganizationUnit: that represents a classification of identities -// within MSP based on the organization unit an identity belongs to +// within MSP based on the organization unit an identity belongs to // (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single -// identity/certificate; this would mean that the Principal bytes -// message +// identity/certificate; this would mean that the Principal bytes +// message type MSPPrincipal struct { // Classification describes the way that one should process // Principal. An Classification value of "ByOrganizationUnit" reflects diff --git a/orderer/ab.pb.go b/orderer/ab.pb.go index 707cb3a..f28aa55 100644 --- a/orderer/ab.pb.go +++ b/orderer/ab.pb.go @@ -300,6 +300,7 @@ var xxx_messageInfo_SeekNextCommit proto.InternalMessageInfo type SeekPosition struct { // Types that are valid to be assigned to Type: + // // *SeekPosition_Newest // *SeekPosition_Oldest // *SeekPosition_Specified @@ -485,6 +486,7 @@ func (m *SeekInfo) GetContentType() SeekInfo_SeekContentType { type DeliverResponse struct { // Types that are valid to be assigned to Type: + // // *DeliverResponse_Status // *DeliverResponse_Block Type isDeliverResponse_Type `protobuf_oneof:"Type"` diff --git a/orderer/blockattestation.pb.go b/orderer/blockattestation.pb.go index 5901c7b..a0cc117 100644 --- a/orderer/blockattestation.pb.go +++ b/orderer/blockattestation.pb.go @@ -74,6 +74,7 @@ func (m *BlockAttestation) GetMetadata() *common.BlockMetadata { type BlockAttestationResponse struct { // Types that are valid to be assigned to Type: + // // *BlockAttestationResponse_Status // *BlockAttestationResponse_BlockAttestation Type isBlockAttestationResponse_Type `protobuf_oneof:"Type"` diff --git a/orderer/cluster.pb.go b/orderer/cluster.pb.go index 398c2b6..7a7566a 100644 --- a/orderer/cluster.pb.go +++ b/orderer/cluster.pb.go @@ -28,6 +28,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // StepRequest wraps a message that is sent to a cluster member. type StepRequest struct { // Types that are valid to be assigned to Payload: + // // *StepRequest_ConsensusRequest // *StepRequest_SubmitRequest Payload isStepRequest_Payload `protobuf_oneof:"payload"` @@ -109,6 +110,7 @@ func (*StepRequest) XXX_OneofWrappers() []interface{} { // StepResponse is a message received from a cluster member. type StepResponse struct { // Types that are valid to be assigned to Payload: + // // *StepResponse_SubmitRes Payload isStepResponse_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/orderer/clusterserver.pb.go b/orderer/clusterserver.pb.go index 8e3c023..ca2730d 100644 --- a/orderer/clusterserver.pb.go +++ b/orderer/clusterserver.pb.go @@ -29,6 +29,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // ClusterNodeServiceStepRequest wraps a message that is sent to a cluster member. type ClusterNodeServiceStepRequest struct { // Types that are valid to be assigned to Payload: + // // *ClusterNodeServiceStepRequest_NodeConrequest // *ClusterNodeServiceStepRequest_NodeTranrequest // *ClusterNodeServiceStepRequest_NodeAuthrequest @@ -125,6 +126,7 @@ func (*ClusterNodeServiceStepRequest) XXX_OneofWrappers() []interface{} { // ClusterNodeServiceStepResponse is a message received from a cluster member. type ClusterNodeServiceStepResponse struct { // Types that are valid to be assigned to Payload: + // // *ClusterNodeServiceStepResponse_TranorderRes Payload isClusterNodeServiceStepResponse_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/peer/chaincode.pb.go b/peer/chaincode.pb.go index 142f892..8774385 100644 --- a/peer/chaincode.pb.go +++ b/peer/chaincode.pb.go @@ -55,20 +55,20 @@ func (ChaincodeSpec_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor_202814c635ff5fee, []int{2, 0} } -//ChaincodeID contains the path as specified by the deploy transaction -//that created it as well as the hashCode that is generated by the -//system for the path. From the user level (ie, CLI, REST API and so on) -//deploy transaction is expected to provide the path and other requests -//are expected to provide the hashCode. The other value will be ignored. -//Internally, the structure could contain both values. For instance, the -//hashCode will be set when first generated using the path +// ChaincodeID contains the path as specified by the deploy transaction +// that created it as well as the hashCode that is generated by the +// system for the path. From the user level (ie, CLI, REST API and so on) +// deploy transaction is expected to provide the path and other requests +// are expected to provide the hashCode. The other value will be ignored. +// Internally, the structure could contain both values. For instance, the +// hashCode will be set when first generated using the path type ChaincodeID struct { - //deploy transaction will use the path + // deploy transaction will use the path Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - //all other requests will use the name (really a hashcode) generated by - //the deploy transaction + // all other requests will use the name (really a hashcode) generated by + // the deploy transaction Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - //user friendly version name for the chaincode + // user friendly version name for the chaincode Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/peer/chaincode_event.pb.go b/peer/chaincode_event.pb.go index 8f46696..b7d5354 100644 --- a/peer/chaincode_event.pb.go +++ b/peer/chaincode_event.pb.go @@ -20,8 +20,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package -//ChaincodeEvent is used for events and registrations that are specific to chaincode -//string type - "chaincode" +// ChaincodeEvent is used for events and registrations that are specific to chaincode +// string type - "chaincode" type ChaincodeEvent struct { ChaincodeId string `protobuf:"bytes,1,opt,name=chaincode_id,json=chaincodeId,proto3" json:"chaincode_id,omitempty"` TxId string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` diff --git a/peer/chaincode_shim.pb.go b/peer/chaincode_shim.pb.go index 1037099..5cf84bd 100644 --- a/peer/chaincode_shim.pb.go +++ b/peer/chaincode_shim.pb.go @@ -119,11 +119,11 @@ type ChaincodeMessage struct { Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` Txid string `protobuf:"bytes,4,opt,name=txid,proto3" json:"txid,omitempty"` Proposal *SignedProposal `protobuf:"bytes,5,opt,name=proposal,proto3" json:"proposal,omitempty"` - //event emitted by chaincode. Used only with Init or Invoke. + // event emitted by chaincode. Used only with Init or Invoke. // This event is then stored (currently) - //with Block.NonHashData.TransactionResult + // with Block.NonHashData.TransactionResult ChaincodeEvent *ChaincodeEvent `protobuf:"bytes,6,opt,name=chaincode_event,json=chaincodeEvent,proto3" json:"chaincode_event,omitempty"` - //channel id + // channel id ChannelId string `protobuf:"bytes,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/peer/collection.pb.go b/peer/collection.pb.go index 1fcfea1..a36a184 100644 --- a/peer/collection.pb.go +++ b/peer/collection.pb.go @@ -68,6 +68,7 @@ func (m *CollectionConfigPackage) GetConfig() []*CollectionConfig { // Dynamic collections are deferred. type CollectionConfig struct { // Types that are valid to be assigned to Payload: + // // *CollectionConfig_StaticCollectionConfig Payload isCollectionConfig_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -257,6 +258,7 @@ func (m *StaticCollectionConfig) GetEndorsementPolicy() *ApplicationPolicy { // configuration may in the future contain a string reference to a policy. type CollectionPolicyConfig struct { // Types that are valid to be assigned to Payload: + // // *CollectionPolicyConfig_SignaturePolicy Payload isCollectionPolicyConfig_Payload `protobuf_oneof:"payload"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/peer/events.pb.go b/peer/events.pb.go index 1f68f9e..a4dee92 100644 --- a/peer/events.pb.go +++ b/peer/events.pb.go @@ -89,6 +89,7 @@ type FilteredTransaction struct { Type common.HeaderType `protobuf:"varint,2,opt,name=type,proto3,enum=common.HeaderType" json:"type,omitempty"` TxValidationCode TxValidationCode `protobuf:"varint,3,opt,name=tx_validation_code,json=txValidationCode,proto3,enum=protos.TxValidationCode" json:"tx_validation_code,omitempty"` // Types that are valid to be assigned to Data: + // // *FilteredTransaction_TransactionActions Data isFilteredTransaction_Data `protobuf_oneof:"Data"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -307,6 +308,7 @@ func (m *BlockAndPrivateData) GetPrivateDataMap() map[uint64]*rwset.TxPvtReadWri // DeliverResponse type DeliverResponse struct { // Types that are valid to be assigned to Type: + // // *DeliverResponse_Status // *DeliverResponse_Block // *DeliverResponse_FilteredBlock diff --git a/peer/lifecycle/db.pb.go b/peer/lifecycle/db.pb.go index 8284d16..dd03619 100644 --- a/peer/lifecycle/db.pb.go +++ b/peer/lifecycle/db.pb.go @@ -73,6 +73,7 @@ func (m *StateMetadata) GetFields() []string { // StateData encodes a particular field of a datatype type StateData struct { // Types that are valid to be assigned to Type: + // // *StateData_Int64 // *StateData_Bytes // *StateData_String_ diff --git a/peer/lifecycle/lifecycle.pb.go b/peer/lifecycle/lifecycle.pb.go index f07bfdc..62ab2ef 100644 --- a/peer/lifecycle/lifecycle.pb.go +++ b/peer/lifecycle/lifecycle.pb.go @@ -718,6 +718,7 @@ func (m *ApproveChaincodeDefinitionForMyOrgArgs) GetSource() *ChaincodeSource { type ChaincodeSource struct { // Types that are valid to be assigned to Type: + // // *ChaincodeSource_Unavailable_ // *ChaincodeSource_LocalPackage Type isChaincodeSource_Type `protobuf_oneof:"Type"` diff --git a/peer/policy.pb.go b/peer/policy.pb.go index dd9874a..23f414c 100644 --- a/peer/policy.pb.go +++ b/peer/policy.pb.go @@ -25,6 +25,7 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // are set and evaluted at the application level. type ApplicationPolicy struct { // Types that are valid to be assigned to Type: + // // *ApplicationPolicy_SignaturePolicy // *ApplicationPolicy_ChannelConfigPolicyReference Type isApplicationPolicy_Type `protobuf_oneof:"Type"` diff --git a/peer/proposal.pb.go b/peer/proposal.pb.go index 02e08fd..e34a4c8 100644 --- a/peer/proposal.pb.go +++ b/peer/proposal.pb.go @@ -28,22 +28,22 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // When an endorser receives a SignedProposal message, it should verify the // signature over the proposal bytes. This verification requires the following // steps: -// 1. Verification of the validity of the certificate that was used to produce -// the signature. The certificate will be available once proposalBytes has -// been unmarshalled to a Proposal message, and Proposal.header has been -// unmarshalled to a Header message. While this unmarshalling-before-verifying -// might not be ideal, it is unavoidable because i) the signature needs to also -// protect the signing certificate; ii) it is desirable that Header is created -// once by the client and never changed (for the sake of accountability and -// non-repudiation). Note also that it is actually impossible to conclusively -// verify the validity of the certificate included in a Proposal, because the -// proposal needs to first be endorsed and ordered with respect to certificate -// expiration transactions. Still, it is useful to pre-filter expired -// certificates at this stage. -// 2. Verification that the certificate is trusted (signed by a trusted CA) and -// that it is allowed to transact with us (with respect to some ACLs); -// 3. Verification that the signature on proposalBytes is valid; -// 4. Detect replay attacks; +// 1. Verification of the validity of the certificate that was used to produce +// the signature. The certificate will be available once proposalBytes has +// been unmarshalled to a Proposal message, and Proposal.header has been +// unmarshalled to a Header message. While this unmarshalling-before-verifying +// might not be ideal, it is unavoidable because i) the signature needs to also +// protect the signing certificate; ii) it is desirable that Header is created +// once by the client and never changed (for the sake of accountability and +// non-repudiation). Note also that it is actually impossible to conclusively +// verify the validity of the certificate included in a Proposal, because the +// proposal needs to first be endorsed and ordered with respect to certificate +// expiration transactions. Still, it is useful to pre-filter expired +// certificates at this stage. +// 2. Verification that the certificate is trusted (signed by a trusted CA) and +// that it is allowed to transact with us (with respect to some ACLs); +// 3. Verification that the signature on proposalBytes is valid; +// 4. Detect replay attacks; type SignedProposal struct { // The bytes of Proposal ProposalBytes []byte `protobuf:"bytes,1,opt,name=proposal_bytes,json=proposalBytes,proto3" json:"proposal_bytes,omitempty"` @@ -96,24 +96,24 @@ func (m *SignedProposal) GetSignature() []byte { } // A Proposal is sent to an endorser for endorsement. The proposal contains: -// 1. A header which should be unmarshaled to a Header message. Note that -// Header is both the header of a Proposal and of a Transaction, in that i) -// both headers should be unmarshaled to this message; and ii) it is used to -// compute cryptographic hashes and signatures. The header has fields common -// to all proposals/transactions. In addition it has a type field for -// additional customization. An example of this is the ChaincodeHeaderExtension -// message used to extend the Header for type CHAINCODE. -// 2. A payload whose type depends on the header's type field. -// 3. An extension whose type depends on the header's type field. +// 1. A header which should be unmarshaled to a Header message. Note that +// Header is both the header of a Proposal and of a Transaction, in that i) +// both headers should be unmarshaled to this message; and ii) it is used to +// compute cryptographic hashes and signatures. The header has fields common +// to all proposals/transactions. In addition it has a type field for +// additional customization. An example of this is the ChaincodeHeaderExtension +// message used to extend the Header for type CHAINCODE. +// 2. A payload whose type depends on the header's type field. +// 3. An extension whose type depends on the header's type field. // // Let us see an example. For type CHAINCODE (see the Header message), // we have the following: -// 1. The header is a Header message whose extensions field is a -// ChaincodeHeaderExtension message. -// 2. The payload is a ChaincodeProposalPayload message. -// 3. The extension is a ChaincodeAction that might be used to ask the -// endorsers to endorse a specific ChaincodeAction, thus emulating the -// submitting peer model. +// 1. The header is a Header message whose extensions field is a +// ChaincodeHeaderExtension message. +// 2. The payload is a ChaincodeProposalPayload message. +// 3. The extension is a ChaincodeAction that might be used to ask the +// endorsers to endorse a specific ChaincodeAction, thus emulating the +// submitting peer model. type Proposal struct { // The header of the proposal. It is the bytes of the Header Header []byte `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` diff --git a/peer/query.pb.go b/peer/query.pb.go index 02976c8..ae38ca3 100644 --- a/peer/query.pb.go +++ b/peer/query.pb.go @@ -81,9 +81,10 @@ type ChaincodeInfo struct { Vscc string `protobuf:"bytes,6,opt,name=vscc,proto3" json:"vscc,omitempty"` // the chaincode unique id. // computed as: H( - // H(name || version) || - // H(CodePackage) - // ) + // + // H(name || version) || + // H(CodePackage) + // ) Id []byte `protobuf:"bytes,7,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"`