diff --git a/common/configtx/template.go b/common/configtx/template.go index 99e0fc0cd85..a7aaa855572 100644 --- a/common/configtx/template.go +++ b/common/configtx/template.go @@ -65,7 +65,7 @@ func (st *simpleTemplate) Envelope(chainID string) (*cb.ConfigUpdateEnvelope, er config, err := proto.Marshal(&cb.ConfigUpdate{ Header: &cb.ChannelHeader{ ChannelId: chainID, - Type: int32(cb.HeaderType_CONFIGURATION_ITEM), + Type: int32(cb.HeaderType_CONFIG), }, WriteSet: st.configGroup, }) @@ -141,7 +141,7 @@ func (ct *compositeTemplate) Envelope(chainID string) (*cb.ConfigUpdateEnvelope, marshaledConfig, err := proto.Marshal(&cb.ConfigUpdate{ Header: &cb.ChannelHeader{ ChannelId: chainID, - Type: int32(cb.HeaderType_CONFIGURATION_ITEM), + Type: int32(cb.HeaderType_CONFIG), }, WriteSet: channel, }) @@ -192,7 +192,7 @@ func MakeChainCreationTransaction(creationPolicy string, chainID string, signer LastUpdate: newConfigUpdateEnv, } - payloadChannelHeader := utils.MakeChannelHeader(cb.HeaderType_CONFIGURATION_TRANSACTION, msgVersion, chainID, epoch) + payloadChannelHeader := utils.MakeChannelHeader(cb.HeaderType_CONFIG, msgVersion, chainID, epoch) payloadSignatureHeader := utils.MakeSignatureHeader(sSigner, utils.CreateNonceOrPanic()) payloadHeader := utils.MakePayloadHeader(payloadChannelHeader, payloadSignatureHeader) payload := &cb.Payload{Header: payloadHeader, Data: utils.MarshalOrPanic(newConfigEnv)} diff --git a/common/configtx/tool/provisional/provisional_test.go b/common/configtx/tool/provisional/provisional_test.go index dea7411545c..5ebecfe7226 100644 --- a/common/configtx/tool/provisional/provisional_test.go +++ b/common/configtx/tool/provisional/provisional_test.go @@ -55,7 +55,7 @@ func TestGenesisMetadata(t *testing.T) { t.Fatalf("Expected non-nil metadata") } - if genesisBlock.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIGURATION] == nil { + if genesisBlock.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] == nil { t.Fatalf("Should have last config set") } } diff --git a/common/genesis/genesis.go b/common/genesis/genesis.go index 21a652a4a19..e627f2a4214 100644 --- a/common/genesis/genesis.go +++ b/common/genesis/genesis.go @@ -48,7 +48,7 @@ func (f *factory) Block(chainID string) (*cb.Block, error) { return nil, err } - payloadChannelHeader := utils.MakeChannelHeader(cb.HeaderType_CONFIGURATION_TRANSACTION, msgVersion, chainID, epoch) + payloadChannelHeader := utils.MakeChannelHeader(cb.HeaderType_CONFIG, msgVersion, chainID, epoch) payloadSignatureHeader := utils.MakeSignatureHeader(nil, utils.CreateNonceOrPanic()) payloadHeader := utils.MakePayloadHeader(payloadChannelHeader, payloadSignatureHeader) payload := &cb.Payload{Header: payloadHeader, Data: utils.MarshalOrPanic(&cb.ConfigEnvelope{LastUpdate: configEnv})} @@ -57,7 +57,7 @@ func (f *factory) Block(chainID string) (*cb.Block, error) { block := cb.NewBlock(0, nil) block.Data = &cb.BlockData{Data: [][]byte{utils.MarshalOrPanic(envelope)}} block.Header.DataHash = block.Data.Hash() - block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIGURATION] = utils.MarshalOrPanic(&cb.Metadata{ + block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = utils.MarshalOrPanic(&cb.Metadata{ Value: utils.MarshalOrPanic(&cb.LastConfig{Index: 0}), }) return block, nil diff --git a/core/committer/txvalidator/validator.go b/core/committer/txvalidator/validator.go index bb5903c734d..0ecef400ff6 100644 --- a/core/committer/txvalidator/validator.go +++ b/core/committer/txvalidator/validator.go @@ -141,7 +141,7 @@ func (v *txValidator) Validate(block *common.Block) error { logger.Errorf("VSCCValidateTx for transaction txId = %s returned error %s", txID, err) continue } - } else if common.HeaderType(payload.Header.ChannelHeader.Type) == common.HeaderType_CONFIGURATION_TRANSACTION { + } else if common.HeaderType(payload.Header.ChannelHeader.Type) == common.HeaderType_CONFIG { configEnvelope, err := configtx.UnmarshalConfigEnvelope(payload.Data) if err != nil { err := fmt.Errorf("Error unmarshaling config which passed initial validity checks: %s", err) diff --git a/core/common/validation/msgvalidation.go b/core/common/validation/msgvalidation.go index d96db5d14e8..bcb075fc298 100644 --- a/core/common/validation/msgvalidation.go +++ b/core/common/validation/msgvalidation.go @@ -89,7 +89,7 @@ func ValidateProposalMessage(signedProp *pb.SignedProposal) (*pb.Proposal, *comm // continue the validation in a way that depends on the type specified in the header switch common.HeaderType(hdr.ChannelHeader.Type) { - case common.HeaderType_CONFIGURATION_TRANSACTION: + case common.HeaderType_CONFIG: //which the types are different the validation is the same //viz, validate a proposal to a chaincode. If we need other //special validation for confguration, we would have to implement @@ -181,8 +181,8 @@ func validateChannelHeader(cHdr *common.ChannelHeader) error { // validate the header type if common.HeaderType(cHdr.Type) != common.HeaderType_ENDORSER_TRANSACTION && - common.HeaderType(cHdr.Type) != common.HeaderType_CONFIGURATION_ITEM && - common.HeaderType(cHdr.Type) != common.HeaderType_CONFIGURATION_TRANSACTION { + common.HeaderType(cHdr.Type) != common.HeaderType_CONFIG_UPDATE && + common.HeaderType(cHdr.Type) != common.HeaderType_CONFIG { return fmt.Errorf("invalid header type %s", common.HeaderType(cHdr.Type)) } @@ -217,7 +217,7 @@ func validateCommonHeader(hdr *common.Header) error { } // validateConfigTransaction validates the payload of a -// transaction assuming its type is CONFIGURATION_TRANSACTION +// transaction assuming its type is CONFIG func validateConfigTransaction(data []byte, hdr *common.Header) error { putilsLogger.Infof("validateConfigTransaction starts for data %p, header %s", data, hdr) @@ -357,7 +357,7 @@ func ValidateTransaction(e *common.Envelope) (*common.Payload, error) { err = validateEndorserTransaction(payload.Data, payload.Header) putilsLogger.Infof("ValidateTransactionEnvelope returns err %s", err) return payload, err - case common.HeaderType_CONFIGURATION_TRANSACTION: + case common.HeaderType_CONFIG: err = validateConfigTransaction(payload.Data, payload.Header) putilsLogger.Infof("ValidateTransactionEnvelope returns err %s", err) return payload, err diff --git a/core/ledger/kvledger/txmgmt/validator/statebasedval/state_based_validator.go b/core/ledger/kvledger/txmgmt/validator/statebasedval/state_based_validator.go index 4d2169e1c27..350e94598fa 100644 --- a/core/ledger/kvledger/txmgmt/validator/statebasedval/state_based_validator.go +++ b/core/ledger/kvledger/txmgmt/validator/statebasedval/state_based_validator.go @@ -118,7 +118,7 @@ func (v *Validator) ValidateAndPrepareBatch(block *common.Block, doMVCCValidatio addWriteSetToBatch(txRWSet, committingTxHeight, updates) valid = true } - } else if common.HeaderType(payload.Header.ChannelHeader.Type) == common.HeaderType_CONFIGURATION_TRANSACTION { + } else if common.HeaderType(payload.Header.ChannelHeader.Type) == common.HeaderType_CONFIG { valid, err = v.validateConfigTX(env) if err != nil { return nil, err diff --git a/core/peer/peer.go b/core/peer/peer.go index 08185b34bd0..95c5495f8aa 100644 --- a/core/peer/peer.go +++ b/core/peer/peer.go @@ -142,7 +142,7 @@ func getCurrConfigBlockFromLedger(ledger ledger.PeerLedger) (*common.Block, erro currBlockNumber = block.Header.Number - 1 continue } - if tx.Header.ChannelHeader.Type == int32(common.HeaderType_CONFIGURATION_TRANSACTION) { + if tx.Header.ChannelHeader.Type == int32(common.HeaderType_CONFIG) { return block, nil } } diff --git a/orderer/common/broadcast/broadcast.go b/orderer/common/broadcast/broadcast.go index 6abaf6015ec..5d5a37cf395 100644 --- a/orderer/common/broadcast/broadcast.go +++ b/orderer/common/broadcast/broadcast.go @@ -87,7 +87,7 @@ func (bh *handlerImpl) Handle(srv ab.AtomicBroadcast_BroadcastServer) error { support, ok := bh.sm.GetChain(payload.Header.ChannelHeader.ChannelId) if !ok { // Chain not found, maybe create one? - if payload.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIGURATION_TRANSACTION) { + if payload.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIG) { return srv.Send(&ab.BroadcastResponse{Status: cb.Status_NOT_FOUND}) } diff --git a/orderer/common/broadcast/broadcast_test.go b/orderer/common/broadcast/broadcast_test.go index cc06c3b7291..d396b5ce55e 100644 --- a/orderer/common/broadcast/broadcast_test.go +++ b/orderer/common/broadcast/broadcast_test.go @@ -103,7 +103,7 @@ func makeConfigMessage(chainID string) *cb.Envelope { Header: &cb.Header{ ChannelHeader: &cb.ChannelHeader{ ChannelId: chainID, - Type: int32(cb.HeaderType_CONFIGURATION_TRANSACTION), + Type: int32(cb.HeaderType_CONFIG), }, }, } diff --git a/orderer/common/configtxfilter/filter.go b/orderer/common/configtxfilter/filter.go index a48b84271b1..47222596c39 100644 --- a/orderer/common/configtxfilter/filter.go +++ b/orderer/common/configtxfilter/filter.go @@ -62,7 +62,7 @@ func (cf *configFilter) Apply(message *cb.Envelope) (filter.Action, filter.Commi return filter.Forward, nil } - if msgData.Header == nil || msgData.Header.ChannelHeader == nil || msgData.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIGURATION_TRANSACTION) { + if msgData.Header == nil || msgData.Header.ChannelHeader == nil || msgData.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIG) { return filter.Forward, nil } diff --git a/orderer/common/configtxfilter/filter_test.go b/orderer/common/configtxfilter/filter_test.go index 529037b2d0a..84d69c6784f 100644 --- a/orderer/common/configtxfilter/filter_test.go +++ b/orderer/common/configtxfilter/filter_test.go @@ -50,7 +50,7 @@ func TestAcceptGoodConfig(t *testing.T) { configEnvBytes := utils.MarshalOrPanic(&cb.ConfigEnvelope{ LastUpdate: configUpdateEnv, }) - configBytes := utils.MarshalOrPanic(&cb.Payload{Header: &cb.Header{ChannelHeader: &cb.ChannelHeader{Type: int32(cb.HeaderType_CONFIGURATION_TRANSACTION)}}, Data: configEnvBytes}) + configBytes := utils.MarshalOrPanic(&cb.Payload{Header: &cb.Header{ChannelHeader: &cb.ChannelHeader{Type: int32(cb.HeaderType_CONFIG)}}, Data: configEnvBytes}) configEnvelope := &cb.Envelope{ Payload: configBytes, } @@ -75,7 +75,7 @@ func TestAcceptGoodConfig(t *testing.T) { func TestRejectBadConfig(t *testing.T) { cf := NewFilter(&mockconfigtx.Manager{ValidateVal: fmt.Errorf("Error")}) config, _ := proto.Marshal(&cb.ConfigEnvelope{}) - configBytes, _ := proto.Marshal(&cb.Payload{Header: &cb.Header{ChannelHeader: &cb.ChannelHeader{Type: int32(cb.HeaderType_CONFIGURATION_TRANSACTION)}}, Data: config}) + configBytes, _ := proto.Marshal(&cb.Payload{Header: &cb.Header{ChannelHeader: &cb.ChannelHeader{Type: int32(cb.HeaderType_CONFIG)}}, Data: config}) result, _ := cf.Apply(&cb.Envelope{ Payload: configBytes, }) diff --git a/orderer/multichain/chainsupport.go b/orderer/multichain/chainsupport.go index 79abbff5be3..b622f21e9fd 100644 --- a/orderer/multichain/chainsupport.go +++ b/orderer/multichain/chainsupport.go @@ -230,7 +230,7 @@ func (cs *chainSupport) addLastConfigSignature(block *cb.Block) { lastConfigSignature.Signature = utils.SignOrPanic(cs.signer, util.ConcatenateBytes(lastConfigValue, lastConfigSignature.SignatureHeader, block.Header.Bytes())) - block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIGURATION] = utils.MarshalOrPanic(&cb.Metadata{ + block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = utils.MarshalOrPanic(&cb.Metadata{ Value: lastConfigValue, Signatures: []*cb.MetadataSignature{ lastConfigSignature, diff --git a/orderer/multichain/manager_test.go b/orderer/multichain/manager_test.go index f7e23f43247..7e2a4309bdb 100644 --- a/orderer/multichain/manager_test.go +++ b/orderer/multichain/manager_test.go @@ -87,7 +87,7 @@ func TestGetConfigTx(t *testing.T) { rl.Append(ordererledger.CreateNextBlock(rl, []*cb.Envelope{ctx})) block := ordererledger.CreateNextBlock(rl, []*cb.Envelope{makeNormalTx(provisional.TestChainID, 7)}) - block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIGURATION] = utils.MarshalOrPanic(&cb.Metadata{Value: utils.MarshalOrPanic(&cb.LastConfig{Index: 7})}) + block.Metadata.Metadata[cb.BlockMetadataIndex_LAST_CONFIG] = utils.MarshalOrPanic(&cb.Metadata{Value: utils.MarshalOrPanic(&cb.LastConfig{Index: 7})}) rl.Append(block) pctx := getConfigTx(rl) diff --git a/orderer/multichain/systemchain.go b/orderer/multichain/systemchain.go index e24beb5ef39..211a701abeb 100644 --- a/orderer/multichain/systemchain.go +++ b/orderer/multichain/systemchain.go @@ -230,7 +230,7 @@ func (sc *systemChain) authorizeAndInspect(configTx *cb.Envelope) cb.Status { return cb.Status_BAD_REQUEST } - if payload.Header == nil || payload.Header.ChannelHeader == nil || payload.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIGURATION_TRANSACTION) { + if payload.Header == nil || payload.Header.ChannelHeader == nil || payload.Header.ChannelHeader.Type != int32(cb.HeaderType_CONFIG) { logger.Debugf("Rejecting chain proposal: Not a config transaction: %s", err) return cb.Status_BAD_REQUEST } diff --git a/orderer/multichain/util_test.go b/orderer/multichain/util_test.go index 30808cc22de..c82a18dff45 100644 --- a/orderer/multichain/util_test.go +++ b/orderer/multichain/util_test.go @@ -99,7 +99,7 @@ func makeConfigTxFromConfigUpdateEnvelope(chainID string, configUpdateEnv *cb.Co payload := &cb.Payload{ Header: &cb.Header{ ChannelHeader: &cb.ChannelHeader{ - Type: int32(cb.HeaderType_CONFIGURATION_TRANSACTION), + Type: int32(cb.HeaderType_CONFIG), ChannelId: chainID, }, SignatureHeader: &cb.SignatureHeader{}, diff --git a/peer/channel/join.go b/peer/channel/join.go index 2f2cb3c2363..a8b10ceacee 100644 --- a/peer/channel/join.go +++ b/peer/channel/join.go @@ -100,7 +100,7 @@ func executeJoin(cf *ChannelCmdFactory) (err error) { uuid := cutil.GenerateUUID() var prop *pb.Proposal - prop, err = putils.CreateProposalFromCIS(uuid, pcommon.HeaderType_CONFIGURATION_TRANSACTION, "", invocation, creator) + prop, err = putils.CreateProposalFromCIS(uuid, pcommon.HeaderType_CONFIG, "", invocation, creator) if err != nil { return fmt.Errorf("Error creating proposal for join %s\n", err) } diff --git a/protos/common/common.pb.go b/protos/common/common.pb.go index cb252fc8d23..0a57262a2e8 100644 --- a/protos/common/common.pb.go +++ b/protos/common/common.pb.go @@ -109,29 +109,29 @@ func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0 type HeaderType int32 const ( - HeaderType_MESSAGE HeaderType = 0 - HeaderType_CONFIGURATION_TRANSACTION HeaderType = 1 - HeaderType_CONFIGURATION_ITEM HeaderType = 2 - HeaderType_ENDORSER_TRANSACTION HeaderType = 3 - HeaderType_ORDERER_TRANSACTION HeaderType = 4 - HeaderType_DELIVER_SEEK_INFO HeaderType = 5 + HeaderType_MESSAGE HeaderType = 0 + HeaderType_CONFIG HeaderType = 1 + HeaderType_CONFIG_UPDATE HeaderType = 2 + HeaderType_ENDORSER_TRANSACTION HeaderType = 3 + HeaderType_ORDERER_TRANSACTION HeaderType = 4 + HeaderType_DELIVER_SEEK_INFO HeaderType = 5 ) var HeaderType_name = map[int32]string{ 0: "MESSAGE", - 1: "CONFIGURATION_TRANSACTION", - 2: "CONFIGURATION_ITEM", + 1: "CONFIG", + 2: "CONFIG_UPDATE", 3: "ENDORSER_TRANSACTION", 4: "ORDERER_TRANSACTION", 5: "DELIVER_SEEK_INFO", } var HeaderType_value = map[string]int32{ - "MESSAGE": 0, - "CONFIGURATION_TRANSACTION": 1, - "CONFIGURATION_ITEM": 2, - "ENDORSER_TRANSACTION": 3, - "ORDERER_TRANSACTION": 4, - "DELIVER_SEEK_INFO": 5, + "MESSAGE": 0, + "CONFIG": 1, + "CONFIG_UPDATE": 2, + "ENDORSER_TRANSACTION": 3, + "ORDERER_TRANSACTION": 4, + "DELIVER_SEEK_INFO": 5, } func (x HeaderType) String() string { @@ -144,20 +144,20 @@ type BlockMetadataIndex int32 const ( BlockMetadataIndex_SIGNATURES BlockMetadataIndex = 0 - BlockMetadataIndex_LAST_CONFIGURATION BlockMetadataIndex = 1 + BlockMetadataIndex_LAST_CONFIG BlockMetadataIndex = 1 BlockMetadataIndex_TRANSACTIONS_FILTER BlockMetadataIndex = 2 BlockMetadataIndex_ORDERER BlockMetadataIndex = 3 ) var BlockMetadataIndex_name = map[int32]string{ 0: "SIGNATURES", - 1: "LAST_CONFIGURATION", + 1: "LAST_CONFIG", 2: "TRANSACTIONS_FILTER", 3: "ORDERER", } var BlockMetadataIndex_value = map[string]int32{ "SIGNATURES": 0, - "LAST_CONFIGURATION": 1, + "LAST_CONFIG": 1, "TRANSACTIONS_FILTER": 2, "ORDERER": 3, } @@ -404,61 +404,61 @@ func init() { func init() { proto.RegisterFile("common/common.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 888 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x55, 0xdd, 0x6e, 0xe3, 0x44, - 0x18, 0xad, 0xe3, 0xfc, 0x34, 0x5f, 0xda, 0xee, 0x74, 0xb2, 0xdd, 0xf5, 0x16, 0xaa, 0xad, 0x8c, - 0x40, 0xa5, 0x15, 0x89, 0x28, 0x37, 0x20, 0x71, 0xe3, 0x24, 0x93, 0xae, 0xb5, 0xa9, 0x0d, 0x63, - 0x67, 0x11, 0x3f, 0x92, 0x35, 0x49, 0xa6, 0x89, 0x45, 0x62, 0x47, 0xb6, 0x53, 0xb5, 0xaf, 0xc0, - 0x05, 0x42, 0x82, 0x2b, 0x24, 0x5e, 0x80, 0x27, 0xe1, 0x2d, 0x78, 0x09, 0x24, 0x6e, 0xd1, 0x78, - 0x6c, 0x6f, 0xdc, 0x22, 0xed, 0x55, 0x7c, 0xce, 0x77, 0x66, 0xbe, 0x33, 0xe7, 0x1b, 0xc7, 0xd0, - 0x9e, 0x86, 0xab, 0x55, 0x18, 0x74, 0xe5, 0x4f, 0x67, 0x1d, 0x85, 0x49, 0x88, 0xeb, 0x12, 0x1d, - 0xbf, 0x9c, 0x87, 0xe1, 0x7c, 0xc9, 0xbb, 0x29, 0x3b, 0xd9, 0xdc, 0x74, 0x13, 0x7f, 0xc5, 0xe3, - 0x84, 0xad, 0xd6, 0x52, 0xa8, 0xeb, 0x00, 0x23, 0x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, 0xca, - 0x6f, 0x49, 0x9c, 0x7d, 0x6f, 0x26, 0xf5, 0x14, 0x7e, 0xf6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x37, 0xa6, 0xba, 0x4b, 0x87, 0x06, 0x00, 0x00, + // 886 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x55, 0xdf, 0x6e, 0xe3, 0xc4, + 0x1b, 0xad, 0xe3, 0xfc, 0x69, 0xbe, 0x34, 0xed, 0x74, 0xb2, 0xfd, 0xd5, 0xbf, 0xc2, 0x6a, 0x2b, + 0x23, 0x50, 0x69, 0x45, 0x22, 0xca, 0x0d, 0x48, 0xdc, 0x38, 0xf1, 0xa4, 0x6b, 0x6d, 0xd6, 0x5e, + 0xc6, 0xce, 0x22, 0x58, 0x24, 0x6b, 0x92, 0x4c, 0x13, 0x8b, 0xc4, 0x8e, 0x6c, 0xa7, 0x6a, 0x6f, + 0xb9, 0xe4, 0x02, 0x21, 0xc1, 0x2d, 0x2f, 0xc0, 0x93, 0xf0, 0x16, 0xbc, 0x04, 0x12, 0xb7, 0x68, + 0x3c, 0xb6, 0x37, 0xe9, 0x22, 0x71, 0x15, 0x9f, 0xf3, 0x9d, 0x99, 0xef, 0xcc, 0xf9, 0xc6, 0x31, + 0x74, 0xa6, 0xd1, 0x6a, 0x15, 0x85, 0x3d, 0xf9, 0xd3, 0x5d, 0xc7, 0x51, 0x1a, 0xe1, 0xba, 0x44, + 0x67, 0xcf, 0xe6, 0x51, 0x34, 0x5f, 0xf2, 0x5e, 0xc6, 0x4e, 0x36, 0xb7, 0xbd, 0x34, 0x58, 0xf1, + 0x24, 0x65, 0xab, 0xb5, 0x14, 0xea, 0x3a, 0xc0, 0x88, 0x25, 0xe9, 0x20, 0x0a, 0x6f, 0x83, 0x39, + 0x7e, 0x02, 0xb5, 0x20, 0x9c, 0xf1, 0x7b, 0x4d, 0x39, 0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0x91, 0x13, 0x68, 0x06, 0x00, 0x00, } diff --git a/protos/common/common.proto b/protos/common/common.proto index 032038721d9..a418c2dea5b 100644 --- a/protos/common/common.proto +++ b/protos/common/common.proto @@ -36,8 +36,8 @@ enum Status { enum HeaderType { MESSAGE = 0; // Used for messages which are signed but opaque - CONFIGURATION_TRANSACTION = 1; // Used for messages which reconfigure the chain - CONFIGURATION_ITEM = 2; // Used inside of the the reconfiguration message for signing over ConfigItems + CONFIG = 1; // Used for messages which express the channel config + CONFIG_UPDATE = 2; // Used for transactions which update the channel config ENDORSER_TRANSACTION = 3; // Used by the SDK to submit endorser based transactions ORDERER_TRANSACTION = 4; // Used internally by the orderer for management DELIVER_SEEK_INFO = 5; // Used as the type for Envelope messages submitted to instruct the Deliver API to seek @@ -46,7 +46,7 @@ enum HeaderType { // This enum enlists indexes of the block metadata array enum BlockMetadataIndex { SIGNATURES = 0; // Block metadata array position for block signatures - LAST_CONFIGURATION = 1; // Block metadata array poistion to store last configuration block sequence number + LAST_CONFIG = 1; // Block metadata array poistion to store last configuration block sequence number TRANSACTIONS_FILTER = 2; // Block metadata array poistion to store serialized bit array filter of invalid transactions ORDERER = 3; // Block metadata array position to store operational metadata for orderers // e.g. For Kafka, this is where we store the last offset written to the local ledger. diff --git a/protos/common/configtx.pb.go b/protos/common/configtx.pb.go index 8706be7e8ae..bd76ff26b1b 100644 --- a/protos/common/configtx.pb.go +++ b/protos/common/configtx.pb.go @@ -28,7 +28,7 @@ var _ = math.Inf // 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 // a) The Envelope Payload has data set to the marshaled ConfigEnvelope -// b) The Envelope Payload has a header of type Header.Type.CONFIG_UPDATE // XXX change CONFIGURATION_ITEM to CONFIG_UPDATE in common.proto +// 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 diff --git a/protos/common/configtx.proto b/protos/common/configtx.proto index 6c602b614d1..40bef38b787 100644 --- a/protos/common/configtx.proto +++ b/protos/common/configtx.proto @@ -41,7 +41,7 @@ package common; // 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 // a) The Envelope Payload has data set to the marshaled ConfigEnvelope -// b) The Envelope Payload has a header of type Header.Type.CONFIG_UPDATE // XXX change CONFIGURATION_ITEM to CONFIG_UPDATE in common.proto +// 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 diff --git a/protos/utils/blockutils.go b/protos/utils/blockutils.go index f9f052827b9..7b2b2745a18 100644 --- a/protos/utils/blockutils.go +++ b/protos/utils/blockutils.go @@ -62,7 +62,7 @@ func GetMetadataFromBlockOrPanic(block *cb.Block, index cb.BlockMetadataIndex) * // GetLastConfigIndexFromBlock retrieves the index of the last config block as encoded in the block metadata func GetLastConfigIndexFromBlock(block *cb.Block) (uint64, error) { - md, err := GetMetadataFromBlock(block, cb.BlockMetadataIndex_LAST_CONFIGURATION) + md, err := GetMetadataFromBlock(block, cb.BlockMetadataIndex_LAST_CONFIG) if err != nil { return 0, err } diff --git a/protos/utils/proputils.go b/protos/utils/proputils.go index cff387b740c..71f8369686d 100644 --- a/protos/utils/proputils.go +++ b/protos/utils/proputils.go @@ -55,8 +55,8 @@ func GetChaincodeProposalContext(prop *peer.Proposal) (*peer.ChaincodeProposalCo return nil, fmt.Errorf("Could not extract the header from the proposal: %s", err) } if common.HeaderType(hdr.ChannelHeader.Type) != common.HeaderType_ENDORSER_TRANSACTION && - common.HeaderType(hdr.ChannelHeader.Type) != common.HeaderType_CONFIGURATION_TRANSACTION { - return nil, fmt.Errorf("Invalid proposal type expected ENDORSER_TRANSACTION or CONFIGURATION_TRANSACTION. Was: %d", hdr.ChannelHeader.Type) + common.HeaderType(hdr.ChannelHeader.Type) != common.HeaderType_CONFIG { + return nil, fmt.Errorf("Invalid proposal type expected ENDORSER_TRANSACTION or CONFIG. Was: %d", hdr.ChannelHeader.Type) } if hdr.SignatureHeader == nil {