common

package
v0.0.0-...-79afef5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0:   "UNKNOWN",
		200: "SUCCESS",
		400: "BAD_REQUEST",
		403: "FORBIDDEN",
		404: "NOT_FOUND",
		413: "REQUEST_ENTITY_TOO_LARGE",
		500: "INTERNAL_SERVER_ERROR",
		501: "NOT_IMPLEMENTED",
		503: "SERVICE_UNAVAILABLE",
	}
	Status_value = map[string]int32{
		"UNKNOWN":                  0,
		"SUCCESS":                  200,
		"BAD_REQUEST":              400,
		"FORBIDDEN":                403,
		"NOT_FOUND":                404,
		"REQUEST_ENTITY_TOO_LARGE": 413,
		"INTERNAL_SERVER_ERROR":    500,
		"NOT_IMPLEMENTED":          501,
		"SERVICE_UNAVAILABLE":      503,
	}
)

Enum value maps for Status.

View Source
var (
	HeaderType_name = map[int32]string{
		0: "MESSAGE",
		1: "CONFIG",
		2: "CONFIG_UPDATE",
		3: "ENDORSER_TRANSACTION",
		4: "ORDERER_TRANSACTION",
		5: "DELIVER_SEEK_INFO",
		6: "CHAINCODE_PACKAGE",
	}
	HeaderType_value = map[string]int32{
		"MESSAGE":              0,
		"CONFIG":               1,
		"CONFIG_UPDATE":        2,
		"ENDORSER_TRANSACTION": 3,
		"ORDERER_TRANSACTION":  4,
		"DELIVER_SEEK_INFO":    5,
		"CHAINCODE_PACKAGE":    6,
	}
)

Enum value maps for HeaderType.

View Source
var (
	BlockMetadataIndex_name = map[int32]string{
		0: "SIGNATURES",
		1: "LAST_CONFIG",
		2: "TRANSACTIONS_FILTER",
		3: "ORDERER",
		4: "COMMIT_HASH",
	}
	BlockMetadataIndex_value = map[string]int32{
		"SIGNATURES":          0,
		"LAST_CONFIG":         1,
		"TRANSACTIONS_FILTER": 2,
		"ORDERER":             3,
		"COMMIT_HASH":         4,
	}
)

Enum value maps for BlockMetadataIndex.

View Source
var (
	Policy_PolicyType_name = map[int32]string{
		0: "UNKNOWN",
		1: "SIGNATURE",
		2: "MSP",
		3: "IMPLICIT_META",
	}
	Policy_PolicyType_value = map[string]int32{
		"UNKNOWN":       0,
		"SIGNATURE":     1,
		"MSP":           2,
		"IMPLICIT_META": 3,
	}
)

Enum value maps for Policy_PolicyType.

View Source
var (
	ImplicitMetaPolicy_Rule_name = map[int32]string{
		0: "ANY",
		1: "ALL",
		2: "MAJORITY",
	}
	ImplicitMetaPolicy_Rule_value = map[string]int32{
		"ANY":      0,
		"ALL":      1,
		"MAJORITY": 2,
	}
)

Enum value maps for ImplicitMetaPolicy_Rule.

View Source
var File_common_collection_proto protoreflect.FileDescriptor
View Source
var File_common_common_proto protoreflect.FileDescriptor
View Source
var File_common_configtx_proto protoreflect.FileDescriptor
View Source
var File_common_configuration_proto protoreflect.FileDescriptor
View Source
var File_common_ledger_proto protoreflect.FileDescriptor
View Source
var File_common_policies_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ApplicationPolicy deprecated

type ApplicationPolicy struct {

	// Types that are assignable to Type:
	//	*ApplicationPolicy_SignaturePolicy
	//	*ApplicationPolicy_ChannelConfigPolicyReference
	Type isApplicationPolicy_Type `protobuf_oneof:"Type"`
	// contains filtered or unexported fields
}

ApplicationPolicy captures the diffenrent policy types that are set and evaluted at the application level.

Deprecated: Do not use.

func (*ApplicationPolicy) Descriptor deprecated

