6 Star 46 Fork 28

Hyperledger/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
configtx.pb.go 16.99 KB
一键复制 编辑 原始数据 按行查看 历史
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: common/configtx.proto
package common
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ConfigEnvelope is designed to contain _all_ configuration for a chain with no dependency
// 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
// 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
// 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
type ConfigEnvelope struct {
Config *Config `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
LastUpdate *Envelope `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate" json:"last_update,omitempty"`
}
func (m *ConfigEnvelope) Reset() { *m = ConfigEnvelope{} }
func (m *ConfigEnvelope) String() string { return proto.CompactTextString(m) }
func (*ConfigEnvelope) ProtoMessage() {}
func (*ConfigEnvelope) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
func (m *ConfigEnvelope) GetConfig() *Config {
if m != nil {
return m.Config
}
return nil
}
func (m *ConfigEnvelope) GetLastUpdate() *Envelope {
if m != nil {
return m.LastUpdate
}
return nil
}
type ConfigGroupSchema struct {
Groups map[string]*ConfigGroupSchema `protobuf:"bytes,1,rep,name=groups" json:"groups,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Values map[string]*ConfigValueSchema `protobuf:"bytes,2,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Policies map[string]*ConfigPolicySchema `protobuf:"bytes,3,rep,name=policies" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *ConfigGroupSchema) Reset() { *m = ConfigGroupSchema{} }
func (m *ConfigGroupSchema) String() string { return proto.CompactTextString(m) }
func (*ConfigGroupSchema) ProtoMessage() {}
func (*ConfigGroupSchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *ConfigGroupSchema) GetGroups() map[string]*ConfigGroupSchema {
if m != nil {
return m.Groups
}
return nil
}
func (m *ConfigGroupSchema) GetValues() map[string]*ConfigValueSchema {
if m != nil {
return m.Values
}
return nil
}
func (m *ConfigGroupSchema) GetPolicies() map[string]*ConfigPolicySchema {
if m != nil {
return m.Policies
}
return nil
}
type ConfigValueSchema struct {
}
func (m *ConfigValueSchema) Reset() { *m = ConfigValueSchema{} }
func (m *ConfigValueSchema) String() string { return proto.CompactTextString(m) }
func (*ConfigValueSchema) ProtoMessage() {}
func (*ConfigValueSchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
type ConfigPolicySchema struct {
}
func (m *ConfigPolicySchema) Reset() { *m = ConfigPolicySchema{} }
func (m *ConfigPolicySchema) String() string { return proto.CompactTextString(m) }
func (*ConfigPolicySchema) ProtoMessage() {}
func (*ConfigPolicySchema) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
// Config represents the config for a particular channel
type Config struct {
Sequence uint64 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"`
ChannelGroup *ConfigGroup `protobuf:"bytes,2,opt,name=channel_group,json=channelGroup" json:"channel_group,omitempty"`
}
func (m *Config) Reset() { *m = Config{} }
func (m *Config) String() string { return proto.CompactTextString(m) }
func (*Config) ProtoMessage() {}
func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (m *Config) GetSequence() uint64 {
if m != nil {
return m.Sequence
}
return 0
}
func (m *Config) GetChannelGroup() *ConfigGroup {
if m != nil {
return m.ChannelGroup
}
return nil
}
type ConfigUpdateEnvelope struct {
ConfigUpdate []byte `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"`
Signatures []*ConfigSignature `protobuf:"bytes,2,rep,name=signatures" json:"signatures,omitempty"`
}
func (m *ConfigUpdateEnvelope) Reset() { *m = ConfigUpdateEnvelope{} }
func (m *ConfigUpdateEnvelope) String() string { return proto.CompactTextString(m) }
func (*ConfigUpdateEnvelope) ProtoMessage() {}
func (*ConfigUpdateEnvelope) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
func (m *ConfigUpdateEnvelope) GetConfigUpdate() []byte {
if m != nil {
return m.ConfigUpdate
}
return nil
}
func (m *ConfigUpdateEnvelope) GetSignatures() []*ConfigSignature {
if m != nil {
return m.Signatures
}
return nil
}
// 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
type ConfigUpdate struct {
ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId" json:"channel_id,omitempty"`
ReadSet *ConfigGroup `protobuf:"bytes,2,opt,name=read_set,json=readSet" json:"read_set,omitempty"`
WriteSet *ConfigGroup `protobuf:"bytes,3,opt,name=write_set,json=writeSet" json:"write_set,omitempty"`
}
func (m *ConfigUpdate) Reset() { *m = ConfigUpdate{} }
func (m *ConfigUpdate) String() string { return proto.CompactTextString(m) }
func (*ConfigUpdate) ProtoMessage() {}
func (*ConfigUpdate) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
func (m *ConfigUpdate) GetChannelId() string {
if m != nil {
return m.ChannelId
}
return ""
}
func (m *ConfigUpdate) GetReadSet() *ConfigGroup {
if m != nil {
return m.ReadSet
}
return nil
}
func (m *ConfigUpdate) GetWriteSet() *ConfigGroup {
if m != nil {
return m.WriteSet
}
return nil
}
// ConfigGroup is the hierarchical data structure for holding config
type ConfigGroup struct {
Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
Groups map[string]*ConfigGroup `protobuf:"bytes,2,rep,name=groups" json:"groups,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Values map[string]*ConfigValue `protobuf:"bytes,3,rep,name=values" json:"values,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Policies map[string]*ConfigPolicy `protobuf:"bytes,4,rep,name=policies" json:"policies,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
ModPolicy string `protobuf:"bytes,5,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"`
}
func (m *ConfigGroup) Reset() { *m = ConfigGroup{} }
func (m *ConfigGroup) String() string { return proto.CompactTextString(m) }
func (*ConfigGroup) ProtoMessage() {}
func (*ConfigGroup) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (m *ConfigGroup) GetVersion() uint64 {
if m != nil {
return m.Version
}
return 0
}
func (m *ConfigGroup) GetGroups() map[string]*ConfigGroup {
if m != nil {
return m.Groups
}
return nil
}
func (m *ConfigGroup) GetValues() map[string]*ConfigValue {
if m != nil {
return m.Values
}
return nil
}
func (m *ConfigGroup) GetPolicies() map[string]*ConfigPolicy {
if m != nil {
return m.Policies
}
return nil
}
func (m *ConfigGroup) GetModPolicy() string {
if m != nil {
return m.ModPolicy
}
return ""
}
// ConfigValue represents an individual piece of config data
type ConfigValue struct {
Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
ModPolicy string `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"`
}
func (m *ConfigValue) Reset() { *m = ConfigValue{} }
func (m *ConfigValue) String() string { return proto.CompactTextString(m) }
func (*ConfigValue) ProtoMessage() {}
func (*ConfigValue) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
func (m *ConfigValue) GetVersion() uint64 {
if m != nil {
return m.Version
}
return 0
}
func (m *ConfigValue) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *ConfigValue) GetModPolicy() string {
if m != nil {
return m.ModPolicy
}
return ""
}
type ConfigPolicy struct {
Version uint64 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
Policy *Policy `protobuf:"bytes,2,opt,name=policy" json:"policy,omitempty"`
ModPolicy string `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy" json:"mod_policy,omitempty"`
}
func (m *ConfigPolicy) Reset() { *m = ConfigPolicy{} }
func (m *ConfigPolicy) String() string { return proto.CompactTextString(m) }
func (*ConfigPolicy) ProtoMessage() {}
func (*ConfigPolicy) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{9} }
func (m *ConfigPolicy) GetVersion() uint64 {
if m != nil {
return m.Version
}
return 0
}
func (m *ConfigPolicy) GetPolicy() *Policy {
if m != nil {
return m.Policy
}
return nil
}
func (m *ConfigPolicy) GetModPolicy() string {
if m != nil {
return m.ModPolicy
}
return ""
}
type ConfigSignature struct {
SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
}
func (m *ConfigSignature) Reset() { *m = ConfigSignature{} }
func (m *ConfigSignature) String() string { return proto.CompactTextString(m) }
func (*ConfigSignature) ProtoMessage() {}
func (*ConfigSignature) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{10} }
func (m *ConfigSignature) GetSignatureHeader() []byte {
if m != nil {
return m.SignatureHeader
}
return nil
}
func (m *ConfigSignature) GetSignature() []byte {
if m != nil {
return m.Signature
}
return nil
}
func init() {
proto.RegisterType((*ConfigEnvelope)(nil), "common.ConfigEnvelope")
proto.RegisterType((*ConfigGroupSchema)(nil), "common.ConfigGroupSchema")
proto.RegisterType((*ConfigValueSchema)(nil), "common.ConfigValueSchema")
proto.RegisterType((*ConfigPolicySchema)(nil), "common.ConfigPolicySchema")
proto.RegisterType((*Config)(nil), "common.Config")
proto.RegisterType((*ConfigUpdateEnvelope)(nil), "common.ConfigUpdateEnvelope")
proto.RegisterType((*ConfigUpdate)(nil), "common.ConfigUpdate")
proto.RegisterType((*ConfigGroup)(nil), "common.ConfigGroup")
proto.RegisterType((*ConfigValue)(nil), "common.ConfigValue")
proto.RegisterType((*ConfigPolicy)(nil), "common.ConfigPolicy")
proto.RegisterType((*ConfigSignature)(nil), "common.ConfigSignature")
}
func init() { proto.RegisterFile("common/configtx.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{
// 674 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x55, 0xdb, 0x6e, 0xd3, 0x40,
0x10, 0x55, 0xe2, 0xd6, 0x4d, 0x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xb2, 0xba, 0xac, 0xe1, 0x05, 0x6c, 0x4e, 0x99, 0x0d, 0xed, 0xc3, 0x56, 0x69, 0xb7,
0xe1, 0x08, 0xbb, 0x3e, 0xa6, 0xd2, 0xc1, 0x9b, 0x65, 0xfe, 0x2d, 0x4f, 0xa3, 0x7b, 0xd0, 0x2e,
0x53, 0xf2, 0x9e, 0xff, 0x12, 0xaf, 0x07, 0xf0, 0x98, 0xd0, 0xc0, 0x1e, 0x4d, 0x12, 0x4c, 0x23,
0xec, 0x07, 0x98, 0xda, 0x57, 0xee, 0x25, 0x0d, 0x3d, 0xf1, 0x55, 0x4c, 0xe5, 0x89, 0x2f, 0x9e,
0x07, 0x21, 0x1b, 0x65, 0x97, 0x79, 0xd8, 0x57, 0xc0, 0x7d, 0x01, 0xee, 0x0b, 0xb0, 0xfc, 0xce,
0x5e, 0xea, 0x3c, 0x7c, 0xf9, 0x37, 0x00, 0x00, 0xff, 0xff, 0x25, 0x75, 0xfb, 0xf8, 0x9e, 0x07,
0x00, 0x00,
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/fabric.git
git@gitee.com:hyperledger/fabric.git
hyperledger
fabric
fabric
v1.0.6

搜索帮助