Get desktop application:
View/edit binary Protocol Buffers messages
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.
Used in:
,Used in:
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
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
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
Used in:
The position in the blockchain
The hash of the previous block header
The hash of the BlockData, by MerkleTree
Used in:
This enum enlists indexes of the block metadata array
Block metadata array position for block signatures
Block metadata array position to store last configuration block sequence number
Block metadata array position to store serialized bit array filter of invalid transactions
Block metadata array position to store operational metadata for orderers
Contains information about the blockchain ledger such as height, current block hash, and previous block hash.
Header is a generic replay prevention and identity message to include in a signed payload
Header types 0-10000 are reserved and defined by HeaderType
Version indicates message protocol version
Timestamp is the local time when the message was created by the sender
Identifier of the channel this message is bound for
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
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)
Extension that may be attached based on the header type
Config represents the config for a particular channel
Used in:
channel_group is a bad name for this, it should be changed to root when API breakage is allowed
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
A marshaled Config structure
The last CONFIG_UPDATE message which generated this current configuration
ConfigGroup is the hierarchical data structure for holding config
Used in:
,Used in:
Used in:
(message has no fields)
Used in:
A marshaled SignatureHeader
Signature over the concatenation signatureHeader bytes and config bytes
ConfigType is an enumeration of possible types for the config. The type field in the config is an int32 for extensibility, but this enum type should generally be used to populate it
The original and default configuration type, defines parameters for the operation of a channel
Defines a set of resource names, and their mapping to policies which restrict access to those resources
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
Which channel this config update is for
ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set
WriteSet lists the portion of the config which was written, this should included updated Versions
The type of config this update is intended for (usually a value from ConfigType enum) , must match the type in the Config message
Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data
A marshaled ConfigUpdate structure
Signatures over the config_update
ConfigValue represents an individual piece of config data
Used in:
Used in:
(message has no fields)
Consortium represents the consortium context in which the channel was created
Envelope wraps a Payload with a signature so that the message may be authenticated
Used as request type in: orderer.AtomicBroadcast.Broadcast, orderer.AtomicBroadcast.Deliver
Used as field type in:
,A marshaled Payload
A signature by the creator specified in the Payload header
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
Currently supported algorithms are: SHAKE256
Used in:
Used for messages which are signed but opaque
Used for messages which express the channel config
Used for transactions which update the channel config
Used by the SDK to submit endorser based transactions
Used internally by the orderer for management
Used as the type for Envelope messages submitted to instruct the Deliver API to seek
Used for packaging chaincode artifacts for install
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.
Used in:
Requires any of the sub-policies be satisfied, if no sub-policies exist, always returns true
Requires all of the sub-policies be satisfied
Requires a strict majority (greater than half) of the sub-policies be satisfied
LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
MSPPrincipal aims to represent an MSP-centric set of identities. In particular, this structure allows for definition of - a group of identities that are member of the same MSP - a group of identities that are member of the same organization unit in the same MSP - a group of identities that are administering a specific MSP - a specific identity Expressing these groups is done given two fields of the fields below - Classification, that defines the type of classification of identities in an MSP this principal would be defined on; Classification can take three values: (i) ByMSPRole: that represents a classification of identities within MSP based on one of the two pre-defined MSP rules, "member" and "admin" (ii) ByOrganizationUnit: that represents a classification of identities within MSP based on the organization unit an identity belongs to (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single identity/certificate; this would mean that the Principal bytes message
Used in:
Classification describes the way that one should process Principal. An Classification value of "ByOrganizationUnit" reflects that "Principal" contains the name of an organization this MSP handles. A Classification value "ByIdentity" means that "Principal" contains a specific identity. Default value denotes that Principal contains one of the groups by default supported by all MSPs ("admin" or "member").
Principal completes the policy principal definition. For the default principal types, Principal can be either "Admin" or "Member". For the ByOrganizationUnit/ByIdentity values of Classification, PolicyPrincipal acquires its value from an organization unit or identity, respectively.
Used in:
Represents the one of the dedicated MSP roles, the
one of a member of MSP network, and the one of an administrator of an MSP network
Denotes a finer grained (affiliation-based)
groupping of entities, per MSP affiliation E.g., this can well be represented by an MSP's Organization unit
Denotes a principal that consists of a single
MSPRole governs the organization of the Principal field of an MSPPrincipal when it aims to define one of the two dedicated roles within an MSP: Admin and Members.
MSPIdentifier represents the identifier of the MSP this principal refers to
MSPRoleType defines which of the available, pre-defined MSP-roles an identiy should posess inside the MSP with identifier MSPidentifier
Used in:
Represents an MSP Member
Represents an MSP Admin
Metadata is a common structure to be used to encode block metadata
Used in:
An encoded SignatureHeader
The signature over the concatenation of the Metadata value bytes, signatureHeader, and block header
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
OrganizationUnit governs the organization of the Principal field of a policy principal when a specific organization unity members are to be defined within a policy principal.
MSPIdentifier represents the identifier of the MSP this organization unit refers to
OrganizationUnitIdentifier defines the organizational unit under the MSP identified with MSPIdentifier
CertifiersIdentifier is the hash of certificates chain of trust related to this organizational unit
Payload is the message contents (and header to allow for signing)
Header is included to provide identity and prevent replay
Data, the encoding of which is defined by the type in the header
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
Used in:
For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType
Reserved to check for proper initialization
Creator of the message, specified as a certificate chain
Arbitrary number that may only be used once. Can be used to detect replay attacks.
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
Used in:
,Used in:
SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements
These status codes are intended to resemble selected HTTP status codes
Used in:
,