func (*ApplicationPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ApplicationPolicy.ProtoReflect.Descriptor instead.

func (*ApplicationPolicy) GetChannelConfigPolicyReference

func (x *ApplicationPolicy) GetChannelConfigPolicyReference() string

func (*ApplicationPolicy) GetSignaturePolicy

func (x *ApplicationPolicy) GetSignaturePolicy() *SignaturePolicyEnvelope

func (*ApplicationPolicy) GetType

func (m *ApplicationPolicy) GetType() isApplicationPolicy_Type

func (*ApplicationPolicy) ProtoMessage

func (*ApplicationPolicy) ProtoMessage()

func (*ApplicationPolicy) ProtoReflect

func (x *ApplicationPolicy) ProtoReflect() protoreflect.Message

func (*ApplicationPolicy) Reset

func (x *ApplicationPolicy) Reset()

func (*ApplicationPolicy) String

func (x *ApplicationPolicy) String() string

type ApplicationPolicy_ChannelConfigPolicyReference

type ApplicationPolicy_ChannelConfigPolicyReference struct {
	// ChannelConfigPolicyReference is used when the policy is
	// specified as a string that references a policy defined in
	// the configuration of the channel
	ChannelConfigPolicyReference string `protobuf:"bytes,2,opt,name=channel_config_policy_reference,json=channelConfigPolicyReference,proto3,oneof"`
}

type ApplicationPolicy_SignaturePolicy

type ApplicationPolicy_SignaturePolicy struct {
	// SignaturePolicy type is used if the policy is specified as
	// a combination (using threshold gates) of signatures from MSP
	// principals
	SignaturePolicy *SignaturePolicyEnvelope `protobuf:"bytes,1,opt,name=signature_policy,json=signaturePolicy,proto3,oneof"`
}

type Block

type Block struct {
	Header   *BlockHeader   `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data     *BlockData     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

This is finalized block structure to be shared among the orderer and peer Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but the Metadata is not.

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetData

func (x *Block) GetData() *BlockData

func (*Block) GetHeader

func (x *Block) GetHeader() *BlockHeader

func (*Block) GetMetadata

func (x *Block) GetMetadata() *BlockMetadata

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockData

type BlockData struct {
	Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockData) Descriptor deprecated

func (*BlockData) Descriptor() ([]byte, []int)

Deprecated: Use BlockData.ProtoReflect.Descriptor instead.

func (*BlockData) GetData

func (x *BlockData) GetData() [][]byte

func (*BlockData) ProtoMessage

func (*BlockData) ProtoMessage()

func (*BlockData) ProtoReflect

func (x *BlockData) ProtoReflect() protoreflect.Message

func (*BlockData) Reset

func (x *BlockData) Reset()

func (*BlockData) String

func (x *BlockData) String() string

type BlockDataHashingStructure

type BlockDataHashingStructure struct {

	// width specifies the width of the Merkle tree to use when computing the BlockDataHash
	// in order to replicate flat hashing, set this width to MAX_UINT32
	Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// contains filtered or unexported fields
}

BlockDataHashingStructure is encoded into the configuration transaction as a configuration item of type Chain with a Key of "BlockDataHashingStructure" and a Value of HashingAlgorithm as marshaled protobuf bytes

func (*BlockDataHashingStructure) Descriptor deprecated

func (*BlockDataHashingStructure) Descriptor() ([]byte, []int)

Deprecated: Use BlockDataHashingStructure.ProtoReflect.Descriptor instead.

func (*BlockDataHashingStructure) GetWidth

func (x *BlockDataHashingStructure) GetWidth() uint32

func (*BlockDataHashingStructure) ProtoMessage

func (*BlockDataHashingStructure) ProtoMessage()

func (*BlockDataHashingStructure) ProtoReflect

func (*BlockDataHashingStructure) Reset

func (x *BlockDataHashingStructure) Reset()

func (*BlockDataHashingStructure) String

func (x *BlockDataHashingStructure) String() string

type BlockHeader

type BlockHeader struct {
	Number       uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`                                // The position in the blockchain
	PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` // The hash of the previous block header
	DataHash     []byte `protobuf:"bytes,3,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`             // The hash of the BlockData, by MerkleTree
	// contains filtered or unexported fields
}

BlockHeader is the element of the block which forms the block chain The block header is hashed using the configured chain hashing algorithm over the ASN.1 encoding of the BlockHeader

func (*BlockHeader) Descriptor deprecated

func (*BlockHeader) Descriptor() ([]byte, []int)

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetDataHash

func (x *BlockHeader) GetDataHash() []byte

func (*BlockHeader) GetNumber

func (x *BlockHeader) GetNumber() uint64

func (*BlockHeader) GetPreviousHash

func (x *BlockHeader) GetPreviousHash() []byte

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect

func (x *BlockHeader) ProtoReflect() protoreflect.Message

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type BlockMetadata

type BlockMetadata struct {
	Metadata [][]byte `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockMetadata) Descriptor deprecated

func (*BlockMetadata) Descriptor() ([]byte, []int)

Deprecated: Use BlockMetadata.ProtoReflect.Descriptor instead.

func (*BlockMetadata) GetMetadata

func (x *BlockMetadata) GetMetadata() [][]byte

func (*BlockMetadata) ProtoMessage

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) ProtoReflect

func (x *BlockMetadata) ProtoReflect() protoreflect.Message

func (*BlockMetadata) Reset

func (x *BlockMetadata) Reset()

func (*BlockMetadata) String

func (x *BlockMetadata) String() string

type BlockMetadataIndex

type BlockMetadataIndex int32

This enum enlists indexes of the block metadata array

const (
	BlockMetadataIndex_SIGNATURES BlockMetadataIndex = 0 // Block metadata array position for block signatures
	// Deprecated: Do not use.
	BlockMetadataIndex_LAST_CONFIG         BlockMetadataIndex = 1 // Block metadata array position to store last configuration block sequence number
	BlockMetadataIndex_TRANSACTIONS_FILTER BlockMetadataIndex = 2 // Block metadata array position to store serialized bit array filter of invalid transactions
	// Deprecated: Do not use.
	BlockMetadataIndex_ORDERER     BlockMetadataIndex = 3
	BlockMetadataIndex_COMMIT_HASH BlockMetadataIndex = 4
)

func (BlockMetadataIndex) Descriptor

func (BlockMetadataIndex) Enum

func (BlockMetadataIndex) EnumDescriptor deprecated

func (BlockMetadataIndex) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockMetadataIndex.Descriptor instead.

func (BlockMetadataIndex) Number

func (BlockMetadataIndex) String

func (x BlockMetadataIndex) String() string

func (BlockMetadataIndex) Type

type BlockchainInfo

type BlockchainInfo struct {
	Height            uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	CurrentBlockHash  []byte `protobuf:"bytes,2,opt,name=currentBlockHash,proto3" json:"currentBlockHash,omitempty"`
	PreviousBlockHash []byte `protobuf:"bytes,3,opt,name=previousBlockHash,proto3" json:"previousBlockHash,omitempty"`
	// Specifies bootstrapping snapshot info if the channel is bootstrapped from a snapshot.
	// It is nil if the channel is not bootstrapped from a snapshot.
	BootstrappingSnapshotInfo *BootstrappingSnapshotInfo `protobuf:"bytes,4,opt,name=bootstrappingSnapshotInfo,proto3" json:"bootstrappingSnapshotInfo,omitempty"`
	// contains filtered or unexported fields
}

Contains information about the blockchain ledger such as height, current block hash, and previous block hash.

func (*BlockchainInfo) Descriptor deprecated

func (*BlockchainInfo) Descriptor() ([]byte, []int)

Deprecated: Use BlockchainInfo.ProtoReflect.Descriptor instead.

func (*BlockchainInfo) GetBootstrappingSnapshotInfo

func (x *BlockchainInfo) GetBootstrappingSnapshotInfo() *BootstrappingSnapshotInfo

func (*BlockchainInfo) GetCurrentBlockHash

func (x *BlockchainInfo) GetCurrentBlockHash() []byte

func (*BlockchainInfo) GetHeight

func (x *BlockchainInfo) GetHeight() uint64

func (*BlockchainInfo) GetPreviousBlockHash

func (x *BlockchainInfo) GetPreviousBlockHash() []byte

func (*BlockchainInfo) ProtoMessage

func (*BlockchainInfo) ProtoMessage()

func (*BlockchainInfo) ProtoReflect

func (x *BlockchainInfo) ProtoReflect() protoreflect.Message

func (*BlockchainInfo) Reset

func (x *BlockchainInfo) Reset()

func (*BlockchainInfo) String

func (x *BlockchainInfo) String() string

type BootstrappingSnapshotInfo

type BootstrappingSnapshotInfo struct {
	LastBlockInSnapshot uint64 `protobuf:"varint,1,opt,name=lastBlockInSnapshot,proto3" json:"lastBlockInSnapshot,omitempty"`
	// contains filtered or unexported fields
}

Contains information for the bootstrapping snapshot.

func (*BootstrappingSnapshotInfo) Descriptor deprecated

func (*BootstrappingSnapshotInfo) Descriptor() ([]byte, []int)

Deprecated: Use BootstrappingSnapshotInfo.ProtoReflect.Descriptor instead.

func (*BootstrappingSnapshotInfo) GetLastBlockInSnapshot

func (x *BootstrappingSnapshotInfo) GetLastBlockInSnapshot() uint64

func (*BootstrappingSnapshotInfo) ProtoMessage

func (*BootstrappingSnapshotInfo) ProtoMessage()

func (*BootstrappingSnapshotInfo) ProtoReflect

func (*BootstrappingSnapshotInfo) Reset

func (x *BootstrappingSnapshotInfo) Reset()

func (*BootstrappingSnapshotInfo) String

func (x *BootstrappingSnapshotInfo) String() string

type Capabilities

type Capabilities struct {
	Capabilities map[string]*Capability `` /* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

Capabilities message defines the capabilities a particular binary must implement for that binary to be able to safely participate in the channel. The capabilities message is defined at the /Channel level, the /Channel/Application level, and the /Channel/Orderer level.

The /Channel level capabilties define capabilities which both the orderer and peer binaries must satisfy. These capabilties might be things like a new MSP type, or a new policy type.

The /Channel/Orderer level capabilties define capabilities which must be supported by the orderer, but which have no bearing on the behavior of the peer. For instance if the orderer changes the logic for how it constructs new channels, only all orderers must agree on the new logic. The peers do not need to be aware of this change as they only interact with the channel after it has been constructed.

Finally, the /Channel/Application level capabilities define capabilities which the peer binary must satisfy, but which have no bearing on the orderer. For instance, if the peer adds a new UTXO transaction type, or changes the chaincode lifecycle requirements, all peers must agree on the new logic. However, orderers never inspect transactions this deeply, and therefore have no need to be aware of the change.

The capabilities strings defined in these messages typically correspond to release binary versions (e.g. "V1.1"), and are used primarilly as a mechanism for a fully upgraded network to switch from one set of logic to a new one.

Although for V1.1, the orderers must be upgraded to V1.1 prior to the rest of the network, going forward, because of the split between the /Channel, /Channel/Orderer and /Channel/Application capabilities. It should be possible for the orderer and application networks to upgrade themselves independently (with the exception of any new capabilities defined at the /Channel level).

func (*Capabilities) Descriptor deprecated

func (*Capabilities) Descriptor() ([]byte, []int)

Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.

func (*Capabilities) GetCapabilities

func (x *Capabilities) GetCapabilities() map[string]*Capability

func (*Capabilities) ProtoMessage

func (*Capabilities) ProtoMessage()

func (*Capabilities) ProtoReflect

func (x *Capabilities) ProtoReflect() protoreflect.Message

func (*Capabilities) Reset

func (x *Capabilities) Reset()

func (*Capabilities) String

func (x *Capabilities) String() string

type Capability

type Capability struct {
	// contains filtered or unexported fields
}

Capability is an empty message for the time being. It is defined as a protobuf message rather than a constant, so that we may extend capabilities with other fields if the need arises in the future. For the time being, a capability being in the capabilities map requires that that capability be supported.

func (*Capability) Descriptor deprecated

func (*Capability) Descriptor() ([]byte, []int)

Deprecated: Use Capability.ProtoReflect.Descriptor instead.

func (*Capability) ProtoMessage

func (*Capability) ProtoMessage()

func (*Capability) ProtoReflect

func (x *Capability) ProtoReflect() protoreflect.Message

func (*Capability) Reset

func (x *Capability) Reset()

func (*Capability) String

func (x *Capability) String() string

type ChannelHeader

type ChannelHeader struct {
	Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // Header types 0-10000 are reserved and defined by HeaderType
	// Version indicates message protocol version
	Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// Timestamp is the local time when the message was created
	// by the sender
	Timestamp *timestamp.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// 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
	//     be retrieved by the committer (uniqueness check here as well)
	//  -  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)
	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"`
	// If mutual TLS is employed, this represents
	// the hash of the client's TLS certificate
	TlsCertHash []byte `protobuf:"bytes,8,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"`
	// contains filtered or unexported fields
}

Header is a generic replay prevention and identity message to include in a signed payload

func (*ChannelHeader) Descriptor deprecated

func (*ChannelHeader) Descriptor() ([]byte, []int)

Deprecated: Use ChannelHeader.ProtoReflect.Descriptor instead.

func (*ChannelHeader) GetChannelId

func (x *ChannelHeader) GetChannelId() string

func (*ChannelHeader) GetEpoch

func (x *ChannelHeader) GetEpoch() uint64

func (*ChannelHeader) GetExtension

func (x *ChannelHeader) GetExtension() []byte

func (*ChannelHeader) GetTimestamp

func (x *ChannelHeader) GetTimestamp() *timestamp.Timestamp

func (*ChannelHeader) GetTlsCertHash

func (x *ChannelHeader) GetTlsCertHash() []byte

func (*ChannelHeader) GetTxId

func (x *ChannelHeader) GetTxId() string

func (*ChannelHeader) GetType

func (x *ChannelHeader) GetType() int32

func (*ChannelHeader) GetVersion

func (x *ChannelHeader) GetVersion() int32

func (*ChannelHeader) ProtoMessage

func (*ChannelHeader) ProtoMessage()

func (*ChannelHeader) ProtoReflect

func (x *ChannelHeader) ProtoReflect() protoreflect.Message

func (*ChannelHeader) Reset

func (x *ChannelHeader) Reset()

func (*ChannelHeader) String

func (x *ChannelHeader) String() string

type CollectionConfig deprecated

type CollectionConfig struct {

	// Types that are assignable to Payload:
	//	*CollectionConfig_StaticCollectionConfig
	Payload isCollectionConfig_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

CollectionConfig defines the configuration of a collection object; it currently contains a single, static type. Dynamic collections are deferred.

Deprecated: Do not use.

func (*CollectionConfig) Descriptor deprecated

func (*CollectionConfig) Descriptor() ([]byte, []int)

Deprecated: Use CollectionConfig.ProtoReflect.Descriptor instead.

func (*CollectionConfig) GetPayload

func (m *CollectionConfig) GetPayload() isCollectionConfig_Payload

func (*CollectionConfig) GetStaticCollectionConfig

func (x *CollectionConfig) GetStaticCollectionConfig() *StaticCollectionConfig

func (*CollectionConfig) ProtoMessage

func (*CollectionConfig) ProtoMessage()

func (*CollectionConfig) ProtoReflect

func (x *CollectionConfig) ProtoReflect() protoreflect.Message

func (*CollectionConfig) Reset

func (x *CollectionConfig) Reset()

func (*CollectionConfig) String

func (x *CollectionConfig) String() string

type CollectionConfigPackage deprecated

type CollectionConfigPackage struct {
	Config []*CollectionConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

CollectionConfigPackage represents an array of CollectionConfig messages; the extra struct is required because repeated oneof is forbidden by the protobuf syntax

Deprecated: Do not use.

func (*CollectionConfigPackage) Descriptor deprecated

func (*CollectionConfigPackage) Descriptor() ([]byte, []int)

Deprecated: Use CollectionConfigPackage.ProtoReflect.Descriptor instead.

func (*CollectionConfigPackage) GetConfig

func (x *CollectionConfigPackage) GetConfig() []*CollectionConfig

func (*CollectionConfigPackage) ProtoMessage

func (*CollectionConfigPackage) ProtoMessage()

func (*CollectionConfigPackage) ProtoReflect

func (x *CollectionConfigPackage) ProtoReflect() protoreflect.Message

func (*CollectionConfigPackage) Reset

func (x *CollectionConfigPackage) Reset()

func (*CollectionConfigPackage) String

func (x *CollectionConfigPackage) String() string

type CollectionConfig_StaticCollectionConfig

type CollectionConfig_StaticCollectionConfig struct {
	StaticCollectionConfig *StaticCollectionConfig `protobuf:"bytes,1,opt,name=static_collection_config,json=staticCollectionConfig,proto3,oneof"`
}

type CollectionPolicyConfig deprecated

type CollectionPolicyConfig struct {

	// Types that are assignable to Payload:
	//	*CollectionPolicyConfig_SignaturePolicy
	Payload isCollectionPolicyConfig_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

Collection policy configuration. Initially, the configuration can only contain a SignaturePolicy. In the future, the SignaturePolicy may be a more general Policy. Instead of containing the actual policy, the configuration may in the future contain a string reference to a policy.

Deprecated: Do not use.

func (*CollectionPolicyConfig) Descriptor deprecated

func (*CollectionPolicyConfig) Descriptor() ([]byte, []int)

Deprecated: Use CollectionPolicyConfig.ProtoReflect.Descriptor instead.

func (*CollectionPolicyConfig) GetPayload

func (m *CollectionPolicyConfig) GetPayload() isCollectionPolicyConfig_Payload

func (*CollectionPolicyConfig) GetSignaturePolicy

func (x *CollectionPolicyConfig) GetSignaturePolicy() *SignaturePolicyEnvelope

func (*CollectionPolicyConfig) ProtoMessage

func (*CollectionPolicyConfig) ProtoMessage()

func (*CollectionPolicyConfig) ProtoReflect

func (x *CollectionPolicyConfig) ProtoReflect() protoreflect.Message

func (*CollectionPolicyConfig) Reset

func (x *CollectionPolicyConfig) Reset()

func (*CollectionPolicyConfig) String

func (x *CollectionPolicyConfig) String() string

type CollectionPolicyConfig_SignaturePolicy

type CollectionPolicyConfig_SignaturePolicy struct {
	// Initially, only a signature policy is supported.
	SignaturePolicy *SignaturePolicyEnvelope `protobuf:"bytes,1,opt,name=signature_policy,json=signaturePolicy,proto3,oneof"`
}

type Config

type Config struct {
	Sequence     uint64       `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	ChannelGroup *ConfigGroup `protobuf:"bytes,2,opt,name=channel_group,json=channelGroup,proto3" json:"channel_group,omitempty"` // channel_group is a bad name for this, it should be changed to root when API breakage is allowed
	// contains filtered or unexported fields
}

Config represents the config for a particular channel

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetChannelGroup

func (x *Config) GetChannelGroup() *ConfigGroup

func (*Config) GetSequence

func (x *Config) GetSequence() uint64

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type ConfigEnvelope

type ConfigEnvelope struct {
	Config     *Config   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`                           // A marshaled Config structure
	LastUpdate *Envelope `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"` // The last CONFIG_UPDATE message which generated this current configuration
	// contains filtered or unexported fields
}

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)
  7. 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

func (*ConfigEnvelope) Descriptor deprecated

func (*ConfigEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use ConfigEnvelope.ProtoReflect.Descriptor instead.

func (*ConfigEnvelope) GetConfig

func (x *ConfigEnvelope) GetConfig() *Config

func (*ConfigEnvelope) GetLastUpdate

func (x *ConfigEnvelope) GetLastUpdate() *Envelope

func (*ConfigEnvelope) ProtoMessage

func (*ConfigEnvelope) ProtoMessage()

func (*ConfigEnvelope) ProtoReflect

func (x *ConfigEnvelope) ProtoReflect() protoreflect.Message

func (*ConfigEnvelope) Reset

func (x *ConfigEnvelope) Reset()

func (*ConfigEnvelope) String

func (x *ConfigEnvelope) String() string

type ConfigGroup

type ConfigGroup struct {
	Version   uint64                   `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Groups    map[string]*ConfigGroup  `` /* 153-byte string literal not displayed */
	Values    map[string]*ConfigValue  `` /* 153-byte string literal not displayed */
	Policies  map[string]*ConfigPolicy `` /* 157-byte string literal not displayed */
	ModPolicy string                   `protobuf:"bytes,5,opt,name=mod_policy,json=modPolicy,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

ConfigGroup is the hierarchical data structure for holding config

func (*ConfigGroup) Descriptor deprecated

func (*ConfigGroup) Descriptor() ([]byte, []int)

Deprecated: Use ConfigGroup.ProtoReflect.Descriptor instead.

func (*ConfigGroup) GetGroups

func (x *ConfigGroup) GetGroups() map[string]*ConfigGroup

func (*ConfigGroup) GetModPolicy

func (x *ConfigGroup) GetModPolicy() string

func (*ConfigGroup) GetPolicies

func (x *ConfigGroup) GetPolicies() map[string]*ConfigPolicy

func (*ConfigGroup) GetValues

func (x *ConfigGroup) GetValues() map[string]*ConfigValue

func (*ConfigGroup) GetVersion

func (x *ConfigGroup) GetVersion() uint64

func (*ConfigGroup) ProtoMessage

func (*ConfigGroup) ProtoMessage()

func (*ConfigGroup) ProtoReflect

func (x *ConfigGroup) ProtoReflect() protoreflect.Message

func (*ConfigGroup) Reset

func (x *ConfigGroup) Reset()

func (*ConfigGroup) String

func (x *ConfigGroup) String() string

type ConfigPolicy

type ConfigPolicy struct {
	Version   uint64  `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Policy    *Policy `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
	ModPolicy string  `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigPolicy) Descriptor deprecated

func (*ConfigPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ConfigPolicy.ProtoReflect.Descriptor instead.

func (*ConfigPolicy) GetModPolicy

func (x *ConfigPolicy) GetModPolicy() string

func (*ConfigPolicy) GetPolicy

func (x *ConfigPolicy) GetPolicy() *Policy

func (*ConfigPolicy) GetVersion

func (x *ConfigPolicy) GetVersion() uint64

func (*ConfigPolicy) ProtoMessage

func (*ConfigPolicy) ProtoMessage()

func (*ConfigPolicy) ProtoReflect

func (x *ConfigPolicy) ProtoReflect() protoreflect.Message

func (*ConfigPolicy) Reset

func (x *ConfigPolicy) Reset()

func (*ConfigPolicy) String

func (x *ConfigPolicy) String() string

type ConfigSignature

type ConfigSignature struct {
	SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"` // A marshaled SignatureHeader
	Signature       []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`                                    // Signature over the concatenation signatureHeader bytes and config bytes
	// contains filtered or unexported fields
}

func (*ConfigSignature) Descriptor deprecated

func (*ConfigSignature) Descriptor() ([]byte, []int)

Deprecated: Use ConfigSignature.ProtoReflect.Descriptor instead.

func (*ConfigSignature) GetSignature

func (x *ConfigSignature) GetSignature() []byte

func (*ConfigSignature) GetSignatureHeader

func (x *ConfigSignature) GetSignatureHeader() []byte

func (*ConfigSignature) ProtoMessage

func (*ConfigSignature) ProtoMessage()

func (*ConfigSignature) ProtoReflect

func (x *ConfigSignature) ProtoReflect() protoreflect.Message

func (*ConfigSignature) Reset

func (x *ConfigSignature) Reset()

func (*ConfigSignature) String

func (x *ConfigSignature) String() string

type ConfigUpdate

type ConfigUpdate struct {
	ChannelId    string            `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Which channel this config update is for
	ReadSet      *ConfigGroup      `protobuf:"bytes,2,opt,name=read_set,json=readSet,proto3" json:"read_set,omitempty"`       // ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
	WriteSet     *ConfigGroup      `protobuf:"bytes,3,opt,name=write_set,json=writeSet,proto3" json:"write_set,omitempty"`    // WriteSet lists the portion of the config which was written, this should included updated Versions
	IsolatedData map[string][]byte ``                                                                                         // Data which is not to be reflected in the resulting Config, but is still needed for some other purpose.  For instance, rscc_seed_data
	/* 185-byte string literal not displayed */
	// contains filtered or unexported fields
}

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

func (*ConfigUpdate) Descriptor deprecated

func (*ConfigUpdate) Descriptor() ([]byte, []int)

Deprecated: Use ConfigUpdate.ProtoReflect.Descriptor instead.

func (*ConfigUpdate) GetChannelId

func (x *ConfigUpdate) GetChannelId() string

func (*ConfigUpdate) GetIsolatedData

func (x *ConfigUpdate) GetIsolatedData() map[string][]byte

func (*ConfigUpdate) GetReadSet

func (x *ConfigUpdate) GetReadSet() *ConfigGroup

func (*ConfigUpdate) GetWriteSet

func (x *ConfigUpdate) GetWriteSet() *ConfigGroup

func (*ConfigUpdate) ProtoMessage

func (*ConfigUpdate) ProtoMessage()

func (*ConfigUpdate) ProtoReflect

func (x *ConfigUpdate) ProtoReflect() protoreflect.Message

func (*ConfigUpdate) Reset

func (x *ConfigUpdate) Reset()

func (*ConfigUpdate) String

func (x *ConfigUpdate) String() string

type ConfigUpdateEnvelope

type ConfigUpdateEnvelope struct {
	ConfigUpdate []byte             `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"` // A marshaled ConfigUpdate structure
	Signatures   []*ConfigSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`                         // Signatures over the config_update
	// contains filtered or unexported fields
}

func (*ConfigUpdateEnvelope) Descriptor deprecated

func (*ConfigUpdateEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use ConfigUpdateEnvelope.ProtoReflect.Descriptor instead.

func (*ConfigUpdateEnvelope) GetConfigUpdate

func (x *ConfigUpdateEnvelope) GetConfigUpdate() []byte

func (*ConfigUpdateEnvelope) GetSignatures

func (x *ConfigUpdateEnvelope) GetSignatures() []*ConfigSignature

func (*ConfigUpdateEnvelope) ProtoMessage

func (*ConfigUpdateEnvelope) ProtoMessage()

func (*ConfigUpdateEnvelope) ProtoReflect

func (x *ConfigUpdateEnvelope) ProtoReflect() protoreflect.Message

func (*ConfigUpdateEnvelope) Reset

func (x *ConfigUpdateEnvelope) Reset()

func (*ConfigUpdateEnvelope) String

func (x *ConfigUpdateEnvelope) String() string

type ConfigValue

type ConfigValue struct {
	Version   uint64 `protobuf:"varint,1,opt,name=version,proto3" 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,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

ConfigValue represents an individual piece of config data

func (*ConfigValue) Descriptor deprecated

func (*ConfigValue) Descriptor() ([]byte, []int)

Deprecated: Use ConfigValue.ProtoReflect.Descriptor instead.

func (*ConfigValue) GetModPolicy

func (x *ConfigValue) GetModPolicy() string

func (*ConfigValue) GetValue

func (x *ConfigValue) GetValue() []byte

func (*ConfigValue) GetVersion

func (x *ConfigValue) GetVersion() uint64

func (*ConfigValue) ProtoMessage

func (*ConfigValue) ProtoMessage()

func (*ConfigValue) ProtoReflect

func (x *ConfigValue) ProtoReflect() protoreflect.Message

func (*ConfigValue) Reset

func (x *ConfigValue) Reset()

func (*ConfigValue) String

func (x *ConfigValue) String() string

type Consortium

type Consortium struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Consortium represents the consortium context in which the channel was created

func (*Consortium) Descriptor deprecated

func (*Consortium) Descriptor() ([]byte, []int)

Deprecated: Use Consortium.ProtoReflect.Descriptor instead.

func (*Consortium) GetName

func (x *Consortium) GetName() string

func (*Consortium) ProtoMessage

func (*Consortium) ProtoMessage()

func (*Consortium) ProtoReflect

func (x *Consortium) ProtoReflect() protoreflect.Message

func (*Consortium) Reset

func (x *Consortium) Reset()

func (*Consortium) String

func (x *Consortium) String() string

type Envelope

type Envelope struct {

	// A marshaled Payload
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// A signature by the creator specified in the Payload header
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

Envelope wraps a Payload with a signature so that the message may be authenticated

func (*Envelope) Descriptor deprecated

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetPayload

func (x *Envelope) GetPayload() []byte

func (*Envelope) GetSignature

func (x *Envelope) GetSignature() []byte

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

type HashingAlgorithm

type HashingAlgorithm struct {

	// SHA256 is currently the only supported and tested algorithm.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

HashingAlgorithm is encoded into the configuration transaction as a configuration item of type Chain with a Key of "HashingAlgorithm" and a Value of HashingAlgorithm as marshaled protobuf bytes

func (*HashingAlgorithm) Descriptor deprecated

func (*HashingAlgorithm) Descriptor() ([]byte, []int)

Deprecated: Use HashingAlgorithm.ProtoReflect.Descriptor instead.

func (*HashingAlgorithm) GetName

func (x *HashingAlgorithm) GetName() string

func (*HashingAlgorithm) ProtoMessage

func (*HashingAlgorithm) ProtoMessage()

func (*HashingAlgorithm) ProtoReflect

func (x *HashingAlgorithm) ProtoReflect() protoreflect.Message

func (*HashingAlgorithm) Reset

func (x *HashingAlgorithm) Reset()

func (*HashingAlgorithm) String

func (x *HashingAlgorithm) String() string
type Header struct {
	ChannelHeader   []byte `protobuf:"bytes,1,opt,name=channel_header,json=channelHeader,proto3" json:"channel_header,omitempty"`
	SignatureHeader []byte `protobuf:"bytes,2,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetChannelHeader

func (x *Header) GetChannelHeader() []byte

func (*Header) GetSignatureHeader

func (x *Header) GetSignatureHeader() []byte

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type HeaderType

type HeaderType int32
const (
	HeaderType_MESSAGE              HeaderType = 0 // Used for messages which are signed but opaque
	HeaderType_CONFIG               HeaderType = 1 // Used for messages which express the channel config
	HeaderType_CONFIG_UPDATE        HeaderType = 2 // Used for transactions which update the channel config
	HeaderType_ENDORSER_TRANSACTION HeaderType = 3 // Used by the SDK to submit endorser based transactions
	HeaderType_ORDERER_TRANSACTION  HeaderType = 4 // Used internally by the orderer for management
	HeaderType_DELIVER_SEEK_INFO    HeaderType = 5 // Used as the type for Envelope messages submitted to instruct the Deliver API to seek
	HeaderType_CHAINCODE_PACKAGE    HeaderType = 6 // Used for packaging chaincode artifacts for install
)

func (HeaderType) Descriptor

func (HeaderType) Descriptor() protoreflect.EnumDescriptor

func (HeaderType) Enum

func (x HeaderType) Enum() *HeaderType

func (HeaderType) EnumDescriptor deprecated

func (HeaderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HeaderType.Descriptor instead.

func (HeaderType) Number

func (x HeaderType) Number() protoreflect.EnumNumber

func (HeaderType) String

func (x HeaderType) String() string

func (HeaderType) Type

type ImplicitMetaPolicy

type ImplicitMetaPolicy struct {
	SubPolicy string                  `protobuf:"bytes,1,opt,name=sub_policy,json=subPolicy,proto3" json:"sub_policy,omitempty"`
	Rule      ImplicitMetaPolicy_Rule `protobuf:"varint,2,opt,name=rule,proto3,enum=common.ImplicitMetaPolicy_Rule" json:"rule,omitempty"`
	// contains filtered or unexported fields
}

ImplicitMetaPolicy is a policy type which depends on the hierarchical nature of the configuration It is implicit because the rule is generate implicitly based on the number of sub policies It is meta because it depends only on the result of other policies When evaluated, this policy iterates over all immediate child sub-groups, retrieves the policy of name sub_policy, evaluates the collection and applies the rule. For example, with 4 sub-groups, and a policy name of "foo", ImplicitMetaPolicy retrieves each sub-group, retrieves policy "foo" for each subgroup, evaluates it, and, in the case of ANY 1 satisfied is sufficient, ALL would require 4 signatures, and MAJORITY would require 3 signatures.

func (*ImplicitMetaPolicy) Descriptor deprecated

func (*ImplicitMetaPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ImplicitMetaPolicy.ProtoReflect.Descriptor instead.

func (*ImplicitMetaPolicy) GetRule

func (*ImplicitMetaPolicy) GetSubPolicy

func (x *ImplicitMetaPolicy) GetSubPolicy() string

func (*ImplicitMetaPolicy) ProtoMessage

func (*ImplicitMetaPolicy) ProtoMessage()

func (*ImplicitMetaPolicy) ProtoReflect

func (x *ImplicitMetaPolicy) ProtoReflect() protoreflect.Message

func (*ImplicitMetaPolicy) Reset

func (x *ImplicitMetaPolicy) Reset()

func (*ImplicitMetaPolicy) String

func (x *ImplicitMetaPolicy) String() string

type ImplicitMetaPolicy_Rule

type ImplicitMetaPolicy_Rule int32
const (
	ImplicitMetaPolicy_ANY      ImplicitMetaPolicy_Rule = 0 // Requires any of the sub-policies be satisfied, if no sub-policies exist, always returns true
	ImplicitMetaPolicy_ALL      ImplicitMetaPolicy_Rule = 1 // Requires all of the sub-policies be satisfied
	ImplicitMetaPolicy_MAJORITY ImplicitMetaPolicy_Rule = 2 // Requires a strict majority (greater than half) of the sub-policies be satisfied
)

func (ImplicitMetaPolicy_Rule) Descriptor

func (ImplicitMetaPolicy_Rule) Enum

func (ImplicitMetaPolicy_Rule) EnumDescriptor deprecated

func (ImplicitMetaPolicy_Rule) EnumDescriptor() ([]byte, []int)

Deprecated: Use ImplicitMetaPolicy_Rule.Descriptor instead.

func (ImplicitMetaPolicy_Rule) Number

func (ImplicitMetaPolicy_Rule) String

func (x ImplicitMetaPolicy_Rule) String() string

func (ImplicitMetaPolicy_Rule) Type

type LastConfig

type LastConfig struct {
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index

func (*LastConfig) Descriptor deprecated

func (*LastConfig) Descriptor() ([]byte, []int)

Deprecated: Use LastConfig.ProtoReflect.Descriptor instead.

func (*LastConfig) GetIndex

func (x *LastConfig) GetIndex() uint64

func (*LastConfig) ProtoMessage

func (*LastConfig) ProtoMessage()

func (*LastConfig) ProtoReflect

func (x *LastConfig) ProtoReflect() protoreflect.Message

func (*LastConfig) Reset

func (x *LastConfig) Reset()

func (*LastConfig) String

func (x *LastConfig) String() string

type Metadata

type Metadata struct {
	Value      []byte               `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Signatures []*MetadataSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

Metadata is a common structure to be used to encode block metadata

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetSignatures

func (x *Metadata) GetSignatures() []*MetadataSignature

func (*Metadata) GetValue

func (x *Metadata) GetValue() []byte

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type MetadataSignature

type MetadataSignature struct {
	SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"` // An encoded SignatureHeader
	Signature       []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`                                    // The signature over the concatenation of the Metadata value bytes, signatureHeader, and block header
	// contains filtered or unexported fields
}

func (*MetadataSignature) Descriptor deprecated

func (*MetadataSignature) Descriptor() ([]byte, []int)

Deprecated: Use MetadataSignature.ProtoReflect.Descriptor instead.

func (*MetadataSignature) GetSignature

func (x *MetadataSignature) GetSignature() []byte

func (*MetadataSignature) GetSignatureHeader

func (x *MetadataSignature) GetSignatureHeader() []byte

func (*MetadataSignature) ProtoMessage

func (*MetadataSignature) ProtoMessage()

func (*MetadataSignature) ProtoReflect

func (x *MetadataSignature) ProtoReflect() protoreflect.Message

func (*MetadataSignature) Reset

func (x *MetadataSignature) Reset()

func (*MetadataSignature) String

func (x *MetadataSignature) String() string

type OrdererAddresses

type OrdererAddresses struct {
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

OrdererAddresses is encoded into the configuration transaction as a configuration item of type Chain with a Key of "OrdererAddresses" and a Value of OrdererAddresses as marshaled protobuf bytes

func (*OrdererAddresses) Descriptor deprecated

func (*OrdererAddresses) Descriptor() ([]byte, []int)

Deprecated: Use OrdererAddresses.ProtoReflect.Descriptor instead.

func (*OrdererAddresses) GetAddresses

func (x *OrdererAddresses) GetAddresses() []string

func (*OrdererAddresses) ProtoMessage

func (*OrdererAddresses) ProtoMessage()

func (*OrdererAddresses) ProtoReflect

func (x *OrdererAddresses) ProtoReflect() protoreflect.Message

func (*OrdererAddresses) Reset

func (x *OrdererAddresses) Reset()

func (*OrdererAddresses) String

func (x *OrdererAddresses) String() string

type OrdererBlockMetadata

type OrdererBlockMetadata struct {
	LastConfig        *LastConfig `protobuf:"bytes,1,opt,name=last_config,json=lastConfig,proto3" json:"last_config,omitempty"`
	ConsenterMetadata []byte      `protobuf:"bytes,2,opt,name=consenter_metadata,json=consenterMetadata,proto3" json:"consenter_metadata,omitempty"`
	// contains filtered or unexported fields
}

OrdererBlockMetadata defines metadata that is set by the ordering service.

func (*OrdererBlockMetadata) Descriptor deprecated

func (*OrdererBlockMetadata) Descriptor() ([]byte, []int)

Deprecated: Use OrdererBlockMetadata.ProtoReflect.Descriptor instead.

func (*OrdererBlockMetadata) GetConsenterMetadata

func (x *OrdererBlockMetadata) GetConsenterMetadata() []byte

func (*OrdererBlockMetadata) GetLastConfig

func (x *OrdererBlockMetadata) GetLastConfig() *LastConfig

func (*OrdererBlockMetadata) ProtoMessage

func (*OrdererBlockMetadata) ProtoMessage()

func (*OrdererBlockMetadata) ProtoReflect

func (x *OrdererBlockMetadata) ProtoReflect() protoreflect.Message

func (*OrdererBlockMetadata) Reset

func (x *OrdererBlockMetadata) Reset()

func (*OrdererBlockMetadata) String

func (x *OrdererBlockMetadata) String() string

type Payload

type Payload struct {

	// Header is included to provide identity and prevent replay
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// Data, the encoding of which is defined by the type in the header
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Payload is the message contents (and header to allow for signing)

func (*Payload) Descriptor deprecated

func (*Payload) Descriptor() ([]byte, []int)

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetData

func (x *Payload) GetData() []byte

func (*Payload) GetHeader

func (x *Payload) GetHeader() *Header

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type Policy

type Policy struct {
	Type  int32  `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` // For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Policy expresses a policy which the orderer can evaluate, because there has been some desire expressed to support multiple policy engines, this is typed as a oneof for now

func (*Policy) Descriptor deprecated

func (*Policy) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetType

func (x *Policy) GetType() int32

func (*Policy) GetValue

func (x *Policy) GetValue() []byte

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

type Policy_PolicyType

type Policy_PolicyType int32
const (
	Policy_UNKNOWN       Policy_PolicyType = 0 // Reserved to check for proper initialization
	Policy_SIGNATURE     Policy_PolicyType = 1
	Policy_MSP           Policy_PolicyType = 2
	Policy_IMPLICIT_META Policy_PolicyType = 3
)

func (Policy_PolicyType) Descriptor

func (Policy_PolicyType) Enum

func (Policy_PolicyType) EnumDescriptor deprecated

func (Policy_PolicyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Policy_PolicyType.Descriptor instead.

func (Policy_PolicyType) Number

func (Policy_PolicyType) String

func (x Policy_PolicyType) String() string

func (Policy_PolicyType) Type

type SignatureHeader

type SignatureHeader struct {

	// Creator of the message, a marshaled msp.SerializedIdentity
	Creator []byte `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// Arbitrary number that may only be used once. Can be used to detect replay attacks.
	Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

func (*SignatureHeader) Descriptor deprecated

func (*SignatureHeader) Descriptor() ([]byte, []int)

Deprecated: Use SignatureHeader.ProtoReflect.Descriptor instead.

func (*SignatureHeader) GetCreator

func (x *SignatureHeader) GetCreator() []byte

func (*SignatureHeader) GetNonce

func (x *SignatureHeader) GetNonce() []byte

func (*SignatureHeader) ProtoMessage

func (*SignatureHeader) ProtoMessage()

func (*SignatureHeader) ProtoReflect

func (x *SignatureHeader) ProtoReflect() protoreflect.Message

func (*SignatureHeader) Reset

func (x *SignatureHeader) Reset()

func (*SignatureHeader) String

func (x *SignatureHeader) String() string

type SignaturePolicy

type SignaturePolicy struct {

	// Types that are assignable to Type:
	//	*SignaturePolicy_SignedBy
	//	*SignaturePolicy_NOutOf_
	Type isSignaturePolicy_Type `protobuf_oneof:"Type"`
	// contains filtered or unexported fields
}

SignaturePolicy is a recursive message structure which defines a featherweight DSL for describing policies which are more complicated than 'exactly this signature'. The NOutOf operator is sufficent to express AND as well as OR, as well as of course N out of the following M policies SignedBy implies that the signature is from a valid certificate which is signed by the trusted authority specified in the bytes. This will be the certificate itself for a self-signed certificate and will be the CA for more traditional certificates

func (*SignaturePolicy) Descriptor deprecated

func (*SignaturePolicy) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicy.ProtoReflect.Descriptor instead.

func (*SignaturePolicy) GetNOutOf

func (x *SignaturePolicy) GetNOutOf() *SignaturePolicy_NOutOf

func (*SignaturePolicy) GetSignedBy

func (x *SignaturePolicy) GetSignedBy() int32

func (*SignaturePolicy) GetType

func (m *SignaturePolicy) GetType() isSignaturePolicy_Type

func (*SignaturePolicy) ProtoMessage

func (*SignaturePolicy) ProtoMessage()

func (*SignaturePolicy) ProtoReflect

func (x *SignaturePolicy) ProtoReflect() protoreflect.Message

func (*SignaturePolicy) Reset

func (x *SignaturePolicy) Reset()

func (*SignaturePolicy) String

func (x *SignaturePolicy) String() string

type SignaturePolicyEnvelope

type SignaturePolicyEnvelope struct {
	Version    int32               `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Rule       *SignaturePolicy    `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"`
	Identities []*msp.MSPPrincipal `protobuf:"bytes,3,rep,name=identities,proto3" json:"identities,omitempty"`
	// contains filtered or unexported fields
}

SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements

func (*SignaturePolicyEnvelope) Descriptor deprecated

func (*SignaturePolicyEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicyEnvelope.ProtoReflect.Descriptor instead.

func (*SignaturePolicyEnvelope) GetIdentities

func (x *SignaturePolicyEnvelope) GetIdentities() []*msp.MSPPrincipal

func (*SignaturePolicyEnvelope) GetRule

func (*SignaturePolicyEnvelope) GetVersion

func (x *SignaturePolicyEnvelope) GetVersion() int32

func (*SignaturePolicyEnvelope) ProtoMessage

func (*SignaturePolicyEnvelope) ProtoMessage()

func (*SignaturePolicyEnvelope) ProtoReflect

func (x *SignaturePolicyEnvelope) ProtoReflect() protoreflect.Message

func (*SignaturePolicyEnvelope) Reset

func (x *SignaturePolicyEnvelope) Reset()

func (*SignaturePolicyEnvelope) String

func (x *SignaturePolicyEnvelope) String() string

type SignaturePolicy_NOutOf

type SignaturePolicy_NOutOf struct {
	N     int32              `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"`
	Rules []*SignaturePolicy `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*SignaturePolicy_NOutOf) Descriptor deprecated

func (*SignaturePolicy_NOutOf) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicy_NOutOf.ProtoReflect.Descriptor instead.

func (*SignaturePolicy_NOutOf) GetN

func (x *SignaturePolicy_NOutOf) GetN() int32

func (*SignaturePolicy_NOutOf) GetRules

func (x *SignaturePolicy_NOutOf) GetRules() []*SignaturePolicy

func (*SignaturePolicy_NOutOf) ProtoMessage

func (*SignaturePolicy_NOutOf) ProtoMessage()

func (*SignaturePolicy_NOutOf) ProtoReflect

func (x *SignaturePolicy_NOutOf) ProtoReflect() protoreflect.Message

func (*SignaturePolicy_NOutOf) Reset

func (x *SignaturePolicy_NOutOf) Reset()

func (*SignaturePolicy_NOutOf) String

func (x *SignaturePolicy_NOutOf) String() string

type SignaturePolicy_NOutOf_

type SignaturePolicy_NOutOf_ struct {
	NOutOf *SignaturePolicy_NOutOf `protobuf:"bytes,2,opt,name=n_out_of,json=nOutOf,proto3,oneof"`
}

type SignaturePolicy_SignedBy

type SignaturePolicy_SignedBy struct {
	SignedBy int32 `protobuf:"varint,1,opt,name=signed_by,json=signedBy,proto3,oneof"`
}

type StaticCollectionConfig deprecated

type StaticCollectionConfig struct {

	// the name of the collection inside the denoted chaincode
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// a reference to a policy residing / managed in the config block
	// to define which orgs have access to this collection’s private data
	MemberOrgsPolicy *CollectionPolicyConfig `protobuf:"bytes,2,opt,name=member_orgs_policy,json=memberOrgsPolicy,proto3" json:"member_orgs_policy,omitempty"`
	// The minimum number of peers private data will be sent to upon
	// endorsement. The endorsement would fail if dissemination to at least
	// this number of peers is not achieved.
	RequiredPeerCount int32 `protobuf:"varint,3,opt,name=required_peer_count,json=requiredPeerCount,proto3" json:"required_peer_count,omitempty"`
	// The maximum number of peers that private data will be sent to
	// upon endorsement. This number has to be bigger than required_peer_count.
	MaximumPeerCount int32 `protobuf:"varint,4,opt,name=maximum_peer_count,json=maximumPeerCount,proto3" json:"maximum_peer_count,omitempty"`
	// The number of blocks after which the collection data expires.
	// For instance if the value is set to 10, a key last modified by block number 100
	// will be purged at block number 111. A zero value is treated same as MaxUint64
	BlockToLive uint64 `protobuf:"varint,5,opt,name=block_to_live,json=blockToLive,proto3" json:"block_to_live,omitempty"`
	// The member only read access denotes whether only collection member clients
	// can read the private data (if set to true), or even non members can
	// read the data (if set to false, for example if you want to implement more granular
	// access logic in the chaincode)
	MemberOnlyRead bool `protobuf:"varint,6,opt,name=member_only_read,json=memberOnlyRead,proto3" json:"member_only_read,omitempty"`
	// The member only write access denotes whether only collection member clients
	// can write the private data (if set to true), or even non members can
	// write the data (if set to false, for example if you want to implement more granular
	// access logic in the chaincode)
	MemberOnlyWrite bool `protobuf:"varint,7,opt,name=member_only_write,json=memberOnlyWrite,proto3" json:"member_only_write,omitempty"`
	// a reference to a policy residing / managed in the config block
	// to define the endorsement policy for this collection
	EndorsementPolicy *ApplicationPolicy `protobuf:"bytes,8,opt,name=endorsement_policy,json=endorsementPolicy,proto3" json:"endorsement_policy,omitempty"`
	// contains filtered or unexported fields
}

StaticCollectionConfig constitutes the configuration parameters of a static collection object. Static collections are collections that are known at chaincode instantiation time, and that cannot be changed. Dynamic collections are deferred.

Deprecated: Do not use.

func (*StaticCollectionConfig) Descriptor deprecated

func (*StaticCollectionConfig) Descriptor() ([]byte, []int)

Deprecated: Use StaticCollectionConfig.ProtoReflect.Descriptor instead.

func (*StaticCollectionConfig) GetBlockToLive

func (x *StaticCollectionConfig) GetBlockToLive() uint64

func (*StaticCollectionConfig) GetEndorsementPolicy

func (x *StaticCollectionConfig) GetEndorsementPolicy() *ApplicationPolicy

func (*StaticCollectionConfig) GetMaximumPeerCount

func (x *StaticCollectionConfig) GetMaximumPeerCount() int32

func (*StaticCollectionConfig) GetMemberOnlyRead

func (x *StaticCollectionConfig) GetMemberOnlyRead() bool

func (*StaticCollectionConfig) GetMemberOnlyWrite

func (x *StaticCollectionConfig) GetMemberOnlyWrite() bool

func (*StaticCollectionConfig) GetMemberOrgsPolicy

func (x *StaticCollectionConfig) GetMemberOrgsPolicy() *CollectionPolicyConfig

func (*StaticCollectionConfig) GetName

func (x *StaticCollectionConfig) GetName() string

func (*StaticCollectionConfig) GetRequiredPeerCount

func (x *StaticCollectionConfig) GetRequiredPeerCount() int32

func (*StaticCollectionConfig) ProtoMessage

func (*StaticCollectionConfig) ProtoMessage()

func (*StaticCollectionConfig) ProtoReflect

func (x *StaticCollectionConfig) ProtoReflect() protoreflect.Message

func (*StaticCollectionConfig) Reset

func (x *StaticCollectionConfig) Reset()

func (*StaticCollectionConfig) String

func (x *StaticCollectionConfig) String() string

type Status

type Status int32

These status codes are intended to resemble selected HTTP status codes

const (
	Status_UNKNOWN                  Status = 0
	Status_SUCCESS                  Status = 200
	Status_BAD_REQUEST              Status = 400
	Status_FORBIDDEN                Status = 403
	Status_NOT_FOUND                Status = 404
	Status_REQUEST_ENTITY_TOO_LARGE Status = 413
	Status_INTERNAL_SERVER_ERROR    Status = 500
	Status_NOT_IMPLEMENTED          Status = 501
	Status_SERVICE_UNAVAILABLE      Status = 503
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL