From 31b9c402b376e76419a1402df571a4b1ac804b15 Mon Sep 17 00:00:00 2001 From: Jason Yellick Date: Fri, 3 Feb 2017 11:31:29 -0500 Subject: [PATCH] [FAB-2029] Fix proto enum style https://jira.hyperledger.org/browse/FAB-2029 Per the official proto style guide, enums should be UPPER_CASE but the current code has a mixture of UPPER_CASE and CamelCase. This is internal inconsistency is a problem, and this CR fixes the fabric protos to adhere to the official proto style. Change-Id: I95af90f29f9e8fa8a6eecbb528516cccc3187979 Signed-off-by: Jason Yellick --- common/cauthdsl/cauthdsl_builder.go | 6 +- common/cauthdsl/policy_test.go | 2 +- common/cauthdsl/policy_util.go | 2 +- common/cauthdsl/policyparser.go | 6 +- common/cauthdsl/policyparser_test.go | 44 +++---- common/chainconfig/chainconfig.go | 2 +- common/chainconfig/chainconfig_test.go | 2 +- common/chainconfig/chainconfig_util.go | 6 +- .../handlers/application/sharedconfig.go | 2 +- .../handlers/application/sharedconfig_test.go | 2 +- .../handlers/application/sharedconfig_util.go | 2 +- .../configtx/handlers/orderer/sharedconfig.go | 2 +- .../handlers/orderer/sharedconfig_test.go | 2 +- .../handlers/orderer/sharedconfig_util.go | 14 +-- common/configtx/inspector/orderer_types.go | 2 +- common/configtx/inspector/policy_types.go | 2 +- common/configtx/resources.go | 4 +- common/configtx/template.go | 10 +- common/configtx/template_test.go | 14 +-- common/configtx/util.go | 8 +- common/policies/policy.go | 2 +- core/peer/peer.go | 2 +- msp/mspimpl.go | 10 +- orderer/multichain/manager.go | 2 +- orderer/multichain/systemchain.go | 2 +- orderer/multichain/util_test.go | 2 +- protos/common/configtx.pb.go | 108 +++++++++--------- protos/common/configtx.proto | 9 +- protos/common/msp_principal.pb.go | 76 ++++++------ protos/common/msp_principal.proto | 11 +- protos/peer/transaction.pb.go | 78 ++++++------- protos/peer/transaction.proto | 5 +- 32 files changed, 219 insertions(+), 222 deletions(-) diff --git a/common/cauthdsl/cauthdsl_builder.go b/common/cauthdsl/cauthdsl_builder.go index 4b806a69d44..24d953bc84c 100644 --- a/common/cauthdsl/cauthdsl_builder.go +++ b/common/cauthdsl/cauthdsl_builder.go @@ -55,7 +55,7 @@ func init() { func Envelope(policy *cb.SignaturePolicy, identities [][]byte) *cb.SignaturePolicyEnvelope { ids := make([]*cb.MSPPrincipal, len(identities)) for i, _ := range ids { - ids[i] = &cb.MSPPrincipal{PrincipalClassification: cb.MSPPrincipal_ByIdentity, Principal: identities[i]} + ids[i] = &cb.MSPPrincipal{PrincipalClassification: cb.MSPPrincipal_IDENTITY, Principal: identities[i]} } return &cb.SignaturePolicyEnvelope{ @@ -79,8 +79,8 @@ func SignedBy(index int32) *cb.SignaturePolicy { func SignedByMspMember(mspId string) *cb.SignaturePolicyEnvelope { // specify the principal: it's a member of the msp we just found principal := &cb.MSPPrincipal{ - PrincipalClassification: cb.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&cb.MSPRole{Role: cb.MSPRole_Member, MSPIdentifier: mspId})} + PrincipalClassification: cb.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&cb.MSPRole{Role: cb.MSPRole_MEMBER, MSPIdentifier: mspId})} // create the policy: it requires exactly 1 signature from the first (and only) principal p := &cb.SignaturePolicyEnvelope{ diff --git a/common/cauthdsl/policy_test.go b/common/cauthdsl/policy_test.go index c1ceb0f7097..99df15c13a8 100644 --- a/common/cauthdsl/policy_test.go +++ b/common/cauthdsl/policy_test.go @@ -60,7 +60,7 @@ func makePolicySource(policyResult bool) []byte { func addPolicy(manager *policies.ManagerImpl, id string, policy []byte) { manager.BeginConfig() err := manager.ProposeConfig(&cb.ConfigItem{ - Type: cb.ConfigItem_Policy, + Type: cb.ConfigItem_POLICY, Key: id, Value: policy, }) diff --git a/common/cauthdsl/policy_util.go b/common/cauthdsl/policy_util.go index 04d8f38e7e0..5a7a1bd2955 100644 --- a/common/cauthdsl/policy_util.go +++ b/common/cauthdsl/policy_util.go @@ -24,7 +24,7 @@ import ( // TemplatePolicy creates a headerless configuration item representing a policy for a given key func TemplatePolicy(key string, sigPolicyEnv *cb.SignaturePolicyEnvelope) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Policy, + Type: cb.ConfigItem_POLICY, Key: key, Value: utils.MarshalOrPanic(&cb.Policy{ Type: int32(cb.Policy_SIGNATURE), diff --git a/common/cauthdsl/policyparser.go b/common/cauthdsl/policyparser.go index 781ae5c4da0..6b2de04f230 100644 --- a/common/cauthdsl/policyparser.go +++ b/common/cauthdsl/policyparser.go @@ -140,14 +140,14 @@ func secondPass(args ...interface{}) (interface{}, error) { /* get the right role */ var r common.MSPRole_MSPRoleType if subm[0][3] == "member" { - r = common.MSPRole_Member + r = common.MSPRole_MEMBER } else { - r = common.MSPRole_Admin + r = common.MSPRole_ADMIN } /* build the principal we've been told */ p := &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, + PrincipalClassification: common.MSPPrincipal_ROLE, Principal: utils.MarshalOrPanic(&common.MSPRole{MSPIdentifier: subm[0][1], Role: r})} ctx.principals = append(ctx.principals, p) diff --git a/common/cauthdsl/policyparser_test.go b/common/cauthdsl/policyparser_test.go index 14b5767b08b..43becc44831 100644 --- a/common/cauthdsl/policyparser_test.go +++ b/common/cauthdsl/policyparser_test.go @@ -32,12 +32,12 @@ func TestAnd(t *testing.T) { principals := make([]*common.MSPPrincipal, 0) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "A"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "A"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "B"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "B"})}) p2 := &common.SignaturePolicyEnvelope{ Version: 0, @@ -55,12 +55,12 @@ func TestOr(t *testing.T) { principals := make([]*common.MSPPrincipal, 0) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "A"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "A"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "B"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "B"})}) p2 := &common.SignaturePolicyEnvelope{ Version: 0, @@ -78,16 +78,16 @@ func TestComplex1(t *testing.T) { principals := make([]*common.MSPPrincipal, 0) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "B"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "B"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "C"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "C"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "A"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "A"})}) p2 := &common.SignaturePolicyEnvelope{ Version: 0, @@ -105,20 +105,20 @@ func TestComplex2(t *testing.T) { principals := make([]*common.MSPPrincipal, 0) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "A"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "A"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "B"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "B"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Admin, MSPIdentifier: "C"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_ADMIN, MSPIdentifier: "C"})}) principals = append(principals, &common.MSPPrincipal{ - PrincipalClassification: common.MSPPrincipal_ByMSPRole, - Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_Member, MSPIdentifier: "D"})}) + PrincipalClassification: common.MSPPrincipal_ROLE, + Principal: utils.MarshalOrPanic(&common.MSPRole{Role: common.MSPRole_MEMBER, MSPIdentifier: "D"})}) p2 := &common.SignaturePolicyEnvelope{ Version: 0, diff --git a/common/chainconfig/chainconfig.go b/common/chainconfig/chainconfig.go index dedce43c476..f5f7c22573e 100644 --- a/common/chainconfig/chainconfig.go +++ b/common/chainconfig/chainconfig.go @@ -123,7 +123,7 @@ func (pm *DescriptorImpl) CommitConfig() { // ProposeConfig is used to add new config to the config proposal func (pm *DescriptorImpl) ProposeConfig(configItem *cb.ConfigItem) error { - if configItem.Type != cb.ConfigItem_Chain { + if configItem.Type != cb.ConfigItem_CHAIN { return fmt.Errorf("Expected type of ConfigItem_Chain, got %v", configItem.Type) } diff --git a/common/chainconfig/chainconfig_test.go b/common/chainconfig/chainconfig_test.go index b9954bbcd17..96dd0ae4444 100644 --- a/common/chainconfig/chainconfig_test.go +++ b/common/chainconfig/chainconfig_test.go @@ -31,7 +31,7 @@ func init() { func makeInvalidConfigItem(key string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Chain, + Type: cb.ConfigItem_CHAIN, Key: key, Value: []byte("Garbage Data"), } diff --git a/common/chainconfig/chainconfig_util.go b/common/chainconfig/chainconfig_util.go index b0879eeffa0..c60c5162414 100644 --- a/common/chainconfig/chainconfig_util.go +++ b/common/chainconfig/chainconfig_util.go @@ -28,7 +28,7 @@ const defaultHashingAlgorithm = SHA3Shake256 // TemplateHashingAlgorithm creates a headerless config item representing the hashing algorithm func TemplateHashingAlgorithm(name string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Chain, + Type: cb.ConfigItem_CHAIN, Key: HashingAlgorithmKey, Value: utils.MarshalOrPanic(&cb.HashingAlgorithm{Name: name}), } @@ -45,7 +45,7 @@ const defaultBlockDataHashingStructureWidth = math.MaxUint32 // TemplateBlockDataHashingStructure creates a headerless config item representing the block data hashing structure func TemplateBlockDataHashingStructure(width uint32) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Chain, + Type: cb.ConfigItem_CHAIN, Key: BlockDataHashingStructureKey, Value: utils.MarshalOrPanic(&cb.BlockDataHashingStructure{Width: width}), } @@ -61,7 +61,7 @@ var defaultOrdererAddresses = []string{"127.0.0.1:7050"} // TemplateOrdererAddressess creates a headerless config item representing the orderer addresses func TemplateOrdererAddresses(addresses []string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Chain, + Type: cb.ConfigItem_CHAIN, Key: OrdererAddressesKey, Value: utils.MarshalOrPanic(&cb.OrdererAddresses{Addresses: addresses}), } diff --git a/common/configtx/handlers/application/sharedconfig.go b/common/configtx/handlers/application/sharedconfig.go index 008070440e1..6ecf2db722a 100644 --- a/common/configtx/handlers/application/sharedconfig.go +++ b/common/configtx/handlers/application/sharedconfig.go @@ -84,7 +84,7 @@ func (di *SharedConfigImpl) CommitConfig() { // ProposeConfig is used to add new config to the config proposal func (di *SharedConfigImpl) ProposeConfig(configItem *cb.ConfigItem) error { - if configItem.Type != cb.ConfigItem_Peer { + if configItem.Type != cb.ConfigItem_PEER { return fmt.Errorf("Expected type of ConfigItem_Peer, got %v", configItem.Type) } diff --git a/common/configtx/handlers/application/sharedconfig_test.go b/common/configtx/handlers/application/sharedconfig_test.go index a509cbbe831..d7fb2457ec7 100644 --- a/common/configtx/handlers/application/sharedconfig_test.go +++ b/common/configtx/handlers/application/sharedconfig_test.go @@ -33,7 +33,7 @@ func init() { func makeInvalidConfigItem(key string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Peer, + Type: cb.ConfigItem_PEER, Key: key, Value: []byte("Garbage Data"), } diff --git a/common/configtx/handlers/application/sharedconfig_util.go b/common/configtx/handlers/application/sharedconfig_util.go index d3e78e472a9..9075ab4c865 100644 --- a/common/configtx/handlers/application/sharedconfig_util.go +++ b/common/configtx/handlers/application/sharedconfig_util.go @@ -27,7 +27,7 @@ var defaultAnchorPeers = []*pb.AnchorPeer{} // TemplateAnchorPeers creates a headerless config item representing the anchor peers func TemplateAnchorPeers(anchorPeers []*pb.AnchorPeer) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Peer, + Type: cb.ConfigItem_PEER, Key: AnchorPeersKey, Value: utils.MarshalOrPanic(&pb.AnchorPeers{AnchorPeers: anchorPeers}), } diff --git a/common/configtx/handlers/orderer/sharedconfig.go b/common/configtx/handlers/orderer/sharedconfig.go index 30317fa5ddc..ce7b6d04c7c 100644 --- a/common/configtx/handlers/orderer/sharedconfig.go +++ b/common/configtx/handlers/orderer/sharedconfig.go @@ -143,7 +143,7 @@ func (pm *ManagerImpl) CommitConfig() { // ProposeConfig is used to add new config to the config proposal func (pm *ManagerImpl) ProposeConfig(configItem *cb.ConfigItem) error { - if configItem.Type != cb.ConfigItem_Orderer { + if configItem.Type != cb.ConfigItem_ORDERER { return fmt.Errorf("Expected type of ConfigItem_Orderer, got %v", configItem.Type) } diff --git a/common/configtx/handlers/orderer/sharedconfig_test.go b/common/configtx/handlers/orderer/sharedconfig_test.go index 2e01ecbeb8e..81957a7cb29 100644 --- a/common/configtx/handlers/orderer/sharedconfig_test.go +++ b/common/configtx/handlers/orderer/sharedconfig_test.go @@ -37,7 +37,7 @@ func init() { func invalidMessage(key string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: key, Value: []byte("Garbage Data"), } diff --git a/common/configtx/handlers/orderer/sharedconfig_util.go b/common/configtx/handlers/orderer/sharedconfig_util.go index 335955d876c..6e9a2b30abd 100644 --- a/common/configtx/handlers/orderer/sharedconfig_util.go +++ b/common/configtx/handlers/orderer/sharedconfig_util.go @@ -25,7 +25,7 @@ import ( // TemplateConsensusType creates a headerless config item representing the consensus type func TemplateConsensusType(typeValue string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: ConsensusTypeKey, Value: utils.MarshalOrPanic(&ab.ConsensusType{Type: typeValue}), } @@ -34,7 +34,7 @@ func TemplateConsensusType(typeValue string) *cb.ConfigItem { // TemplateBatchSize creates a headerless config item representing the batch size func TemplateBatchSize(batchSize *ab.BatchSize) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: BatchSizeKey, Value: utils.MarshalOrPanic(batchSize), } @@ -43,7 +43,7 @@ func TemplateBatchSize(batchSize *ab.BatchSize) *cb.ConfigItem { // TemplateBatchTimeout creates a headerless config item representing the batch timeout func TemplateBatchTimeout(batchTimeout string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: BatchTimeoutKey, Value: utils.MarshalOrPanic(&ab.BatchTimeout{Timeout: batchTimeout}), } @@ -52,7 +52,7 @@ func TemplateBatchTimeout(batchTimeout string) *cb.ConfigItem { // TemplateChainCreationPolicyNames creates a headerless configuraiton item representing the chain creation policy names func TemplateChainCreationPolicyNames(names []string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: ChainCreationPolicyNamesKey, Value: utils.MarshalOrPanic(&ab.ChainCreationPolicyNames{Names: names}), } @@ -61,7 +61,7 @@ func TemplateChainCreationPolicyNames(names []string) *cb.ConfigItem { // TemplateIngressPolicyNames creates a headerless config item representing the ingress policy names func TemplateIngressPolicyNames(names []string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: IngressPolicyNamesKey, Value: utils.MarshalOrPanic(&ab.IngressPolicyNames{Names: names}), } @@ -70,7 +70,7 @@ func TemplateIngressPolicyNames(names []string) *cb.ConfigItem { // TemplateEgressPolicyNames creates a headerless config item representing the egress policy names func TemplateEgressPolicyNames(names []string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: EgressPolicyNamesKey, Value: utils.MarshalOrPanic(&ab.EgressPolicyNames{Names: names}), } @@ -79,7 +79,7 @@ func TemplateEgressPolicyNames(names []string) *cb.ConfigItem { // TemplateKafkaBrokers creates a headerless config item representing the kafka brokers func TemplateKafkaBrokers(brokers []string) *cb.ConfigItem { return &cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: KafkaBrokersKey, Value: utils.MarshalOrPanic(&ab.KafkaBrokers{Brokers: brokers}), } diff --git a/common/configtx/inspector/orderer_types.go b/common/configtx/inspector/orderer_types.go index 485b37c2980..2e39cddae07 100644 --- a/common/configtx/inspector/orderer_types.go +++ b/common/configtx/inspector/orderer_types.go @@ -147,5 +147,5 @@ func viewableBatchSize(name string, batchSize *ab.BatchSize) Viewable { } func init() { - typeMap[cb.ConfigItem_Orderer] = ordererTypes{} + typeMap[cb.ConfigItem_ORDERER] = ordererTypes{} } diff --git a/common/configtx/inspector/policy_types.go b/common/configtx/inspector/policy_types.go index da67129be79..fa9e6eaa652 100644 --- a/common/configtx/inspector/policy_types.go +++ b/common/configtx/inspector/policy_types.go @@ -59,5 +59,5 @@ func viewableSignaturePolicyEnvelope(name string, signaturePolicyEnvelope *cb.Si } func init() { - typeMap[cb.ConfigItem_Policy] = policyTypes{} + typeMap[cb.ConfigItem_POLICY] = policyTypes{} } diff --git a/common/configtx/resources.go b/common/configtx/resources.go index d9a6b66bbdc..0655a0cac1a 100644 --- a/common/configtx/resources.go +++ b/common/configtx/resources.go @@ -76,9 +76,9 @@ func NewInitializer() api.Initializer { for ctype := range cb.ConfigItem_ConfigType_name { rtype := cb.ConfigItem_ConfigType(ctype) switch rtype { - case cb.ConfigItem_Chain: + case cb.ConfigItem_CHAIN: handlers[rtype] = chainConfig - case cb.ConfigItem_Policy: + case cb.ConfigItem_POLICY: handlers[rtype] = policyManager case cb.ConfigItem_MSP: handlers[rtype] = mspConfigHandler diff --git a/common/configtx/template.go b/common/configtx/template.go index 554e85a4cb4..e77bed82dd7 100644 --- a/common/configtx/template.go +++ b/common/configtx/template.go @@ -63,13 +63,13 @@ func (st *simpleTemplate) Envelope(chainID string) (*cb.ConfigEnvelope, error) { for _, item := range st.items { var values map[string]*cb.ConfigValue switch item.Type { - case cb.ConfigItem_Peer: + case cb.ConfigItem_PEER: values = channel.Groups[ApplicationGroup].Values - case cb.ConfigItem_Orderer: + case cb.ConfigItem_ORDERER: values = channel.Groups[OrdererGroup].Values - case cb.ConfigItem_Chain: + case cb.ConfigItem_CHAIN: values = channel.Values - case cb.ConfigItem_Policy: + case cb.ConfigItem_POLICY: logger.Debugf("Templating about policy %s", item.Key) policy := &cb.Policy{} err := proto.Unmarshal(item.Value, policy) @@ -190,7 +190,7 @@ func (ct *compositeTemplate) Envelope(chainID string) (*cb.ConfigEnvelope, error // a CompositeTemplate will invalidate the CreationPolicy func NewChainCreationTemplate(creationPolicy string, template Template) Template { creationPolicyTemplate := NewSimpleTemplate(&cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: CreationPolicyKey, Value: utils.MarshalOrPanic(&ab.CreationPolicy{ Policy: creationPolicy, diff --git a/common/configtx/template_test.go b/common/configtx/template_test.go index 06baf31e9d6..538bd7834fa 100644 --- a/common/configtx/template_test.go +++ b/common/configtx/template_test.go @@ -57,8 +57,8 @@ func verifyItemsResult(t *testing.T, template Template, count int) { func TestSimpleTemplate(t *testing.T) { simple := NewSimpleTemplate( - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "0"}, - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "1"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "0"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "1"}, ) verifyItemsResult(t, simple, 2) } @@ -66,11 +66,11 @@ func TestSimpleTemplate(t *testing.T) { func TestCompositeTemplate(t *testing.T) { composite := NewCompositeTemplate( NewSimpleTemplate( - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "0"}, - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "1"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "0"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "1"}, ), NewSimpleTemplate( - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "2"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "2"}, ), ) @@ -79,8 +79,8 @@ func TestCompositeTemplate(t *testing.T) { func TestNewChainTemplate(t *testing.T) { simple := NewSimpleTemplate( - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "0"}, - &cb.ConfigItem{Type: cb.ConfigItem_Orderer, Key: "1"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "0"}, + &cb.ConfigItem{Type: cb.ConfigItem_ORDERER, Key: "1"}, ) creationPolicy := "Test" diff --git a/common/configtx/util.go b/common/configtx/util.go index 01c469c1082..9b2d82b1ec5 100644 --- a/common/configtx/util.go +++ b/common/configtx/util.go @@ -57,7 +57,7 @@ func ConfigNextToConfig(config *cb.ConfigNext) *cb.Config { for key, value := range channel.Values { result.Items = append(result.Items, &cb.ConfigItem{ Key: key, - Type: cb.ConfigItem_Chain, + Type: cb.ConfigItem_CHAIN, Value: value.Value, }) } @@ -65,7 +65,7 @@ func ConfigNextToConfig(config *cb.ConfigNext) *cb.Config { for key, value := range channel.Groups[OrdererGroup].Values { result.Items = append(result.Items, &cb.ConfigItem{ Key: key, - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Value: value.Value, }) } @@ -73,7 +73,7 @@ func ConfigNextToConfig(config *cb.ConfigNext) *cb.Config { for key, value := range channel.Groups[ApplicationGroup].Values { result.Items = append(result.Items, &cb.ConfigItem{ Key: key, - Type: cb.ConfigItem_Peer, + Type: cb.ConfigItem_PEER, Value: value.Value, }) } @@ -83,7 +83,7 @@ func ConfigNextToConfig(config *cb.ConfigNext) *cb.Config { logger.Debugf("Reversing policy %s", key) result.Items = append(result.Items, &cb.ConfigItem{ Key: key, - Type: cb.ConfigItem_Policy, + Type: cb.ConfigItem_POLICY, Value: utils.MarshalOrPanic(value.Policy), }) } diff --git a/common/policies/policy.go b/common/policies/policy.go index 868a4f57162..8bac2823de7 100644 --- a/common/policies/policy.go +++ b/common/policies/policy.go @@ -108,7 +108,7 @@ func (pm *ManagerImpl) CommitConfig() { // ProposeConfig is used to add new config to the configuration proposal func (pm *ManagerImpl) ProposeConfig(configItem *cb.ConfigItem) error { - if configItem.Type != cb.ConfigItem_Policy { + if configItem.Type != cb.ConfigItem_POLICY { return fmt.Errorf("Expected type of ConfigItem_Policy, got %v", configItem.Type) } diff --git a/core/peer/peer.go b/core/peer/peer.go index 47d0390df44..4908e6d8311 100644 --- a/core/peer/peer.go +++ b/core/peer/peer.go @@ -172,7 +172,7 @@ func createChain(cid string, ledger ledger.PeerLedger, cb *common.Block) error { } configtxInitializer := configtx.NewInitializer() - configtxInitializer.Handlers()[common.ConfigItem_Peer] = sharedConfigHandler + configtxInitializer.Handlers()[common.ConfigItem_PEER] = sharedConfigHandler configtxManager, err := configtx.NewManagerImplNext( configEnvelope, configtxInitializer, diff --git a/msp/mspimpl.go b/msp/mspimpl.go index 23a78e33bcb..633a8064a71 100644 --- a/msp/mspimpl.go +++ b/msp/mspimpl.go @@ -304,7 +304,7 @@ func (msp *bccspmsp) SatisfiesPrincipal(id Identity, principal *common.MSPPrinci switch principal.PrincipalClassification { // in this case, we have to check whether the // identity has a role in the msp - member or admin - case common.MSPPrincipal_ByMSPRole: + case common.MSPPrincipal_ROLE: // Principal contains the msp role mspRole := &common.MSPRole{} err := proto.Unmarshal(principal.Principal, mspRole) @@ -322,16 +322,16 @@ func (msp *bccspmsp) SatisfiesPrincipal(id Identity, principal *common.MSPPrinci switch mspRole.Role { // in the case of member, we simply check // whether this identity is valid for the MSP - case common.MSPRole_Member: + case common.MSPRole_MEMBER: return msp.Validate(id) - case common.MSPRole_Admin: + case common.MSPRole_ADMIN: panic("Not yet implemented") default: return fmt.Errorf("Invalid MSP role type %d", int32(mspRole.Role)) } // in this case we have to serialize this instance // and compare it byte-by-byte with Principal - case common.MSPPrincipal_ByIdentity: + case common.MSPPrincipal_IDENTITY: idBytes, err := id.Serialize() if err != nil { return fmt.Errorf("Could not serialize this identity instance, err %s", err) @@ -343,7 +343,7 @@ func (msp *bccspmsp) SatisfiesPrincipal(id Identity, principal *common.MSPPrinci } else { return errors.New("The identities do not match") } - case common.MSPPrincipal_ByOrganizationUnit: + case common.MSPPrincipal_ORGANIZATION_UNIT: panic("Not yet implemented") default: return fmt.Errorf("Invalid principal type %d", int32(principal.PrincipalClassification)) diff --git a/orderer/multichain/manager.go b/orderer/multichain/manager.go index 7ce4968ea9d..a5f2e82511b 100644 --- a/orderer/multichain/manager.go +++ b/orderer/multichain/manager.go @@ -150,7 +150,7 @@ func (ml *multiLedger) GetChain(chainID string) (ChainSupport, bool) { func newConfigResources(configEnvelope *cb.ConfigEnvelope) (*configResources, error) { sharedConfigManager := configtxorderer.NewManagerImpl() initializer := configtx.NewInitializer() - initializer.Handlers()[cb.ConfigItem_Orderer] = sharedConfigManager + initializer.Handlers()[cb.ConfigItem_ORDERER] = sharedConfigManager configManager, err := configtx.NewManagerImplNext(configEnvelope, initializer, nil) if err != nil { diff --git a/orderer/multichain/systemchain.go b/orderer/multichain/systemchain.go index 59bbdf0b2af..9ab27ddc303 100644 --- a/orderer/multichain/systemchain.go +++ b/orderer/multichain/systemchain.go @@ -158,7 +158,7 @@ func (sc *systemChain) authorize(configEnvelope *cb.ConfigEnvelope) cb.Status { var creationConfigItem *cb.ConfigItem for _, item := range config.Items { - if item.Type == cb.ConfigItem_Orderer && item.Key == configtx.CreationPolicyKey { + if item.Type == cb.ConfigItem_ORDERER && item.Key == configtx.CreationPolicyKey { creationConfigItem = item break } diff --git a/orderer/multichain/util_test.go b/orderer/multichain/util_test.go index 44c87cf8c99..6425fab81bd 100644 --- a/orderer/multichain/util_test.go +++ b/orderer/multichain/util_test.go @@ -82,7 +82,7 @@ func (mlw *mockLedgerWriter) Append(blockContents []*cb.Envelope, metadata [][]b func makeConfigTx(chainID string, i int) *cb.Envelope { configTemplate := configtx.NewSimpleTemplate(&cb.ConfigItem{ - Type: cb.ConfigItem_Orderer, + Type: cb.ConfigItem_ORDERER, Key: fmt.Sprintf("%d", i), Value: []byte(fmt.Sprintf("%d", i)), }) diff --git a/protos/common/configtx.pb.go b/protos/common/configtx.pb.go index d0a8e2a7848..3a002c5d7d3 100644 --- a/protos/common/configtx.pb.go +++ b/protos/common/configtx.pb.go @@ -16,26 +16,25 @@ var _ = math.Inf type ConfigItem_ConfigType int32 const ( - // XXX change all to UPPER_CASE - ConfigItem_Policy ConfigItem_ConfigType = 0 - ConfigItem_Chain ConfigItem_ConfigType = 1 - ConfigItem_Orderer ConfigItem_ConfigType = 2 - ConfigItem_Peer ConfigItem_ConfigType = 3 + ConfigItem_POLICY ConfigItem_ConfigType = 0 + ConfigItem_CHAIN ConfigItem_ConfigType = 1 + ConfigItem_ORDERER ConfigItem_ConfigType = 2 + ConfigItem_PEER ConfigItem_ConfigType = 3 ConfigItem_MSP ConfigItem_ConfigType = 4 ) var ConfigItem_ConfigType_name = map[int32]string{ - 0: "Policy", - 1: "Chain", - 2: "Orderer", - 3: "Peer", + 0: "POLICY", + 1: "CHAIN", + 2: "ORDERER", + 3: "PEER", 4: "MSP", } var ConfigItem_ConfigType_value = map[string]int32{ - "Policy": 0, - "Chain": 1, - "Orderer": 2, - "Peer": 3, + "POLICY": 0, + "CHAIN": 1, + "ORDERER": 2, + "PEER": 3, "MSP": 4, } @@ -256,45 +255,46 @@ func init() { func init() { proto.RegisterFile("common/configtx.proto", fileDescriptor1) } var fileDescriptor1 = []byte{ - // 632 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x54, 0x51, 0x4f, 0xdb, 0x30, - 0x10, 0x5e, 0x9b, 0x34, 0xa5, 0xd7, 0x02, 0x91, 0x61, 0x5b, 0x84, 0x86, 0xc6, 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0xb0, 0xef, 0x02, 0x9f, 0x76, 0x2f, 0x77, 0xc6, 0x4c, 0x4e, 0xa6, 0x57, 0x45, - 0x2f, 0x07, 0x93, 0x3c, 0x45, 0x11, 0x61, 0x38, 0x46, 0x31, 0xb8, 0x0e, 0xae, 0x04, 0x1b, 0x0d, - 0xd4, 0xb6, 0xce, 0xcc, 0x4a, 0xbf, 0x72, 0xd4, 0xf1, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xe7, 0xe5, 0x43, 0x20, 0x09, 0x06, 0x00, 0x00, + // 643 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x54, 0x51, 0x4f, 0xdb, 0x3c, + 0x14, 0xfd, 0xda, 0xa4, 0x29, 0xbd, 0x2d, 0x10, 0x19, 0xbe, 0x2d, 0x42, 0x43, 0x63, 0x99, 0x34, + 0x95, 0x21, 0xa8, 0xc6, 0x1e, 0x98, 0x90, 0xf6, 0xb0, 0x75, 0xd1, 0x40, 0x1a, 0xd0, 0x19, 0x34, + 0x69, 0x68, 0x52, 0x15, 0x12, 0xd3, 0x58, 0x4b, 0xe2, 0x28, 0x71, 0x11, 0x79, 0xdd, 0xcf, 0xdd, + 0xaf, 0x98, 0x62, 0x3b, 0x21, 0xed, 0x58, 0x11, 0x2f, 0x10, 0xdf, 0x7b, 0xee, 0x39, 0xc7, 0xf7, + 0xd6, 0x17, 0xfe, 0xf7, 0x58, 0x14, 0xb1, 0x78, 0xe0, 0xb1, 0xf8, 0x9a, 0x4e, 0xf8, 0xed, 0x5e, + 0x92, 0x32, 0xce, 0x90, 0x21, 0xc3, 0x1b, 0x6b, 0x55, 0xba, 0xf8, 0x27, 0x93, 0x1b, 0x65, 0x4d, + 0xc2, 0x42, 0xea, 0x51, 0x92, 0xc9, 0xb0, 0xed, 0xc2, 0xca, 0x50, 0xb0, 0x38, 0xf1, 0x0d, 0x09, + 0x59, 0x42, 0xd0, 0x13, 0x30, 0x24, 0xaf, 0xd5, 0xd8, 0x6a, 0xf4, 0x7b, 0x58, 0x9d, 0xd0, 0x01, + 0x40, 0x46, 0x27, 0xb1, 0xcb, 0xa7, 0x29, 0xc9, 0xac, 0xe6, 0x96, 0xd6, 0xef, 0xee, 0x3f, 0xdd, + 0x53, 0x1a, 0x92, 0xe3, 0xbc, 0xcc, 0xe3, 0x1a, 0xd4, 0x3e, 0x2c, 0x25, 0x2e, 0x48, 0x94, 0x84, + 0x2e, 0x27, 0xa8, 0x0f, 0x2d, 0xca, 0x49, 0x94, 0x59, 0x0d, 0xc1, 0x82, 0x66, 0x59, 0x8e, 0x39, + 0x89, 0xb0, 0x04, 0xd8, 0x63, 0x30, 0x64, 0x10, 0xed, 0x80, 0x11, 0x10, 0xd7, 0x27, 0xa9, 0xb0, + 0xd5, 0xdd, 0x5f, 0xab, 0x8a, 0x02, 0x97, 0xc6, 0x47, 0x22, 0x85, 0x15, 0xe4, 0x4e, 0xa0, 0xf9, + 0x90, 0x40, 0x00, 0x20, 0x83, 0xa7, 0xe4, 0x96, 0x3f, 0x4e, 0x64, 0x17, 0xda, 0x5e, 0xe0, 0xc6, + 0x31, 0x09, 0xad, 0xe6, 0x1c, 0x5a, 0x30, 0x7e, 0x4e, 0xd9, 0x34, 0xc1, 0x25, 0xc6, 0xfe, 0xad, + 0x41, 0xb7, 0x96, 0x40, 0x16, 0xb4, 0x6f, 0x48, 0x9a, 0x51, 0x16, 0x0b, 0x31, 0x1d, 0x97, 0x47, + 0x74, 0x00, 0xc6, 0xa4, 0x80, 0x94, 0xf6, 0x9f, 0xdf, 0xc3, 0xbb, 0x27, 0xfe, 0x66, 0x4e, 0xcc, + 0xd3, 0x1c, 0x2b, 0x78, 0x51, 0x78, 0xe3, 0x86, 0x53, 0x92, 0x59, 0xda, 0xbf, 0x0b, 0xbf, 0x09, + 0x84, 0x2a, 0x94, 0x70, 0xf4, 0x1e, 0x96, 0xca, 0xdf, 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xf1, 0xac, 0x1d, 0x54, 0x4f, 0xa9, 0x8b, 0xab, 0x41, 0xe9, 0x77, 0x83, 0xaa, 0xfa, 0xd9, 0xaa, + 0xf5, 0xd3, 0x1e, 0x96, 0xf6, 0x0b, 0x47, 0x08, 0xc0, 0x18, 0x9d, 0x7d, 0x39, 0x1e, 0x7e, 0x37, + 0xff, 0x43, 0x1d, 0x68, 0x0d, 0x8f, 0x3e, 0x1c, 0x9f, 0x9a, 0x0d, 0xd4, 0x85, 0xf6, 0x19, 0xfe, + 0xe4, 0x60, 0x07, 0x9b, 0x4d, 0xb4, 0x04, 0xfa, 0xc8, 0x71, 0xb0, 0xa9, 0xa1, 0x36, 0x68, 0x27, + 0xe7, 0x23, 0x53, 0xb7, 0x2f, 0x61, 0x75, 0x6e, 0xcd, 0xa1, 0x6d, 0x30, 0xab, 0x45, 0x37, 0xae, + 0x6d, 0x8e, 0x1e, 0x5e, 0xad, 0xe2, 0x72, 0x6b, 0xa0, 0x67, 0xd0, 0xa9, 0x42, 0x6a, 0xd8, 0x77, + 0x81, 0x8f, 0xbb, 0x97, 0x3b, 0x13, 0xca, 0x83, 0xe9, 0x55, 0xd1, 0xcb, 0x41, 0x90, 0x27, 0x24, + 0x0d, 0x89, 0x3f, 0x21, 0xe9, 0xe0, 0xda, 0xbd, 0x4a, 0xa9, 0x37, 0x10, 0xdb, 0x3a, 0x53, 0x2b, + 0xfd, 0xca, 0x10, 0xc7, 0xb7, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xec, 0xdf, 0xfc, 0x61, 0x09, + 0x06, 0x00, 0x00, } diff --git a/protos/common/configtx.proto b/protos/common/configtx.proto index 09c8fd039fe..622c12d6b3c 100644 --- a/protos/common/configtx.proto +++ b/protos/common/configtx.proto @@ -96,11 +96,10 @@ message ConfigPolicy { message ConfigItem { enum ConfigType { - // XXX change all to UPPER_CASE - Policy = 0; // Implies that the Value is a marshaled Policy message, and may be referred to by Key as a ModificationPolicy - Chain = 1; // Marshaled format for this type is yet to be determined - Orderer = 2; // Marshaled format for this type is yet to be determined - Peer = 3; // Marshaled format for this type is yet to be determined + POLICY = 0; // Implies that the Value is a marshaled Policy message, and may be referred to by Key as a ModificationPolicy + CHAIN = 1; // Marshaled format for this type is yet to be determined + ORDERER = 2; // Marshaled format for this type is yet to be determined + PEER = 3; // Marshaled format for this type is yet to be determined MSP = 4; // Marshaled MSPConfig proto } ConfigType type = 1; // The type of configuration this is. diff --git a/protos/common/msp_principal.pb.go b/protos/common/msp_principal.pb.go index d32d348b91d..c539233c7f5 100644 --- a/protos/common/msp_principal.pb.go +++ b/protos/common/msp_principal.pb.go @@ -16,26 +16,25 @@ var _ = math.Inf type MSPPrincipal_Classification int32 const ( - // XXX Change all to UPPER_CASE - MSPPrincipal_ByMSPRole MSPPrincipal_Classification = 0 + MSPPrincipal_ROLE MSPPrincipal_Classification = 0 // one of a member of MSP network, and the one of an // administrator of an MSP network - MSPPrincipal_ByOrganizationUnit MSPPrincipal_Classification = 1 + MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1 // groupping of entities, per MSP affiliation // E.g., this can well be represented by an MSP's // Organization unit - MSPPrincipal_ByIdentity MSPPrincipal_Classification = 2 + MSPPrincipal_IDENTITY MSPPrincipal_Classification = 2 ) var MSPPrincipal_Classification_name = map[int32]string{ - 0: "ByMSPRole", - 1: "ByOrganizationUnit", - 2: "ByIdentity", + 0: "ROLE", + 1: "ORGANIZATION_UNIT", + 2: "IDENTITY", } var MSPPrincipal_Classification_value = map[string]int32{ - "ByMSPRole": 0, - "ByOrganizationUnit": 1, - "ByIdentity": 2, + "ROLE": 0, + "ORGANIZATION_UNIT": 1, + "IDENTITY": 2, } func (x MSPPrincipal_Classification) String() string { @@ -48,17 +47,17 @@ func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int) { type MSPRole_MSPRoleType int32 const ( - MSPRole_Member MSPRole_MSPRoleType = 0 - MSPRole_Admin MSPRole_MSPRoleType = 1 + MSPRole_MEMBER MSPRole_MSPRoleType = 0 + MSPRole_ADMIN MSPRole_MSPRoleType = 1 ) var MSPRole_MSPRoleType_name = map[int32]string{ - 0: "Member", - 1: "Admin", + 0: "MEMBER", + 1: "ADMIN", } var MSPRole_MSPRoleType_value = map[string]int32{ - "Member": 0, - "Admin": 1, + "MEMBER": 0, + "ADMIN": 1, } func (x MSPRole_MSPRoleType) String() string { @@ -151,26 +150,27 @@ func init() { func init() { proto.RegisterFile("common/msp_principal.proto", fileDescriptor4) } var fileDescriptor4 = []byte{ - // 331 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0xc3, 0x30, - 0x1c, 0xc5, 0xd7, 0xa1, 0x93, 0xfe, 0xdd, 0x4a, 0xc9, 0x41, 0x87, 0x0e, 0x19, 0x75, 0x87, 0x81, - 0xd8, 0xc2, 0xfc, 0x04, 0x56, 0x41, 0x3c, 0x14, 0x4b, 0xa7, 0x17, 0x0f, 0x96, 0xb6, 0xcb, 0xb6, - 0x3f, 0xb4, 0x49, 0x49, 0xb3, 0x43, 0x3d, 0x78, 0xf4, 0x1b, 0xfa, 0x7d, 0xa4, 0xa9, 0xdb, 0xda, - 0x9d, 0x3c, 0x85, 0xbc, 0xf7, 0x7b, 0xef, 0x9f, 0x84, 0xc0, 0x45, 0xc2, 0xb3, 0x8c, 0x33, 0x27, - 0x2b, 0xf2, 0x30, 0x17, 0xc8, 0x12, 0xcc, 0xa3, 0xd4, 0xce, 0x05, 0x97, 0x9c, 0xf4, 0x6a, 0xcf, - 0xfa, 0xd1, 0xa0, 0xef, 0xcd, 0x7d, 0x7f, 0x6b, 0x93, 0x0f, 0x18, 0xee, 0xd8, 0x30, 0x49, 0xa3, - 0xa2, 0xc0, 0x25, 0x26, 0x91, 0x44, 0xce, 0x86, 0xda, 0x58, 0x9b, 0x1a, 0xb3, 0x6b, 0xbb, 0xce, - 0xda, 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0x38, 0xf5, 0xb8, 0xb8, 0xa7, 0xb6, 0x77, 0xbf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xd6, 0xf3, 0xc4, 0xb4, 0x3c, 0x02, 0x00, 0x00, + // 350 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0xcd, 0x6a, 0xea, 0x40, + 0x1c, 0xc5, 0x8d, 0x78, 0xbd, 0xfa, 0xbf, 0x5e, 0xc9, 0x1d, 0xb8, 0x54, 0x5a, 0x29, 0x92, 0xba, + 0x10, 0x4a, 0x13, 0xb0, 0x0f, 0x50, 0xb4, 0x86, 0x12, 0x68, 0x3e, 0x18, 0xe3, 0xa2, 0x2e, 0x1a, + 0x62, 0x1c, 0x75, 0x20, 0xce, 0x84, 0x49, 0x5c, 0xd8, 0x45, 0x97, 0x7d, 0xbb, 0xbe, 0x53, 0xc9, + 0x88, 0x9a, 0x74, 0xd5, 0x55, 0xc8, 0x39, 0xe7, 0x77, 0x0e, 0x33, 0x0c, 0x5c, 0x46, 0x7c, 0xbb, + 0xe5, 0xcc, 0xd8, 0xa6, 0x49, 0x90, 0x08, 0xca, 0x22, 0x9a, 0x84, 0xb1, 0x9e, 0x08, 0x9e, 0x71, + 0x54, 0x3f, 0x78, 0xda, 0xa7, 0x02, 0x2d, 0x7b, 0xea, 0x79, 0x47, 0x1b, 0xbd, 0x42, 0xe7, 0x94, + 0x0d, 0xa2, 0x38, 0x4c, 0x53, 0xba, 0xa2, 0x51, 0x98, 0x51, 0xce, 0x3a, 0x4a, 0x4f, 0x19, 0xb4, + 0x87, 0x37, 0xfa, 0x81, 0xd5, 0x8b, 0x9c, 0xfe, 0x58, 0x8a, 0xe2, 0x8b, 0x53, 0x49, 0xd9, 0x40, + 0x5d, 0x68, 0x9e, 0xac, 0x4e, 0xb5, 0xa7, 0x0c, 0x5a, 0xf8, 0x2c, 0x68, 0x0f, 0xd0,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x00, 0x00, 0xff, 0xff, 0xc1, 0xa4, 0x4f, 0x15, 0x34, 0x02, 0x00, 0x00, } diff --git a/protos/common/msp_principal.proto b/protos/common/msp_principal.proto index 998d3ae7fb5..2b34be0a645 100644 --- a/protos/common/msp_principal.proto +++ b/protos/common/msp_principal.proto @@ -49,15 +49,14 @@ package common; message MSPPrincipal { enum Classification { - // XXX Change all to UPPER_CASE - ByMSPRole = 0; // Represents the one of the dedicated MSP roles, the + ROLE = 0; // Represents the one of the dedicated MSP roles, the // one of a member of MSP network, and the one of an // administrator of an MSP network - ByOrganizationUnit = 1; // Denotes a finer grained (affiliation-based) + ORGANIZATION_UNIT = 1; // Denotes a finer grained (affiliation-based) // groupping of entities, per MSP affiliation // E.g., this can well be represented by an MSP's // Organization unit - ByIdentity = 2; // Denotes a principal that consists of a single + IDENTITY = 2; // Denotes a principal that consists of a single // identity } @@ -104,8 +103,8 @@ message MSPRole { string MSPIdentifier = 1; // XXX change to msp_identifier enum MSPRoleType { - Member = 0; // Represents an MSP Member // XXX change to MEMBER - Admin = 1; // Represents an MSP Admin // XXX change to ADMIN + MEMBER = 0; // Represents an MSP Member + ADMIN = 1; // Represents an MSP Admin } // MSPRoleType defines which of the available, pre-defined MSP-roles diff --git a/protos/peer/transaction.pb.go b/protos/peer/transaction.pb.go index cc7ea9313e0..f83280e2ace 100644 --- a/protos/peer/transaction.pb.go +++ b/protos/peer/transaction.pb.go @@ -14,21 +14,20 @@ var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -// XXX Change to UPPER_CASE type InvalidTransaction_Cause int32 const ( - InvalidTransaction_TxIdAlreadyExists InvalidTransaction_Cause = 0 - InvalidTransaction_RWConflictDuringCommit InvalidTransaction_Cause = 1 + InvalidTransaction_TX_ID_ALREADY_EXISTS InvalidTransaction_Cause = 0 + InvalidTransaction_RW_CONFLICT_DURING_COMMIT InvalidTransaction_Cause = 1 ) var InvalidTransaction_Cause_name = map[int32]string{ - 0: "TxIdAlreadyExists", - 1: "RWConflictDuringCommit", + 0: "TX_ID_ALREADY_EXISTS", + 1: "RW_CONFLICT_DURING_COMMIT", } var InvalidTransaction_Cause_value = map[string]int32{ - "TxIdAlreadyExists": 0, - "RWConflictDuringCommit": 1, + "TX_ID_ALREADY_EXISTS": 0, + "RW_CONFLICT_DURING_COMMIT": 1, } func (x InvalidTransaction_Cause) String() string { @@ -196,36 +195,37 @@ func init() { func init() { proto.RegisterFile("peer/transaction.proto", fileDescriptor8) } var fileDescriptor8 = []byte{ - // 491 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xcf, 0x6a, 0xdb, 0x40, - 0x10, 0xc6, 0xab, 0x04, 0x3b, 0x64, 0x1c, 0x8a, 0xbd, 0xa5, 0x8e, 0x62, 0x02, 0x31, 0x3a, 0xa5, - 0x04, 0x24, 0x70, 0xe8, 0x1f, 0x42, 0x2f, 0x89, 0xeb, 0x43, 0x6e, 0x41, 0x35, 0x14, 0x7a, 0xa8, - 0x59, 0x49, 0x63, 0x79, 0x41, 0xda, 0x15, 0xbb, 0xab, 0x10, 0xbf, 0x44, 0x7b, 0xeb, 0xeb, 0xf4, - 0xd5, 0x8a, 0xb5, 0x5a, 0x49, 0xa9, 0x9b, 0x93, 0x18, 0xcd, 0x4f, 0xdf, 0xf7, 0x69, 0x66, 0x17, - 0xc6, 0x05, 0xa2, 0x0c, 0xb4, 0xa4, 0x5c, 0xd1, 0x58, 0x33, 0xc1, 0xfd, 0x42, 0x0a, 0x2d, 0x48, - 0xbf, 0x7a, 0xa8, 0xc9, 0x45, 0x2a, 0x44, 0x9a, 0x61, 0x50, 0x95, 0x51, 0xb9, 0x0e, 0x34, 0xcb, - 0x51, 0x69, 0x9a, 0x17, 0x06, 0x9c, 0x9c, 0x57, 0x02, 0x85, 0x14, 0x85, 0x50, 0x34, 0x5b, 0x49, - 0x54, 0x85, 0xe0, 0x0a, 0x4d, 0x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c3, 0xcb, 0xc1, 0xec, 0xec, 0x3f, 0xa3, - 0xb8, 0x35, 0x03, 0xb1, 0xa4, 0xb7, 0x80, 0xd1, 0x5e, 0x97, 0x8c, 0xa1, 0xbf, 0x41, 0x9a, 0xa0, - 0xac, 0xf7, 0x55, 0x57, 0xbb, 0xd4, 0x05, 0xdd, 0x66, 0x82, 0x26, 0xf5, 0x8e, 0x6c, 0xe9, 0xfd, - 0x72, 0x60, 0x3c, 0xdf, 0x50, 0xc6, 0x63, 0x91, 0xa0, 0x51, 0x79, 0x30, 0x2d, 0xf2, 0x19, 0x26, - 0xb1, 0xed, 0xac, 0x9a, 0x13, 0x64, 0x75, 0x8c, 0x81, 0xdb, 0x10, 0x0f, 0x35, 0x60, 0xbf, 0xfe, - 0x08, 0xfd, 0x7a, 0xbd, 0x66, 0x16, 0x17, 0xf6, 0x9f, 0x1a, 0xb7, 0x05, 0x4f, 0x84, 0x54, 0x98, - 0xd4, 0x7f, 0x56, 0xe3, 0xde, 0x4f, 0x07, 0x4e, 0x5f, 0x60, 0xc8, 0x0d, 0x9c, 0xed, 0x1d, 0xe5, - 0x7f, 0x12, 0x9d, 0x5a, 0x20, 0xac, 0xfb, 0x6d, 0xa0, 0x13, 0x34, 0x6a, 0x39, 0x72, 0xad, 0xdc, - 0x83, 0x6a, 0xd4, 0xcd, 0xa9, 0x5b, 0xb4, 0xbd, 0xf0, 0x19, 0x78, 0x77, 0xf5, 0xfd, 0x5d, 0xca, - 0xf4, 0xa6, 0x8c, 0xfc, 0x58, 0xe4, 0xc1, 0x66, 0x5b, 0xa0, 0xcc, 0x30, 0x49, 0x51, 0x06, 0x6b, - 0x1a, 0x49, 0x16, 0x9b, 0xcb, 0xa7, 0x82, 0xdd, 0x4d, 0x8b, 0xcc, 0xc5, 0xbc, 0xfe, 0x1b, 0x00, - 0x00, 0xff, 0xff, 0x33, 0x58, 0x63, 0xf9, 0xb9, 0x03, 0x00, 0x00, + // 506 bytes of a gzipped FileDescriptorProto + 0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, 0x9f, 0x1a, 0x0c, + 0xec, 0x05, 0x49, 0xb2, 0x90, 0x45, 0x54, 0xba, 0xdc, 0x4a, 0x09, 0xbd, 0x87, 0x51, 0xa8, 0x14, + 0xbf, 0xbe, 0x47, 0xca, 0x47, 0x06, 0xe8, 0x35, 0x71, 0x5b, 0x01, 0x6a, 0xf5, 0x1b, 0xe8, 0x54, + 0x43, 0x96, 0x67, 0x71, 0xa2, 0xf6, 0x54, 0xa7, 0x39, 0x59, 0xc4, 0xb8, 0xa0, 0x51, 0xb5, 0xb3, + 0x0a, 0x37, 0x7e, 0x68, 0x70, 0xf4, 0x1f, 0x06, 0xbd, 0x83, 0xe1, 0xd6, 0x85, 0xfe, 0xab, 0xa3, + 0x23, 0x05, 0xe0, 0x4a, 0x6f, 0x1a, 0x3a, 0xa4, 0xd2, 0x6d, 0x49, 0xb3, 0x42, 0xe8, 0x3b, 0xe5, + 0x51, 0xd7, 0x77, 0xcf, 0x69, 0x34, 0xfc, 0x08, 0xbc, 0x38, 0xfb, 0xf6, 0x32, 0x4e, 0x8a, 0xc5, + 0x2a, 0x30, 0x43, 0xb6, 0xb4, 0x16, 0xeb, 0x9c, 0xf2, 0x94, 0x46, 0x31, 0xe5, 0xd6, 0x3d, 0x09, + 0x78, 0x12, 0xca, 0x27, 0x28, 0xac, 0xcd, 0x7b, 0x0b, 0xe4, 0xf3, 0x3c, 0xff, 0x13, 0x00, 0x00, + 0xff, 0xff, 0xf9, 0x23, 0xe4, 0x85, 0xbf, 0x03, 0x00, 0x00, } diff --git a/protos/peer/transaction.proto b/protos/peer/transaction.proto index 6b4d24a902a..3e1eba77cbd 100644 --- a/protos/peer/transaction.proto +++ b/protos/peer/transaction.proto @@ -40,10 +40,9 @@ message SignedTransaction { // This is used to wrap an invalid Transaction with the cause message InvalidTransaction { - // XXX Change to UPPER_CASE enum Cause { - TxIdAlreadyExists = 0; - RWConflictDuringCommit = 1; + TX_ID_ALREADY_EXISTS = 0; + RW_CONFLICT_DURING_COMMIT = 1; } Transaction transaction = 1; Cause cause = 2;