Protocol Documentation
Table of Contents
Top
msp/msp_principal.proto
CombinedPrincipal
CombinedPrincipal governs the organization of the Principal
field of a policy principal when principal_classification has
indicated that a combined form of principals is required
Field |
Type |
Label |
Description |
principals |
MSPPrincipal |
repeated |
Principals refer to combined principals |
MSPIdentityAnonymity
MSPIdentityAnonymity can be used to enforce an identity to be anonymous or nominal.
MSPPrincipal
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
Field |
Type |
Label |
Description |
principal_classification |
MSPPrincipal.Classification |
|
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 |
bytes |
|
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. For the Combined Classification type, the Principal is a marshalled CombinedPrincipal. |
MSPRole
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.
Field |
Type |
Label |
Description |
msp_identifier |
string |
|
MSPIdentifier represents the identifier of the MSP this principal refers to |
role |
MSPRole.MSPRoleType |
|
MSPRoleType defines which of the available, pre-defined MSP-roles an identiy should posess inside the MSP with identifier MSPidentifier |
OrganizationUnit
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.
Field |
Type |
Label |
Description |
msp_identifier |
string |
|
MSPIdentifier represents the identifier of the MSP this organization unit refers to |
organizational_unit_identifier |
string |
|
OrganizationUnitIdentifier defines the organizational unit under the MSP identified with MSPIdentifier |
certifiers_identifier |
bytes |
|
CertifiersIdentifier is the hash of certificates chain of trust related to this organizational unit |
MSPIdentityAnonymity.MSPIdentityAnonymityType
Name |
Number |
Description |
NOMINAL |
0 |
Represents a nominal MSP Identity |
ANONYMOUS |
1 |
Represents an anonymous MSP Identity |
MSPPrincipal.Classification
Name |
Number |
Description |
ROLE |
0 |
Represents the one of the dedicated MSP roles, the |
ORGANIZATION_UNIT |
1 |
one of a member of MSP network, and the one of an administrator of an MSP network |
Denotes a finer grained (affiliation-based) |
|
|
|
|
IDENTITY |
2 |
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 |
|
|
|
|
ANONYMITY |
3 |
identity |
Denotes a principal that can be used to enforce |
|
|
|
|
COMBINED |
4 |
an identity to be anonymous or nominal. |
Denotes a combined principal |
MSPRole.MSPRoleType
Name |
Number |
Description |
MEMBER |
0 |
Represents an MSP Member |
ADMIN |
1 |
Represents an MSP Admin |
CLIENT |
2 |
Represents an MSP Client |
PEER |
3 |
Represents an MSP Peer |
ORDERER |
4 |
Represents an MSP Orderer |
Top
common/policies.proto
ApplicationPolicy
ApplicationPolicy captures the diffenrent policy types that
are set and evaluted at the application level.
Field |
Type |
Label |
Description |
signature_policy |
SignaturePolicyEnvelope |
|
SignaturePolicy type is used if the policy is specified as a combination (using threshold gates) of signatures from MSP principals |
channel_config_policy_reference |
string |
|
ChannelConfigPolicyReference is used when the policy is specified as a string that references a policy defined in the configuration of the channel |
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.
Policy
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
Field |
Type |
Label |
Description |
type |
int32 |
|
For outside implementors, consider the first 1000 types reserved, otherwise one of PolicyType |
value |
bytes |
|
|
SignaturePolicy
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
SignaturePolicy.NOutOf
SignaturePolicyEnvelope
SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements
Name |
Number |
Description |
ANY |
0 |
Requires any of the sub-policies be satisfied, if no sub-policies exist, always returns true |
ALL |
1 |
Requires all of the sub-policies be satisfied |
MAJORITY |
2 |
Requires a strict majority (greater than half) of the sub-policies be satisfied |
Policy.PolicyType
Name |
Number |
Description |
UNKNOWN |
0 |
Reserved to check for proper initialization |
SIGNATURE |
1 |
|
MSP |
2 |
|
IMPLICIT_META |
3 |
|
Top
common/collection.proto
CollectionConfig
CollectionConfig defines the configuration of a collection object;
it currently contains a single, static type.
Dynamic collections are deferred.
CollectionConfigPackage
CollectionConfigPackage represents an array of CollectionConfig
messages; the extra struct is required because repeated oneof is
forbidden by the protobuf syntax
CollectionPolicyConfig
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.
Field |
Type |
Label |
Description |
signature_policy |
SignaturePolicyEnvelope |
|
Initially, only a signature policy is supported. |
Later, the SignaturePolicy will be replaced by a Policy. Policy policy = 1; A reference to a Policy is planned to be added later. string reference = 2; |
StaticCollectionConfig
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.
Field |
Type |
Label |
Description |
name |
string |
|
the name of the collection inside the denoted chaincode |
member_orgs_policy |
CollectionPolicyConfig |
|
a reference to a policy residing / managed in the config block to define which orgs have access to this collection’s private data |
required_peer_count |
int32 |
|
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. |
maximum_peer_count |
int32 |
|
The maximum number of peers that private data will be sent to upon endorsement. This number has to be bigger than required_peer_count. |
block_to_live |
uint64 |
|
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 |
member_only_read |
bool |
|
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) |
member_only_write |
bool |
|
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) |
endorsement_policy |
ApplicationPolicy |
|
a reference to a policy residing / managed in the config block to define the endorsement policy for this collection |
Top
common/common.proto
Block
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.
BlockData
Field |
Type |
Label |
Description |
data |
bytes |
repeated |
|
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
Field |
Type |
Label |
Description |
number |
uint64 |
|
The position in the blockchain |
previous_hash |
bytes |
|
The hash of the previous block header |
data_hash |
bytes |
|
The hash of the BlockData, by MerkleTree |
Field |
Type |
Label |
Description |
metadata |
bytes |
repeated |
|
Header is a generic replay prevention and identity message to include in a signed payload
Field |
Type |
Label |
Description |
type |
int32 |
|
Header types 0-10000 are reserved and defined by HeaderType |
version |
int32 |
|
Version indicates message protocol version |
timestamp |
google.protobuf.Timestamp |
|
Timestamp is the local time when the message was created by the sender |
channel_id |
string |
|
Identifier of the channel this message is bound for |
tx_id |
string |
|
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 |
epoch |
uint64 |
|
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 |
bytes |
|
Extension that may be attached based on the header type |
tls_cert_hash |
bytes |
|
If mutual TLS is employed, this represents the hash of the client's TLS certificate |
Envelope
Envelope wraps a Payload with a signature so that the message may be authenticated
Field |
Type |
Label |
Description |
payload |
bytes |
|
A marshaled Payload |
signature |
bytes |
|
A signature by the creator specified in the Payload header |
Field |
Type |
Label |
Description |
channel_header |
bytes |
|
|
signature_header |
bytes |
|
|
IdentifierHeader is used as an alternative to a SignatureHeader when the creator can be referenced by id
Field |
Type |
Label |
Description |
identifier |
uint32 |
|
A unique identifier that represents the creator of the message |
nonce |
bytes |
|
Arbitrary number that may only be used once. Can be used to detect replay attacks. |
LastConfig
LastConfig is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
Field |
Type |
Label |
Description |
index |
uint64 |
|
|
Metadata is a common structure to be used to encode block metadata
Field |
Type |
Label |
Description |
signature_header |
bytes |
|
An encoded SignatureHeader |
signature |
bytes |
|
The signature over the concatenation of the Metadata value bytes, signatureHeader, and block header |
identifier_header |
bytes |
|
An encoded IdentifierHeader. If the signature header is empty, this is used to identify the creator by id |
OrdererBlockMetadata defines metadata that is set by the ordering service.
Field |
Type |
Label |
Description |
last_config |
LastConfig |
|
|
consenter_metadata |
bytes |
|
|
Payload
Payload is the message contents (and header to allow for signing)
Field |
Type |
Label |
Description |
header |
Header |
|
Header is included to provide identity and prevent replay |
data |
bytes |
|
Data, the encoding of which is defined by the type in the header |
Field |
Type |
Label |
Description |
creator |
bytes |
|
Creator of the message, a marshaled msp.SerializedIdentity |
nonce |
bytes |
|
Arbitrary number that may only be used once. Can be used to detect replay attacks. |
This enum enlists indexes of the block metadata array
Name |
Number |
Description |
SIGNATURES |
0 |
Block metadata array position for block signatures |
LAST_CONFIG |
1 |
Block metadata array position to store last configuration block sequence number |
TRANSACTIONS_FILTER |
2 |
Block metadata array position to store serialized bit array filter of invalid transactions |
ORDERER |
3 |
Block metadata array position to store operational metadata for orderers |
COMMIT_HASH |
4 |
Block metadata array position to store the hash of TRANSACTIONS_FILTER, State Updates, and the COMMIT_HASH of the previous block |
Name |
Number |
Description |
MESSAGE |
0 |
Used for messages which are signed but opaque |
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 |
Was used internally by the orderer for management, no longer used since system channel was removed |
DELIVER_SEEK_INFO |
5 |
Used as the type for Envelope messages submitted to instruct the Deliver API to seek |
CHAINCODE_PACKAGE |
6 |
Used for packaging chaincode artifacts for install |
Status
These status codes are intended to resemble selected HTTP status codes
Name |
Number |
Description |
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 |
|
Top
common/configtx.proto
Config
Config represents the config for a particular channel
Field |
Type |
Label |
Description |
sequence |
uint64 |
|
|
channel_group |
ConfigGroup |
|
channel_group is a bad name for this, it should be changed to root when API breakage is allowed |
ConfigEnvelope
ConfigEnvelope is designed to contain all configuration for a chain with no dependency
on previous configuration transactions.
It is generated with the following scheme:
- Retrieve the existing configuration
- Note the config properties (ConfigValue, ConfigPolicy, ConfigGroup) to be modified
- Add any intermediate ConfigGroups to the ConfigUpdate.read_set (sparsely)
- Add any additional desired dependencies to ConfigUpdate.read_set (sparsely)
- 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
- 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)
- 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:
- All items in the read_set exist at the read versions
- 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
- The new configuration satisfies the ConfigSchema
Field |
Type |
Label |
Description |
config |
Config |
|
A marshaled Config structure |
last_update |
Envelope |
|
The last CONFIG_UPDATE message which generated this current configuration |
ConfigGroup
ConfigGroup is the hierarchical data structure for holding config
ConfigGroup.GroupsEntry
ConfigGroup.PoliciesEntry
ConfigGroup.ValuesEntry
ConfigPolicy
ConfigSignature
Field |
Type |
Label |
Description |
signature_header |
bytes |
|
A marshaled SignatureHeader |
signature |
bytes |
|
Signature over the concatenation signatureHeader bytes and config bytes |
ConfigUpdate
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:
- 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.
- Any elements in the write_set with the same version as the read_set are ignored.
- The corresponding mod_policy for every remaining element in the write_set is collected.
- Each policy is checked against the signatures from the ConfigUpdateEnvelope, any failing to verify are rejected
- The write_set is applied to the Config and the ConfigGroupSchema verifies that the updates were legal
Field |
Type |
Label |
Description |
channel_id |
string |
|
Which channel this config update is for |
read_set |
ConfigGroup |
|
ReadSet explicitly lists the portion of the config which was read, this should be sparse with only Version set |
write_set |
ConfigGroup |
|
WriteSet lists the portion of the config which was written, this should included updated Versions |
isolated_data |
ConfigUpdate.IsolatedDataEntry |
repeated |
Data which is not to be reflected in the resulting Config, but is still needed for some other purpose. For instance, rscc_seed_data |
ConfigUpdate.IsolatedDataEntry
ConfigUpdateEnvelope
Field |
Type |
Label |
Description |
config_update |
bytes |
|
A marshaled ConfigUpdate structure |
signatures |
ConfigSignature |
repeated |
Signatures over the config_update |
ConfigValue
ConfigValue represents an individual piece of config data
Top
common/configuration.proto
BlockDataHashingStructure
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
Field |
Type |
Label |
Description |
width |
uint32 |
|
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 |
Capabilities
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).
Capabilities.CapabilitiesEntry
Capability
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.
Consenter
Consenter represents a consenting node (i.e. replica).
Consortium
Consortium represents the consortium context in which the channel was created
Field |
Type |
Label |
Description |
name |
string |
|
|
HashingAlgorithm
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
Field |
Type |
Label |
Description |
name |
string |
|
SHA256 is currently the only supported and tested algorithm. |
OrdererAddresses
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
Field |
Type |
Label |
Description |
addresses |
string |
repeated |
|
Orderers
Orderers is encoded into the configuration transaction as a configuration item of type Chain
with a Key of "Orderers" and a Value of Orderers as marshaled protobuf bytes
Field |
Type |
Label |
Description |
consenter_mapping |
Consenter |
repeated |
|
Top
common/ledger.proto
BlockchainInfo
Contains information about the blockchain ledger such as height, current
block hash, and previous block hash.
Field |
Type |
Label |
Description |
height |
uint64 |
|
|
currentBlockHash |
bytes |
|
|
previousBlockHash |
bytes |
|
|
bootstrappingSnapshotInfo |
BootstrappingSnapshotInfo |
|
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
Contains information for the bootstrapping snapshot.
Field |
Type |
Label |
Description |
lastBlockInSnapshot |
uint64 |
|
|
Top
peer/policy.proto
ApplicationPolicy
ApplicationPolicy captures the diffenrent policy types that
are set and evaluted at the application level.
Field |
Type |
Label |
Description |
signature_policy |
common.SignaturePolicyEnvelope |
|
SignaturePolicy type is used if the policy is specified as a combination (using threshold gates) of signatures from MSP principals |
channel_config_policy_reference |
string |
|
ChannelConfigPolicyReference is used when the policy is specified as a string that references a policy defined in the configuration of the channel |
Top
peer/collection.proto
CollectionConfig
CollectionConfig defines the configuration of a collection object;
it currently contains a single, static type.
Dynamic collections are deferred.
CollectionConfigPackage
CollectionConfigPackage represents an array of CollectionConfig
messages; the extra struct is required because repeated oneof is
forbidden by the protobuf syntax
CollectionPolicyConfig
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.
Later, the SignaturePolicy will be replaced by a Policy. Policy policy = 1; A reference to a Policy is planned to be added later. string reference = 2; |
StaticCollectionConfig
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.
Field |
Type |
Label |
Description |
name |
string |
|
the name of the collection inside the denoted chaincode |
member_orgs_policy |
CollectionPolicyConfig |
|
a reference to a policy residing / managed in the config block to define which orgs have access to this collection’s private data |
required_peer_count |
int32 |
|
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. |
maximum_peer_count |
int32 |
|
The maximum number of peers that private data will be sent to upon endorsement. This number has to be bigger than required_peer_count. |
block_to_live |
uint64 |
|
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 |
member_only_read |
bool |
|
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) |
member_only_write |
bool |
|
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) |
endorsement_policy |
ApplicationPolicy |
|
a reference to a policy residing / managed in the config block to define the endorsement policy for this collection |
Top
gossip/message.proto
Acknowledgement
Field |
Type |
Label |
Description |
error |
string |
|
|
AliveMessage
AliveMessage is sent to inform remote peers
of a peer's existence and activity
Chaincode
Chaincode represents a Chaincode that is installed
on a peer
ConnEstablish
ConnEstablish is the message used for the gossip handshake
Whenever a peer connects to another peer, it handshakes
with it by sending this message that proves its identity
DataDigest
DataDigest is the message sent from the receiver peer
to the initator peer and contains the data items it has
Field |
Type |
Label |
Description |
nonce |
uint64 |
|
|
digests |
bytes |
repeated |
Maybe change this to bitmap later on |
msg_type |
PullMsgType |
|
|
DataMessage
DataMessage is the message that contains a block
Field |
Type |
Label |
Description |
payload |
Payload |
|
|
DataRequest
DataRequest is a message used for a peer to request
certain data blocks from a remote peer
DataUpdate
DataUpdate is the final message in the pull phase
sent from the receiver to the initiator
Empty
Empty is used for pinging and in tests
Envelope
Envelope contains a marshalled
GossipMessage and a signature over it.
It may also contain a SecretEnvelope
which is a marshalled Secret
GossipHello
GossipHello is the message that is used for the peer to initiate
a pull round with another peer
GossipMessage
GossipMessage defines the message sent in a gossip network
LeadershipMessage
Leadership Message is sent during leader election to inform
remote peers about intent of peer to proclaim itself as leader
Member
Member holds membership-related information
about a peer
MembershipRequest
MembershipRequest is used to ask membership information
from a remote peer
Field |
Type |
Label |
Description |
self_information |
Envelope |
|
|
known |
bytes |
repeated |
|
MembershipResponse
MembershipResponse is used for replying to MembershipRequests
Payload
Payload contains a block
Field |
Type |
Label |
Description |
seq_num |
uint64 |
|
|
data |
bytes |
|
|
private_data |
bytes |
repeated |
|
PeerIdentity
PeerIdentity defines the identity of the peer
Used to make other peers learn of the identity
of a certain peer
PeerTime
PeerTime defines the logical time of a peer's life
PrivateDataMessage
PrivateDataMessage message which includes private
data information to distributed once transaction
has been endorsed
PrivatePayload
PrivatePayload payload to encapsulate private
data with collection name to enable routing
based on collection partitioning
Properties
Field |
Type |
Label |
Description |
ledger_height |
uint64 |
|
|
left_channel |
bool |
|
|
chaincodes |
Chaincode |
repeated |
|
PvtDataDigest
PvtDataDigest defines a digest of private data
PvtDataElement
Field |
Type |
Label |
Description |
digest |
PvtDataDigest |
|
|
payload |
bytes |
repeated |
the payload is a marshaled kvrwset.KVRWSet |
PvtDataPayload
PvtPayload augments private rwset data and tx index
inside the block
Field |
Type |
Label |
Description |
tx_seq_in_block |
uint64 |
|
|
payload |
bytes |
|
Encodes marhslaed bytes of rwset.TxPvtReadWriteSet defined in rwset.proto |
RemotePvtDataRequest
RemotePrivateDataRequest message used to request
missing private rwset
RemotePvtDataResponse
RemotePrivateData message to response on private
data replication request
RemoteStateRequest
RemoteStateRequest is used to ask a set of blocks
from a remote peer
Field |
Type |
Label |
Description |
start_seq_num |
uint64 |
|
|
end_seq_num |
uint64 |
|
|
RemoteStateResponse
RemoteStateResponse is used to send a set of blocks
to a remote peer
Field |
Type |
Label |
Description |
payloads |
Payload |
repeated |
|
Secret
Secret is an entity that might be omitted
from an Envelope when the remote peer that is receiving
the Envelope shouldn't know the secret's content.
Field |
Type |
Label |
Description |
internalEndpoint |
string |
|
|
SecretEnvelope
SecretEnvelope is a marshalled Secret
and a signature over it.
The signature should be validated by the peer
that signed the Envelope the SecretEnvelope
came with
Field |
Type |
Label |
Description |
payload |
bytes |
|
|
signature |
bytes |
|
|
StateInfo
StateInfo is used for a peer to relay its state information
to other peers
Field |
Type |
Label |
Description |
timestamp |
PeerTime |
|
|
pki_id |
bytes |
|
|
channel_MAC |
bytes |
|
channel_MAC is an authentication code that proves that the peer that sent this message knows the name of the channel. |
properties |
Properties |
|
|
StateInfoPullRequest
StateInfoPullRequest is used to fetch a StateInfoSnapshot
from a remote peer
Field |
Type |
Label |
Description |
channel_MAC |
bytes |
|
channel_MAC is an authentication code that proves that the peer that sent this message knows the name of the channel. |
StateInfoSnapshot
StateInfoSnapshot is an aggregation of StateInfo messages
Field |
Type |
Label |
Description |
elements |
Envelope |
repeated |
|
GossipMessage.Tag
Name |
Number |
Description |
UNDEFINED |
0 |
|
EMPTY |
1 |
|
ORG_ONLY |
2 |
|
CHAN_ONLY |
3 |
|
CHAN_AND_ORG |
4 |
|
CHAN_OR_ORG |
5 |
|
PullMsgType
Name |
Number |
Description |
UNDEFINED |
0 |
|
BLOCK_MSG |
1 |
|
IDENTITY_MSG |
2 |
|
Gossip
Gossip
Method Name |
Request Type |
Response Type |
Description |
GossipStream |
Envelope stream |
Envelope stream |
GossipStream is the gRPC stream used for sending and receiving messages |
Ping |
Empty |
Empty |
Ping is used to probe a remote peer's aliveness |
Top
msp/msp_config.proto
FabricCryptoConfig
FabricCryptoConfig contains configuration parameters
for the cryptographic algorithms used by the MSP
this configuration refers to
Field |
Type |
Label |
Description |
signature_hash_family |
string |
|
SignatureHashFamily is a string representing the hash family to be used during sign and verify operations. Allowed values are "SHA2" and "SHA3". |
identity_identifier_hash_function |
string |
|
IdentityIdentifierHashFunction is a string representing the hash function to be used during the computation of the identity identifier of an MSP identity. Allowed values are "SHA256", "SHA384" and "SHA3_256", "SHA3_384". |
FabricMSPConfig
FabricMSPConfig collects all the configuration information for
a Fabric MSP.
Here we assume a default certificate validation policy, where
any certificate signed by any of the listed rootCA certs would
be considered as valid under this MSP.
This MSP may or may not come with a signing identity. If it does,
it can also issue signing identities. If it does not, it can only
be used to validate and verify certificates.
Field |
Type |
Label |
Description |
name |
string |
|
Name holds the identifier of the MSP; MSP identifier is chosen by the application that governs this MSP. For example, and assuming the default implementation of MSP, that is X.509-based and considers a single Issuer, this can refer to the Subject OU field or the Issuer OU field. |
root_certs |
bytes |
repeated |
List of root certificates trusted by this MSP they are used upon certificate validation (see comment for IntermediateCerts below) |
intermediate_certs |
bytes |
repeated |
List of intermediate certificates trusted by this MSP; they are used upon certificate validation as follows: validation attempts to build a path from the certificate to be validated (which is at one end of the path) and one of the certs in the RootCerts field (which is at the other end of the path). If the path is longer than 2, certificates in the middle are searched within the IntermediateCerts pool |
admins |
bytes |
repeated |
Identity denoting the administrator of this MSP |
revocation_list |
bytes |
repeated |
Identity revocation list |
signing_identity |
SigningIdentityInfo |
|
SigningIdentity holds information on the signing identity this peer is to use, and which is to be imported by the MSP defined before |
organizational_unit_identifiers |
FabricOUIdentifier |
repeated |
OrganizationalUnitIdentifiers holds one or more fabric organizational unit identifiers that belong to this MSP configuration |
crypto_config |
FabricCryptoConfig |
|
FabricCryptoConfig contains the configuration parameters for the cryptographic algorithms used by this MSP |
tls_root_certs |
bytes |
repeated |
List of TLS root certificates trusted by this MSP. They are returned by GetTLSRootCerts. |
tls_intermediate_certs |
bytes |
repeated |
List of TLS intermediate certificates trusted by this MSP; They are returned by GetTLSIntermediateCerts. |
fabric_node_ous |
FabricNodeOUs |
|
fabric_node_ous contains the configuration to distinguish clients from peers from orderers based on the OUs. |
FabricNodeOUs
FabricNodeOUs contains configuration to tell apart clients from peers from orderers
based on OUs. If NodeOUs recognition is enabled then an msp identity
that does not contain any of the specified OU will be considered invalid.
Field |
Type |
Label |
Description |
enable |
bool |
|
If true then an msp identity that does not contain any of the specified OU will be considered invalid. |
client_ou_identifier |
FabricOUIdentifier |
|
OU Identifier of the clients |
peer_ou_identifier |
FabricOUIdentifier |
|
OU Identifier of the peers |
admin_ou_identifier |
FabricOUIdentifier |
|
OU Identifier of the admins |
orderer_ou_identifier |
FabricOUIdentifier |
|
OU Identifier of the orderers |
FabricOUIdentifier
FabricOUIdentifier represents an organizational unit and
its related chain of trust identifier.
Field |
Type |
Label |
Description |
certificate |
bytes |
|
Certificate represents the second certificate in a certification chain. (Notice that the first certificate in a certification chain is supposed to be the certificate of an identity). It must correspond to the certificate of root or intermediate CA recognized by the MSP this message belongs to. Starting from this certificate, a certification chain is computed and bound to the OrganizationUnitIdentifier specified |
organizational_unit_identifier |
string |
|
OrganizationUnitIdentifier defines the organizational unit under the MSP identified with MSPIdentifier |
IdemixMSPConfig
IdemixMSPConfig collects all the configuration information for
an Idemix MSP.
Field |
Type |
Label |
Description |
name |
string |
|
Name holds the identifier of the MSP |
ipk |
bytes |
|
ipk represents the (serialized) issuer public key |
signer |
IdemixMSPSignerConfig |
|
signer may contain crypto material to configure a default signer |
revocation_pk |
bytes |
|
revocation_pk is the public key used for revocation of credentials |
epoch |
int64 |
|
epoch represents the current epoch (time interval) used for revocation |
IdemixMSPSignerConfig
IdemixMSPSIgnerConfig contains the crypto material to set up an idemix signing identity
Field |
Type |
Label |
Description |
cred |
bytes |
|
cred represents the serialized idemix credential of the default signer |
sk |
bytes |
|
sk is the secret key of the default signer, corresponding to credential Cred |
organizational_unit_identifier |
string |
|
organizational_unit_identifier defines the organizational unit the default signer is in |
role |
int32 |
|
role defines whether the default signer is admin, peer, member or client |
enrollment_id |
string |
|
enrollment_id contains the enrollment id of this signer |
credential_revocation_information |
bytes |
|
credential_revocation_information contains a serialized CredentialRevocationInformation |
KeyInfo
KeyInfo represents a (secret) key that is either already stored
in the bccsp/keystore or key material to be imported to the
bccsp key-store. In later versions it may contain also a
keystore identifier
Field |
Type |
Label |
Description |
key_identifier |
string |
|
Identifier of the key inside the default keystore; this for the case of Software BCCSP as well as the HSM BCCSP would be the SKI of the key |
key_material |
bytes |
|
KeyMaterial (optional) for the key to be imported; this is properly encoded key bytes, prefixed by the type of the key |
MSPConfig
MSPConfig collects all the configuration information for
an MSP. The Config field should be unmarshalled in a way
that depends on the Type
Field |
Type |
Label |
Description |
type |
int32 |
|
Type holds the type of the MSP; the default one would be of type FABRIC implementing an X.509 based provider |
config |
bytes |
|
Config is MSP dependent configuration info |
SigningIdentityInfo
SigningIdentityInfo represents the configuration information
related to the signing identity the peer is to use for generating
endorsements
Field |
Type |
Label |
Description |
public_signer |
bytes |
|
PublicSigner carries the public information of the signing identity. For an X.509 provider this would be represented by an X.509 certificate |
private_signer |
KeyInfo |
|
PrivateSigner denotes a reference to the private key of the peer's signing identity |
Top
peer/proposal_response.proto
ChaincodeCall
ChaincodeCall defines a call to a chaincode.
It may have collections that are related to the chaincode
Field |
Type |
Label |
Description |
name |
string |
|
|
collection_names |
string |
repeated |
|
no_private_reads |
bool |
|
Indicates we do not need to read from private data |
no_public_writes |
bool |
|
Indicates we do not need to write to the chaincode namespace |
key_policies |
common.SignaturePolicyEnvelope |
repeated |
The set of signature policies associated with states in the write-set that have state-based endorsement policies. |
disregard_namespace_policy |
bool |
|
Indicates we wish to ignore the namespace endorsement policy |
ChaincodeInterest
ChaincodeInterest defines an interest about an endorsement
for a specific single chaincode invocation.
Multiple chaincodes indicate chaincode to chaincode invocations.
Endorsement
An endorsement is a signature of an endorser over a proposal response. By
producing an endorsement message, an endorser implicitly "approves" that
proposal response and the actions contained therein. When enough
endorsements have been collected, a transaction can be generated out of a
set of proposal responses. Note that this message only contains an identity
and a signature but no signed payload. This is intentional because
endorsements are supposed to be collected in a transaction, and they are all
expected to endorse a single proposal response/action (many endorsements
over a single proposal response)
Field |
Type |
Label |
Description |
endorser |
bytes |
|
Identity of the endorser (e.g. its certificate) |
signature |
bytes |
|
Signature of the payload included in ProposalResponse concatenated with the endorser's certificate; ie, sign(ProposalResponse.payload + endorser) |
ProposalResponse
A ProposalResponse is returned from an endorser to the proposal submitter.
The idea is that this message contains the endorser's response to the
request of a client to perform an action over a chaincode (or more
generically on the ledger); the response might be success/error (conveyed in
the Response field) together with a description of the action and a
signature over it by that endorser. If a sufficient number of distinct
endorsers agree on the same action and produce signature to that effect, a
transaction can be generated and sent for ordering.
Field |
Type |
Label |
Description |
version |
int32 |
|
Version indicates message protocol version |
timestamp |
google.protobuf.Timestamp |
|
Timestamp is the time that the message was created as defined by the sender |
response |
Response |
|
A response message indicating whether the endorsement of the action was successful |
payload |
bytes |
|
The payload of response. It is the bytes of ProposalResponsePayload |
endorsement |
Endorsement |
|
The endorsement of the proposal, basically the endorser's signature over the payload |
interest |
ChaincodeInterest |
|
The chaincode interest derived from simulating the proposal. |
ProposalResponsePayload
ProposalResponsePayload is the payload of a proposal response. This message
is the "bridge" between the client's request and the endorser's action in
response to that request. Concretely, for chaincodes, it contains a hashed
representation of the proposal (proposalHash) and a representation of the
chaincode state changes and events inside the extension field.
Field |
Type |
Label |
Description |
proposal_hash |
bytes |
|
Hash of the proposal that triggered this response. The hash is used to link a response with its proposal, both for bookeeping purposes on an asynchronous system and for security reasons (accountability, non-repudiation). The hash usually covers the entire Proposal message (byte-by-byte). |
extension |
bytes |
|
Extension should be unmarshaled to a type-specific message. The type of the extension in any proposal response depends on the type of the proposal that the client selected when the proposal was initially sent out. In particular, this information is stored in the type field of a Header. For chaincode, it's a ChaincodeAction message |
Response
A response with a representation similar to an HTTP response that can
be used within another message.
Field |
Type |
Label |
Description |
status |
int32 |
|
A status code that should follow the HTTP status codes. |
message |
string |
|
A message associated with the response code. |
payload |
bytes |
|
A payload that can be used to include metadata with this response. |
Top
discovery/protocol.proto
AuthInfo
AuthInfo aggregates authentication information that the server uses
to authenticate the client
Field |
Type |
Label |
Description |
client_identity |
bytes |
|
This is the identity of the client that is used to verify the signature on the SignedRequest's payload. It is a msp.SerializedIdentity in bytes form |
client_tls_cert_hash |
bytes |
|
This is the hash of the client's TLS cert. When the network is running with TLS, clients that don't include a certificate will be denied access to the service. Since the Request is encapsulated with a SignedRequest (which is signed), this binds the TLS session to the enrollement identity of the client and therefore both authenticates the client to the server, and also prevents the server from relaying the request message to another server. |
ChaincodeQuery
ChaincodeQuery requests ChaincodeQueryResults for a given
list of chaincode invocations.
Each invocation is a separate one, and the endorsement policy
is evaluated independantly for each given interest.
ChaincodeQueryResult
ChaincodeQueryResult contains EndorsementDescriptors for
chaincodes
ConfigQuery
ConfigQuery requests a ConfigResult
ConfigResult
ConfigResult.MspsEntry
ConfigResult.OrderersEntry
EndorsementDescriptor
EndorsementDescriptor contains information about which peers can be used
to request endorsement from, such that the endorsement policy would be fulfilled.
Here is how to compute a set of peers to ask an endorsement from, given an EndorsementDescriptor:
Let e: G –> P be the endorsers_by_groups field that maps a group to a set of peers.
Note that applying e on a group g yields a set of peers.
1) Select a layout l: G –> N out of the layouts given.
l is the quantities_by_group field of a Layout, and it maps a group to an integer.
2) R = {} (an empty set of peers)
3) For each group g in the layout l, compute n = l(g)
3.1) Denote P_g as a set of n random peers {p0, p1, … p_n} selected from e(g)
3.2) R = R U P_g (add P_g to R)
4) The set of peers R is the peers the client needs to request endorsements from
Field |
Type |
Label |
Description |
chaincode |
string |
|
|
endorsers_by_groups |
EndorsementDescriptor.EndorsersByGroupsEntry |
repeated |
Specifies the endorsers, separated to groups. |
layouts |
Layout |
repeated |
Specifies options of fulfulling the endorsement policy. Each option lists the group names, and the amount of signatures needed from each group. |
EndorsementDescriptor.EndorsersByGroupsEntry
Endpoint
Endpoint is a combination of a host and a port
Endpoints
Endpoints is a list of Endpoint(s)
Field |
Type |
Label |
Description |
endpoint |
Endpoint |
repeated |
|
Error
Error denotes that something went wrong and contains the error message
Field |
Type |
Label |
Description |
content |
string |
|
|
Layout
Layout contains a mapping from a group name to number of peers
that are needed for fulfilling an endorsement policy
Field |
Type |
Label |
Description |
quantities_by_group |
Layout.QuantitiesByGroupEntry |
repeated |
Specifies how many non repeated signatures of each group are needed for endorsement |
Layout.QuantitiesByGroupEntry
LocalPeerQuery
LocalPeerQuery queries for peers in a non channel context
Peer
Peer contains information about the peer such as its channel specific
state, and membership information.
Field |
Type |
Label |
Description |
state_info |
gossip.Envelope |
|
This is an Envelope of a GossipMessage with a gossip.StateInfo message |
membership_info |
gossip.Envelope |
|
This is an Envelope of a GossipMessage with a gossip.AliveMessage message |
identity |
bytes |
|
This is the msp.SerializedIdentity of the peer, represented in bytes. |
PeerMembershipQuery
PeerMembershipQuery requests PeerMembershipResult.
The filter field may be optionally populated in order
for the peer membership to be filtered according to
chaincodes that are installed on peers and collection
access control policies.
PeerMembershipResult
PeerMembershipResult contains peers mapped by their organizations (MSP_ID)
PeerMembershipResult.PeersByOrgEntry
Peers
Peers contains a list of Peer(s)
Field |
Type |
Label |
Description |
peers |
Peer |
repeated |
|
Query
Query asks for information in the context of a specific channel
Field |
Type |
Label |
Description |
channel |
string |
|
|
config_query |
ConfigQuery |
|
ConfigQuery is used to query for the configuration of the channel, such as FabricMSPConfig, and rorderer endpoints. The client has to query a peer it trusts as it doesn't have means to self-verify the authenticity of the returned result. The result is returned in the form of ConfigResult. |
peer_query |
PeerMembershipQuery |
|
PeerMembershipQuery queries for peers in a channel context, and returns PeerMembershipResult |
cc_query |
ChaincodeQuery |
|
ChaincodeQuery queries for chaincodes by their name and version. An empty version means any version can by returned. |
local_peers |
LocalPeerQuery |
|
LocalPeerQuery queries for peers in a non channel context, and returns PeerMembershipResult |
QueryResult
QueryResult contains a result for a given Query.
The corresponding Query can be inferred by the index of the QueryResult from
its enclosing Response message.
QueryResults are ordered in the same order as the Queries are ordered in their enclosing Request.
Field |
Type |
Label |
Description |
error |
Error |
|
Error indicates failure or refusal to process the query |
config_result |
ConfigResult |
|
ConfigResult contains the configuration of the channel, such as FabricMSPConfig and orderer endpoints |
cc_query_res |
ChaincodeQueryResult |
|
ChaincodeQueryResult contains information about chaincodes, and their corresponding endorsers |
members |
PeerMembershipResult |
|
PeerMembershipResult contains information about peers, such as their identity, endpoints, and channel related state. |
Request
Request contains authentication info about the client that sent the request
and the queries it wishes to query the service
Field |
Type |
Label |
Description |
authentication |
AuthInfo |
|
authentication contains information that the service uses to check the client's eligibility for the queries. |
queries |
Query |
repeated |
queries |
Response
Field |
Type |
Label |
Description |
results |
QueryResult |
repeated |
The results are returned in the same order of the queries |
SignedRequest
SignedRequest contains a serialized Request in the payload field
and a signature.
The identity that is used to verify the signature
can be extracted from the authentication field of type AuthInfo
in the Request itself after deserializing it.
Field |
Type |
Label |
Description |
payload |
bytes |
|
|
signature |
bytes |
|
|
Discovery
Discovery defines a service that serves information about the fabric network
like which peers, orderers, chaincodes, etc.
Method Name |
Request Type |
Response Type |
Description |
Discover |
SignedRequest |
Response |
Discover receives a signed request, and returns a response. |
Top
peer/chaincode_event.proto
ChaincodeEvent
ChaincodeEvent is used for events and registrations that are specific to chaincode
string type - "chaincode"
Top
peer/chaincode.proto
CDSData
CDSData is data stored in the LSCC on instantiation of a CC
for CDSPackage. This needs to be serialized for ChaincodeData
hence the protobuf format
Field |
Type |
Label |
Description |
hash |
bytes |
|
hash of ChaincodeDeploymentSpec.code_package |
metadatahash |
bytes |
|
hash of ChaincodeID.name + ChaincodeID.version |
ChaincodeData
ChaincodeData defines the datastructure for chaincodes to be serialized by proto
Type provides an additional check by directing to use a specific package after instantiation
Data is Type specific (see CDSPackage and SignedCDSPackage)
Field |
Type |
Label |
Description |
name |
string |
|
Name of the chaincode |
version |
string |
|
Version of the chaincode |
escc |
string |
|
Escc for the chaincode instance |
vscc |
string |
|
Vscc for the chaincode instance |
policy |
common.SignaturePolicyEnvelope |
|
Policy endorsement policy for the chaincode instance |
data |
bytes |
|
Data data specific to the package |
id |
bytes |
|
Id of the chaincode that's the unique fingerprint for the CC This is not currently used anywhere but serves as a good eyecatcher |
instantiation_policy |
common.SignaturePolicyEnvelope |
|
InstantiationPolicy for the chaincode |
ChaincodeDeploymentSpec
Specify the deployment of a chaincode.
TODO: Define codePackage
.
ChaincodeID
ChaincodeID contains the path as specified by the deploy transaction
that created it as well as the hashCode that is generated by the
system for the path. From the user level (ie, CLI, REST API and so on)
deploy transaction is expected to provide the path and other requests
are expected to provide the hashCode. The other value will be ignored.
Internally, the structure could contain both values. For instance, the
hashCode will be set when first generated using the path
Field |
Type |
Label |
Description |
path |
string |
|
deploy transaction will use the path |
name |
string |
|
all other requests will use the name (really a hashcode) generated by the deploy transaction |
version |
string |
|
user friendly version name for the chaincode |
Carries the chaincode function and its arguments.
UnmarshalJSON in transaction.go converts the string-based REST/JSON input to
the []byte-based current ChaincodeInput structure.
Field |
Type |
Label |
Description |
args |
bytes |
repeated |
|
decorations |
ChaincodeInput.DecorationsEntry |
repeated |
|
is_init |
bool |
|
is_init is used for the application to signal that an invocation is to be routed to the legacy 'Init' function for compatibility with chaincodes which handled Init in the old way. New applications should manage their initialized state themselves. |
ChaincodeInput.DecorationsEntry
ChaincodeInvocationSpec
Carries the chaincode function and its arguments.
ChaincodeSpec
Carries the chaincode specification. This is the actual metadata required for
defining a chaincode.
LifecycleEvent
LifecycleEvent is used as the payload of the chaincode event emitted by LSCC
Field |
Type |
Label |
Description |
chaincode_name |
string |
|
|
ChaincodeSpec.Type
Name |
Number |
Description |
UNDEFINED |
0 |
|
GOLANG |
1 |
|
NODE |
2 |
|
CAR |
3 |
|
JAVA |
4 |
|
Top
peer/proposal.proto
ChaincodeAction
ChaincodeAction contains the executed chaincode results, response, and event.
Field |
Type |
Label |
Description |
results |
bytes |
|
This field contains the read set and the write set produced by the chaincode executing this invocation. |
events |
bytes |
|
This field contains the event generated by the chaincode. Only a single marshaled ChaincodeEvent is included. |
response |
Response |
|
This field contains the result of executing this invocation. |
chaincode_id |
ChaincodeID |
|
This field contains the ChaincodeID of executing this invocation. Endorser will set it with the ChaincodeID called by endorser while simulating proposal. Committer will validate the version matching with latest chaincode version. Adding ChaincodeID to keep version opens up the possibility of multiple ChaincodeAction per transaction. |
ChaincodeHeaderExtension is the Header's extentions message to be used when
the Header's type is CHAINCODE. This extensions is used to specify which
chaincode to invoke and what should appear on the ledger.
Field |
Type |
Label |
Description |
chaincode_id |
ChaincodeID |
|
The ID of the chaincode to target. |
ChaincodeProposalPayload
ChaincodeProposalPayload is the Proposal's payload message to be used when
the Header's type is CHAINCODE. It contains the arguments for this
invocation.
Field |
Type |
Label |
Description |
input |
bytes |
|
Input contains the arguments for this invocation. If this invocation deploys a new chaincode, ESCC/VSCC are part of this field. This is usually a marshaled ChaincodeInvocationSpec |
TransientMap |
ChaincodeProposalPayload.TransientMapEntry |
repeated |
TransientMap contains data (e.g. cryptographic material) that might be used to implement some form of application-level confidentiality. The contents of this field are supposed to always be omitted from the transaction and excluded from the ledger. |
ChaincodeProposalPayload.TransientMapEntry
Proposal
A Proposal is sent to an endorser for endorsement. The proposal contains:
- A header which should be unmarshaled to a Header message. Note that
Header is both the header of a Proposal and of a Transaction, in that i)
both headers should be unmarshaled to this message; and ii) it is used to
compute cryptographic hashes and signatures. The header has fields common
to all proposals/transactions. In addition it has a type field for
additional customization. An example of this is the ChaincodeHeaderExtension
message used to extend the Header for type CHAINCODE.
- A payload whose type depends on the header's type field.
- An extension whose type depends on the header's type field.
Let us see an example. For type CHAINCODE (see the Header message),
we have the following:
- The header is a Header message whose extensions field is a
ChaincodeHeaderExtension message.
- The payload is a ChaincodeProposalPayload message.
- The extension is a ChaincodeAction that might be used to ask the
endorsers to endorse a specific ChaincodeAction, thus emulating the
submitting peer model.
Field |
Type |
Label |
Description |
header |
bytes |
|
The header of the proposal. It is the bytes of the Header |
payload |
bytes |
|
The payload of the proposal as defined by the type in the proposal header. |
extension |
bytes |
|
Optional extensions to the proposal. Its content depends on the Header's type field. For the type CHAINCODE, it might be the bytes of a ChaincodeAction message. |
SignedProposal
This structure is necessary to sign the proposal which contains the header
and the payload. Without this structure, we would have to concatenate the
header and the payload to verify the signature, which could be expensive
with large payload
When an endorser receives a SignedProposal message, it should verify the
signature over the proposal bytes. This verification requires the following
steps:
- Verification of the validity of the certificate that was used to produce
the signature. The certificate will be available once proposalBytes has
been unmarshalled to a Proposal message, and Proposal.header has been
unmarshalled to a Header message. While this unmarshalling-before-verifying
might not be ideal, it is unavoidable because i) the signature needs to also
protect the signing certificate; ii) it is desirable that Header is created
once by the client and never changed (for the sake of accountability and
non-repudiation). Note also that it is actually impossible to conclusively
verify the validity of the certificate included in a Proposal, because the
proposal needs to first be endorsed and ordered with respect to certificate
expiration transactions. Still, it is useful to pre-filter expired
certificates at this stage.
- Verification that the certificate is trusted (signed by a trusted CA) and
that it is allowed to transact with us (with respect to some ACLs);
- Verification that the signature on proposalBytes is valid;
- Detect replay attacks;
Field |
Type |
Label |
Description |
proposal_bytes |
bytes |
|
The bytes of Proposal |
signature |
bytes |
|
Signaure over proposalBytes; this signature is to be verified against the creator identity contained in the header of the Proposal message marshaled as proposalBytes |
Top
peer/transaction.proto
ChaincodeActionPayload
ChaincodeActionPayload is the message to be used for the TransactionAction's
payload when the Header's type is set to CHAINCODE. It carries the
chaincodeProposalPayload and an endorsed action to apply to the ledger.
Field |
Type |
Label |
Description |
|
|
chaincode_proposal_payload |
bytes |
|
This field contains the bytes of the ChaincodeProposalPayload message from the original invocation (essentially the arguments) after the application of the visibility function. The main visibility modes are "full" (the entire ChaincodeProposalPayload message is included here), "hash" (only the hash of the ChaincodeProposalPayload message is included) or "nothing". This field will be used to check the consistency of ProposalResponsePayload.proposalHash. For the CHAINCODE type, ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader |
|
f(ChaincodeProposalPayload)) where f is the visibility function. |
action |
ChaincodeEndorsedAction |
|
The list of actions to apply to the ledger |
|
|
ChaincodeEndorsedAction
ChaincodeEndorsedAction carries information about the endorsement of a
specific proposal
Field |
Type |
Label |
Description |
proposal_response_payload |
bytes |
|
This is the bytes of the ProposalResponsePayload message signed by the endorsers. Recall that for the CHAINCODE type, the ProposalResponsePayload's extenstion field carries a ChaincodeAction |
endorsements |
Endorsement |
repeated |
The endorsement of the proposal, basically the endorser's signature over proposalResponsePayload |
ProcessedTransaction
ProcessedTransaction wraps an Envelope that includes a transaction along with an indication
of whether the transaction was validated or invalidated by committing peer.
The use case is that GetTransactionByID API needs to retrieve the transaction Envelope
from block storage, and return it to a client, and indicate whether the transaction
was validated or invalidated by committing peer. So that the originally submitted
transaction Envelope is not modified, the ProcessedTransaction wrapper is returned.
Field |
Type |
Label |
Description |
transactionEnvelope |
common.Envelope |
|
An Envelope which includes a processed transaction |
validationCode |
int32 |
|
An indication of whether the transaction was validated or invalidated by committing peer |
Transaction
The transaction to be sent to the ordering service. A transaction contains
one or more TransactionAction. Each TransactionAction binds a proposal to
potentially multiple actions. The transaction is atomic meaning that either
all actions in the transaction will be committed or none will. Note that
while a Transaction might include more than one Header, the Header.creator
field must be the same in each.
A single client is free to issue a number of independent Proposal, each with
their header (Header) and request payload (ChaincodeProposalPayload). Each
proposal is independently endorsed generating an action
(ProposalResponsePayload) with one signature per Endorser. Any number of
independent proposals (and their action) might be included in a transaction
to ensure that they are treated atomically.
Field |
Type |
Label |
Description |
actions |
TransactionAction |
repeated |
The payload is an array of TransactionAction. An array is necessary to accommodate multiple actions per transaction |
TransactionAction
TransactionAction binds a proposal to its action. The type field in the
header dictates the type of action to be applied to the ledger.
Field |
Type |
Label |
Description |
header |
bytes |
|
The header of the proposal action, which is the proposal header |
payload |
bytes |
|
The payload of the action as defined by the type in the header For chaincode, it's the bytes of ChaincodeActionPayload |
Reserved entries in the key-level metadata map
Name |
Number |
Description |
VALIDATION_PARAMETER |
0 |
|
VALIDATION_PARAMETER_V2 |
1 |
|
TxValidationCode
Name |
Number |
Description |
VALID |
0 |
|
NIL_ENVELOPE |
1 |
|
BAD_PAYLOAD |
2 |
|
BAD_COMMON_HEADER |
3 |
|
BAD_CREATOR_SIGNATURE |
4 |
|
INVALID_ENDORSER_TRANSACTION |
5 |
|
INVALID_CONFIG_TRANSACTION |
6 |
|
UNSUPPORTED_TX_PAYLOAD |
7 |
|
BAD_PROPOSAL_TXID |
8 |
|
DUPLICATE_TXID |
9 |
|
ENDORSEMENT_POLICY_FAILURE |
10 |
|
MVCC_READ_CONFLICT |
11 |
|
PHANTOM_READ_CONFLICT |
12 |
|
UNKNOWN_TX_TYPE |
13 |
|
TARGET_CHAIN_NOT_FOUND |
14 |
|
MARSHAL_TX_ERROR |
15 |
|
NIL_TXACTION |
16 |
|
EXPIRED_CHAINCODE |
17 |
|
CHAINCODE_VERSION_CONFLICT |
18 |
|
BAD_HEADER_EXTENSION |
19 |
|
BAD_CHANNEL_HEADER |
20 |
|
BAD_RESPONSE_PAYLOAD |
21 |
|
BAD_RWSET |
22 |
|
ILLEGAL_WRITESET |
23 |
|
INVALID_WRITESET |
24 |
|
INVALID_CHAINCODE |
25 |
|
NOT_VALIDATED |
254 |
|
INVALID_OTHER_REASON |
255 |
|
Top
orderer/ab.proto
BroadcastResponse
Field |
Type |
Label |
Description |
status |
common.Status |
|
Status code, which may be used to programatically respond to success/failure |
info |
string |
|
Info string which may contain additional information about the status returned |
DeliverResponse
SeekInfo
SeekInfo specifies the range of requested blocks to return
If the start position is not found, an error is immediately returned
Otherwise, blocks are returned until a missing block is encountered, then behavior is dictated
by the SeekBehavior specified.
SeekNewest
SeekNextCommit
SeekNextCommit refers to the next block that will be committed
SeekOldest
SeekPosition
SeekSpecified
Field |
Type |
Label |
Description |
number |
uint64 |
|
|
SeekInfo.SeekBehavior
If BLOCK_UNTIL_READY is specified, the reply will block until the requested blocks are available,
if FAIL_IF_NOT_READY is specified, the reply will return an error indicating that the block is not
found. To request that all blocks be returned indefinitely as they are created, behavior should be
set to BLOCK_UNTIL_READY and the stop should be set to specified with a number of MAX_UINT64
Name |
Number |
Description |
BLOCK_UNTIL_READY |
0 |
|
FAIL_IF_NOT_READY |
1 |
|
SeekInfo.SeekContentType
SeekContentType indicates what type of content to deliver in response to a request. If BLOCK is specified,
the orderer will stream blocks back to the peer. This is the default behavior. If HEADER_WITH_SIG is specified, the
orderer will stream only a the header and the signature, and the payload field will be set to nil. This allows
the requester to ascertain that the respective signed block exists in the orderer (or cluster of orderers).
Name |
Number |
Description |
BLOCK |
0 |
|
HEADER_WITH_SIG |
1 |
|
SeekInfo.SeekErrorResponse
SeekErrorTolerance indicates to the server how block provider errors should be tolerated. By default,
if the deliver service detects a problem in the underlying block source (typically, in the orderer,
a consenter error), it will begin to reject deliver requests. This is to prevent a client from waiting
for blocks from an orderer which is stuck in an errored state. This is almost always the desired behavior
and clients should stick with the default STRICT checking behavior. However, in some scenarios, particularly
when attempting to recover from a crash or other corruption, it's desirable to force an orderer to respond
with blocks on a best effort basis, even if the backing consensus implementation is in an errored state.
In this case, set the SeekErrorResponse to BEST_EFFORT to ignore the consenter errors.
Name |
Number |
Description |
STRICT |
0 |
|
BEST_EFFORT |
1 |
|
AtomicBroadcast
Method Name |
Request Type |
Response Type |
Description |
Broadcast |
.common.Envelope stream |
BroadcastResponse stream |
broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure |
Deliver |
.common.Envelope stream |
DeliverResponse stream |
deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received. |
Top
gateway/gateway.proto
ChaincodeEventsRequest
ChaincodeEventsRequest contains details of the chaincode events that the caller wants to receive.
Field |
Type |
Label |
Description |
channel_id |
string |
|
Identifier of the channel this request is bound for. |
chaincode_id |
string |
|
Name of the chaincode for which events are requested. |
identity |
bytes |
|
Client requestor identity. |
start_position |
orderer.SeekPosition |
|
Position within the ledger at which to start reading events. |
after_transaction_id |
string |
|
Only returns events after this transaction ID. Transactions up to and including this one should be ignored. This is used to allow resume of event listening from a certain position within a start block specified by start_position. |
ChaincodeEventsResponse
ChaincodeEventsResponse returns chaincode events emitted from a specific block.
Field |
Type |
Label |
Description |
events |
protos.ChaincodeEvent |
repeated |
Chaincode events emitted by the requested chaincode. The events are presented in the same order that the transactions that emitted them appear within the block. |
block_number |
uint64 |
|
Block number in which the chaincode events were emitted. |
CommitStatusRequest
CommitStatusRequest contains the details required to check whether a transaction has been
successfully committed.
Field |
Type |
Label |
Description |
transaction_id |
string |
|
Identifier of the transaction to check. |
channel_id |
string |
|
Identifier of the channel this request is bound for. |
identity |
bytes |
|
Client requestor identity. |
CommitStatusResponse
CommitStatusResponse returns the result of committing a transaction.
Field |
Type |
Label |
Description |
result |
protos.TxValidationCode |
|
The result of the transaction commit, as defined in peer/transaction.proto. |
block_number |
uint64 |
|
Block number that contains the transaction. |
EndorseRequest
EndorseRequest contains the details required to obtain sufficient endorsements for a
transaction to be committed to the ledger.
Field |
Type |
Label |
Description |
transaction_id |
string |
|
The unique identifier for the transaction. |
channel_id |
string |
|
Identifier of the channel this request is bound for. |
proposed_transaction |
protos.SignedProposal |
|
The signed proposal ready for endorsement. |
endorsing_organizations |
string |
repeated |
If targeting the peers of specific organizations (e.g. for private data scenarios), the list of organizations' MSPIDs should be supplied here. |
EndorseResponse
EndorseResponse returns the result of endorsing a transaction.
Field |
Type |
Label |
Description |
prepared_transaction |
common.Envelope |
|
The unsigned set of transaction responses from the endorsing peers for signing by the client before submitting to ordering service (via gateway). |
ErrorDetail
If any of the functions in the Gateway service returns an error, then it will be in the format of
a google.rpc.Status message. The 'details' field of this message will be populated with extra
information if the error is a result of one or more failed requests to remote peers or orderer nodes.
ErrorDetail contains details of errors that are received by any of the endorsing peers
as a result of processing the Evaluate or Endorse services, or from the ordering node(s) as a result of
processing the Submit service.
Field |
Type |
Label |
Description |
address |
string |
|
The address of the endorsing peer or ordering node that returned an error. |
msp_id |
string |
|
The MSP Identifier of this node. |
message |
string |
|
The error message returned by this node. |
EvaluateRequest
EvaluateRequest contains the details required to evaluate a transaction (query the ledger).
Field |
Type |
Label |
Description |
transaction_id |
string |
|
Identifier of the transaction to evaluate. |
channel_id |
string |
|
Identifier of the channel this request is bound for. |
proposed_transaction |
protos.SignedProposal |
|
The signed proposal ready for evaluation. |
target_organizations |
string |
repeated |
If targeting the peers of specific organizations (e.g. for private data scenarios), the list of organizations' MSPIDs should be supplied here. |
EvaluateResponse
EvaluateResponse returns the result of evaluating a transaction.
Field |
Type |
Label |
Description |
result |
protos.Response |
|
The response that is returned by the transaction function, as defined in peer/proposal_response.proto. |
PreparedTransaction
PreparedTransaction contains the details required for offline signing prior to submitting a transaction.
Field |
Type |
Label |
Description |
transaction_id |
string |
|
Identifier of the prepared transaction. |
envelope |
common.Envelope |
|
The transaction envelope. |
ProposedTransaction
ProposedTransaction contains the details required for offline signing prior to evaluating or endorsing
a transaction.
Field |
Type |
Label |
Description |
transaction_id |
string |
|
Identifier of the proposed transaction. |
proposal |
protos.SignedProposal |
|
The signed proposal. |
endorsing_organizations |
string |
repeated |
The list of endorsing organizations. |
SignedChaincodeEventsRequest
SignedChaincodeEventsRequest contains a serialized ChaincodeEventsRequest message, and a digital signature for the
serialized request message.
Field |
Type |
Label |
Description |
request |
bytes |
|
Serialized ChaincodeEventsRequest message. |
signature |
bytes |
|
Signature for request message. |
SignedCommitStatusRequest
SignedCommitStatusRequest contains a serialized CommitStatusRequest message, and a digital signature for the
serialized request message.
Field |
Type |
Label |
Description |
request |
bytes |
|
Serialized CommitStatusRequest message. |
signature |
bytes |
|
Signature for request message. |
SubmitRequest
SubmitRequest contains the details required to submit a transaction (update the ledger).
Field |
Type |
Label |
Description |
transaction_id |
string |
|
Identifier of the transaction to submit. |
channel_id |
string |
|
Identifier of the channel this request is bound for. |
prepared_transaction |
common.Envelope |
|
The signed set of endorsed transaction responses to submit. |
SubmitResponse
SubmitResponse returns the result of submitting a transaction.
Nothing yet
Gateway
The Gateway API for evaluating and submitting transactions via the gateway.
Transaction evaluation (query) requires the invocation of the Evaluate service
Transaction submission (ledger updates) is a two step process invoking Endorse
followed by Submit. A third step, invoking CommitStatus, is required if the
clients wish to wait for a Transaction to be committed.
The proposal and transaction must be signed by the client before each step.
Method Name |
Request Type |
Response Type |
Description |
Endorse |
EndorseRequest |
EndorseResponse |
The Endorse service passes a proposed transaction to the gateway in order to obtain sufficient endorsement. The gateway will determine the endorsement plan for the requested chaincode and forward to the appropriate peers for endorsement. It will return to the client a prepared transaction in the form of an Envelope message as defined in common/common.proto. The client must sign the contents of this envelope before invoking the Submit service. |
Submit |
SubmitRequest |
SubmitResponse |
The Submit service will process the prepared transaction returned from Endorse service once it has been signed by the client. It will wait for the transaction to be submitted to the ordering service but the client must invoke the CommitStatus service to wait for the transaction to be committed. |
CommitStatus |
SignedCommitStatusRequest |
CommitStatusResponse |
The CommitStatus service will indicate whether a prepared transaction previously submitted to the Submit service has been committed. It will wait for the commit to occur if it hasn’t already committed. |
Evaluate |
EvaluateRequest |
EvaluateResponse |
The Evaluate service passes a proposed transaction to the gateway in order to invoke the transaction function and return the result to the client. No ledger updates are made. The gateway will select an appropriate peer to query based on block height and load. |
ChaincodeEvents |
SignedChaincodeEventsRequest |
ChaincodeEventsResponse stream |
The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses are only returned for blocks that contain the requested events, while blocks not containing any of the requested events are skipped. |
Top
google/rpc/status.proto
Status
The Status
type defines a logical error model that is suitable for
different programming environments, including REST APIs and RPC APIs. It is
used by gRPC. Each Status
message contains
three pieces of data: error code, error message, and error details.
You can find out more about this error model and how to work with it in the
API Design Guide.
Field |
Type |
Label |
Description |
code |
int32 |
|
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code]. |
message |
string |
|
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client. |
details |
google.protobuf.Any |
repeated |
A list of messages that carry the error details. There is a common set of message types for APIs to use. |
Top
ledger/queryresult/kv_query_result.proto
KV
KV – QueryResult for range/execute query. Holds a key and corresponding value.
KeyModification
KeyModification – QueryResult for history query. Holds a transaction ID, value,
timestamp, and delete marker which resulted from a history query.
Top
ledger/rwset/kvrwset/kv_rwset.proto
HashedRWSet
HashedRWSet encapsulates hashed representation of a private read-write set for KV or Document data model
KVMetadataEntry
KVMetadataEntry captures a 'name'ed entry in the metadata of a key/key-hash.
KVMetadataWrite captures all the entries in the metadata associated with a key
KVMetadataWriteHash captures all the upserts to the metadata associated with a key hash
KVRWSet
KVRWSet encapsulates the read-write set for a chaincode that operates upon a KV or Document data model
This structure is used for both the public data and the private data
KVRead
KVRead captures a read operation performed during transaction simulation
A 'nil' version indicates a non-existing key read by the transaction
KVReadHash
KVReadHash is similar to the KVRead in spirit. However, it captures the hash of the key instead of the key itself
version is kept as is for now. However, if the version also needs to be privacy-protected, it would need to be the
hash of the version and hence of 'bytes' type
KVWrite
KVWrite captures a write (update/delete) operation performed during transaction simulation
KVWriteHash
KVWriteHash is similar to the KVWrite. It captures a write (update/delete) operation performed during transaction simulation
QueryReads
QueryReads encapsulates the KVReads for the items read by a transaction as a result of a query execution
Field |
Type |
Label |
Description |
kv_reads |
KVRead |
repeated |
|
QueryReadsMerkleSummary
QueryReadsMerkleSummary encapsulates the Merkle-tree hashes for the QueryReads
This allows to reduce the size of RWSet in the presence of query results
by storing certain hashes instead of actual results.
maxDegree field refers to the maximum number of children in the tree at any level
maxLevel field contains the lowest level which has lesser nodes than maxDegree (starting from leaf level)
Field |
Type |
Label |
Description |
max_degree |
uint32 |
|
|
max_level |
uint32 |
|
|
max_level_hashes |
bytes |
repeated |
|
RangeQueryInfo
RangeQueryInfo encapsulates the details of a range query performed by a transaction during simulation.
This helps protect transactions from phantom reads by varifying during validation whether any new items
got committed within the given range between transaction simuation and validation
(in addition to regular checks for updates/deletes of the existing items).
readInfo field contains either the KVReads (for the items read by the range query) or a merkle-tree hash
if the KVReads exceeds a pre-configured numbers
Version
Version encapsulates the version of a Key
A version of a committed key is maintained as the height of the transaction that committed the key.
The height is represenetd as a tuple <blockNum, txNum> where the txNum is the position of the transaction
(starting with 0) within block
Top
ledger/rwset/rwset.proto
CollectionHashedReadWriteSet
CollectionHashedReadWriteSet encapsulate the hashed representation for the private read-write set for a collection
Field |
Type |
Label |
Description |
collection_name |
string |
|
|
hashed_rwset |
bytes |
|
Data model specific serialized proto message (e.g., kvrwset.HashedRWSet for KV and Document data models) |
pvt_rwset_hash |
bytes |
|
Hash of entire private read-write set for a specific collection. This helps in authenticating the private read-write set efficiently |
CollectionPvtReadWriteSet
CollectionPvtReadWriteSet encapsulates the private read-write set for a collection
Field |
Type |
Label |
Description |
collection_name |
string |
|
|
rwset |
bytes |
|
Data model specific serialized proto message (e.g., kvrwset.KVRWSet for KV and Document data models) |
NsPvtReadWriteSet
NsPvtReadWriteSet encapsulates the private read-write set for a chaincode
NsReadWriteSet
NsReadWriteSet encapsulates the read-write set for a chaincode
Field |
Type |
Label |
Description |
namespace |
string |
|
|
rwset |
bytes |
|
Data model specific serialized proto message (e.g., kvrwset.KVRWSet for KV and Document data models) |
collection_hashed_rwset |
CollectionHashedReadWriteSet |
repeated |
|
TxPvtReadWriteSet
TxPvtReadWriteSet encapsulate the private read-write set for a transaction
TxReadWriteSet
TxReadWriteSet encapsulates a read-write set for a transaction
DataModel specifies the enum value of the data model
ns_rwset field specifies a list of chaincode specific read-write set (one for each chaincode)
TxReadWriteSet.DataModel
Name |
Number |
Description |
KV |
0 |
|
Top
msp/identities.proto
SerializedIdemixIdentity
This struct represents an Idemix Identity
to be used to serialize it and deserialize it.
The IdemixMSP will first serialize an idemix identity to bytes using
this proto, and then uses these bytes as id_bytes in SerializedIdentity
Field |
Type |
Label |
Description |
nym_x |
bytes |
|
nym_x is the X-component of the pseudonym elliptic curve point. It is a []byte representation of an amcl.BIG The pseudonym can be seen as a public key of the identity, it is used to verify signatures. |
nym_y |
bytes |
|
nym_y is the Y-component of the pseudonym elliptic curve point. It is a []byte representation of an amcl.BIG The pseudonym can be seen as a public key of the identity, it is used to verify signatures. |
ou |
bytes |
|
ou contains the organizational unit of the idemix identity |
role |
bytes |
|
role contains the role of this identity (e.g., ADMIN or MEMBER) |
proof |
bytes |
|
proof contains the cryptographic evidence that this identity is valid |
SerializedIdentity
This struct represents an Identity
(with its MSP identifier) to be used
to serialize it and deserialize it
Field |
Type |
Label |
Description |
mspid |
string |
|
The identifier of the associated membership service provider |
id_bytes |
bytes |
|
the Identity, serialized according to the rules of its MPS |
Top
orderer/blockattestation.proto
BlockAttestation
BlockAttestationResponse
BlockAttestations
Method Name |
Request Type |
Response Type |
Description |
BlockAttestations |
.common.Envelope |
BlockAttestationResponse stream |
BlockAttestations receives an Envelope of type DELIVER_SEEK_INFO , then sends back a stream of BlockAttestations. |
Top
orderer/cluster.proto
ConsensusRequest
ConsensusRequest is a consensus specific message sent to a cluster member.
StepRequest
StepRequest wraps a message that is sent to a cluster member.
Field |
Type |
Label |
Description |
consensus_request |
ConsensusRequest |
|
consensus_request is a consensus specific message. |
submit_request |
SubmitRequest |
|
submit_request is a relay of a transaction. |
StepResponse
StepResponse is a message received from a cluster member.
SubmitRequest
SubmitRequest wraps a transaction to be sent for ordering.
Field |
Type |
Label |
Description |
channel |
string |
|
|
last_validation_seq |
uint64 |
|
last_validation_seq denotes the last configuration sequence at which the sender validated this message. |
payload |
common.Envelope |
|
content is the fabric transaction that is forwarded to the cluster member. |
SubmitResponse
SubmitResponse returns a success
or failure status to the sender.
Field |
Type |
Label |
Description |
channel |
string |
|
|
status |
common.Status |
|
Status code, which may be used to programatically respond to success/failure. |
info |
string |
|
Info string which may contain additional information about the returned status. |
Cluster
Cluster defines communication between cluster members.
Method Name |
Request Type |
Response Type |
Description |
Step |
StepRequest stream |
StepResponse stream |
Step passes an implementation-specific message to another cluster member. |
Top
orderer/clusterserver.proto
ClusterNodeServiceStepRequest
ClusterNodeServiceStepRequest wraps a message that is sent to a cluster member.
Field |
Type |
Label |
Description |
node_conrequest |
NodeConsensusRequest |
|
node_conrequest is a consensus specific message between the cluster memebers. |
node_tranrequest |
NodeTransactionOrderRequest |
|
node_tranrequest is a relay of a transaction. |
node_authrequest |
NodeAuthRequest |
|
Auth authentiates the member that initiated the stream |
ClusterNodeServiceStepResponse
ClusterNodeServiceStepResponse is a message received from a cluster member.
NodeAuthRequest
NodeAuthRequest for authenticate the stream
between the cluster members
Field |
Type |
Label |
Description |
version |
uint32 |
|
version represents the fields on which the signature is computed |
signature |
bytes |
|
signature is verifiable using the initiator's public key |
timestamp |
google.protobuf.Timestamp |
|
timestamp indicates the freshness of the request; expected to be within the margin of the responsder's local time |
from_id |
uint64 |
|
from_id is the numerical identifier of the initiator of the connection |
to_id |
uint64 |
|
to_id is the numerical identifier of the node that is being connected to |
session_binding |
bytes |
|
session_binding is verifiable using application level protocol |
channel |
string |
|
|
NodeConsensusRequest
NodeConsensusRequest is a consensus specific message sent to a cluster member.
Field |
Type |
Label |
Description |
payload |
bytes |
|
|
metadata |
bytes |
|
|
NodeTransactionOrderRequest
NodeTransactionOrderRequest wraps a transaction to be sent for ordering.
Field |
Type |
Label |
Description |
last_validation_seq |
uint64 |
|
last_validation_seq denotes the last configuration sequence at which the sender validated this message. |
payload |
common.Envelope |
|
content is the fabric transaction that is forwarded to the cluster member. |
TransactionOrderResponse
TransactionOrderResponse returns a success
or failure status to the sender.
Field |
Type |
Label |
Description |
channel |
string |
|
|
tx_id |
string |
|
|
status |
common.Status |
|
Status code, which may be used to programatically respond to success/failure. |
info |
string |
|
Info string which may contain additional information about the returned status. |
ClusterNodeService
Service ClusterNodeService defines communication between cluster members.
Top
orderer/configuration.proto
BatchSize
Field |
Type |
Label |
Description |
max_message_count |
uint32 |
|
Simply specified as number of messages for now, in the future we may want to allow this to be specified by size in bytes |
absolute_max_bytes |
uint32 |
|
The byte count of the serialized messages in a batch cannot exceed this value. |
preferred_max_bytes |
uint32 |
|
The byte count of the serialized messages in a batch should not exceed this value. |
BatchTimeout
Field |
Type |
Label |
Description |
timeout |
string |
|
Any duration string parseable by ParseDuration(): https://golang.org/pkg/time/#ParseDuration |
ChannelRestrictions
ChannelRestrictions is the mssage which conveys restrictions on channel creation for an orderer
Field |
Type |
Label |
Description |
max_count |
uint64 |
|
The max count of channels to allow to be created, a value of 0 indicates no limit |
ConsensusType
Field |
Type |
Label |
Description |
type |
string |
|
The consensus type: "solo" or "etcdraft". |
metadata |
bytes |
|
Opaque metadata, dependent on the consensus type. |
state |
ConsensusType.State |
|
The state signals the ordering service to go into maintenance mode, typically for consensus-type migration. |
KafkaBrokers
Carries a list of bootstrap brokers, i.e. this is not the exclusive set of
brokers an ordering service
Field |
Type |
Label |
Description |
|
brokers |
string |
repeated |
Each broker here should be identified using the (IP |
host):port notation, e.g. 127.0.0.1:7050, or localhost:7050 are valid entries |
ConsensusType.State
State defines the orderer mode of operation, typically for consensus-type migration.
NORMAL is during normal operation, when consensus-type migration is not, and can not, take place.
MAINTENANCE is when the consensus-type can be changed.
Name |
Number |
Description |
STATE_NORMAL |
0 |
|
STATE_MAINTENANCE |
1 |
|
Top
orderer/etcdraft/configuration.proto
ConfigMetadata is serialized and set as the value of ConsensusType.Metadata in
a channel configuration when the ConsensusType.Type is set "etcdraft".
Consenter
Consenter represents a consenting node (i.e. replica).
Options
Options to be specified for all the etcd/raft nodes. These can be modified on a
per-channel basis.
Field |
Type |
Label |
Description |
tick_interval |
string |
|
time duration format, e.g. 500ms |
election_tick |
uint32 |
|
|
heartbeat_tick |
uint32 |
|
|
max_inflight_blocks |
uint32 |
|
|
snapshot_interval_size |
uint32 |
|
Take snapshot when cumulative data exceeds certain size in bytes. |
Top
BlockMetadata stores data used by the Raft OSNs when
coordinating with each other, to be serialized into
block meta dta field and used after failres and restarts.
Field |
Type |
Label |
Description |
consenter_ids |
uint64 |
repeated |
Maintains a mapping between the cluster's OSNs and their Raft IDs. |
next_consenter_id |
uint64 |
|
Carries the Raft ID value that will be assigned to the next OSN that will join this cluster. |
raft_index |
uint64 |
|
Index of etcd/raft entry for current block. |
ClusterMetadata encapsulates metadata that is exchanged among cluster nodes
Field |
Type |
Label |
Description |
active_nodes |
uint64 |
repeated |
Indicates active nodes in cluster that are reacheable by Raft leader |
Top
orderer/smartbft/configuration.proto
Options
Options to be specified for all the smartbft nodes. These can be modified on a
per-channel basis.
Options.Rotation
Name |
Number |
Description |
ROTATION_UNSPECIFIED |
0 |
|
ROTATION_OFF |
1 |
|
ROTATION_ON |
2 |
|
Top
peer/chaincode_shim.proto
ChaincodeMessage
DelState
DelState is the payload of a ChaincodeMessage. It contains a key which
needs to be recorded in the transaction's write set as a delete operation.
If the collection is specified, the key needs to be recorded in the
transaction's private write set as a delete operation.
GetHistoryForKey
GetHistoryForKey is the payload of a ChaincodeMessage. It contains a key
for which the historical values need to be retrieved.
Field |
Type |
Label |
Description |
key |
string |
|
|
GetQueryResult
GetQueryResult is the payload of a ChaincodeMessage. It contains a query
string in the form that is supported by the underlying state database.
If the collection is specified, the query needs to be executed on the
private data. The metadata hold the byte representation of QueryMetadata.
GetState
GetState is the payload of a ChaincodeMessage. It contains a key which
is to be fetched from the ledger. If the collection is specified, the key
would be fetched from the collection (i.e., private state)
GetStateByRange
GetStateByRange is the payload of a ChaincodeMessage. It contains a start key and
a end key required to execute range query. If the collection is specified,
the range query needs to be executed on the private data. The metadata hold
the byte representation of QueryMetadata.
PurgePrivateState
PutState
PutState is the payload of a ChaincodeMessage. It contains a key and value
which needs to be written to the transaction's write set. If the collection is
specified, the key and value would be written to the transaction's private
write set.
QueryMetadata is the metadata of a GetStateByRange and GetQueryResult.
It contains a pageSize which denotes the number of records to be fetched
and a bookmark.
Field |
Type |
Label |
Description |
pageSize |
int32 |
|
|
bookmark |
string |
|
|
QueryResponse
QueryResponse is returned by the peer as a result of a GetStateByRange,
GetQueryResult, and GetHistoryForKey. It holds a bunch of records in
results field, a flag to denote whether more results need to be fetched from
the peer in has_more field, transaction id in id field, and a QueryResponseMetadata
in metadata field.
QueryResponseMetadata is the metadata of a QueryResponse. It contains a count
which denotes the number of records fetched from the ledger and a bookmark.
Field |
Type |
Label |
Description |
fetched_records_count |
int32 |
|
|
bookmark |
string |
|
|
QueryResultBytes
QueryResultBytes hold the byte representation of a record returned by the peer.
Field |
Type |
Label |
Description |
resultBytes |
bytes |
|
|
QueryStateClose
Field |
Type |
Label |
Description |
id |
string |
|
|
QueryStateNext
Field |
Type |
Label |
Description |
id |
string |
|
|
Field |
Type |
Label |
Description |
metakey |
string |
|
|
value |
bytes |
|
|
ChaincodeMessage.Type
Name |
Number |
Description |
UNDEFINED |
0 |
|
REGISTER |
1 |
|
REGISTERED |
2 |
|
INIT |
3 |
|
READY |
4 |
|
TRANSACTION |
5 |
|
COMPLETED |
6 |
|
ERROR |
7 |
|
GET_STATE |
8 |
|
PUT_STATE |
9 |
|
DEL_STATE |
10 |
|
INVOKE_CHAINCODE |
11 |
|
RESPONSE |
13 |
|
GET_STATE_BY_RANGE |
14 |
|
GET_QUERY_RESULT |
15 |
|
QUERY_STATE_NEXT |
16 |
|
QUERY_STATE_CLOSE |
17 |
|
KEEPALIVE |
18 |
|
GET_HISTORY_FOR_KEY |
19 |
|
GET_STATE_METADATA |
20 |
|
PUT_STATE_METADATA |
21 |
|
GET_PRIVATE_DATA_HASH |
22 |
|
PURGE_PRIVATE_DATA |
23 |
|
Chaincode
Chaincode as a server - peer establishes a connection to the chaincode as a client
Currently only supports a stream connection.
ChaincodeSupport
Interface that provides support to chaincode execution. ChaincodeContext
provides the context necessary for the server to respond appropriately.
Top
peer/configuration.proto
ACLs
ACLs provides mappings for resources in a channel. APIResource encapsulates
reference to a policy used to determine ACL for the resource
ACLs.AclsEntry
APIResource
APIResource represents an API resource in the peer whose ACL
is determined by the policy_ref field
Field |
Type |
Label |
Description |
policy_ref |
string |
|
The policy name to use for this API |
AnchorPeer
AnchorPeer message structure which provides information about anchor peer, it includes host name,
port number and peer certificate.
Field |
Type |
Label |
Description |
host |
string |
|
DNS host name of the anchor peer |
port |
int32 |
|
The port number |
AnchorPeers
AnchorPeers simply represents list of anchor peers which is used in ConfigurationItem
Field |
Type |
Label |
Description |
anchor_peers |
AnchorPeer |
repeated |
|
Top
peer/events.proto
BlockAndPrivateData
BlockAndPrivateData contains Block and a map from tx_seq_in_block to rwset.TxPvtReadWriteSet
BlockAndPrivateData.PrivateDataMapEntry
DeliverResponse
DeliverResponse
FilteredBlock
FilteredBlock is a minimal set of information about a block
FilteredChaincodeAction
FilteredChaincodeAction is a minimal set of information about an action
within a transaction
FilteredTransaction
FilteredTransaction is a minimal set of information about a transaction
within a block
FilteredTransactionActions
FilteredTransactionActions is a wrapper for array of TransactionAction
message from regular block
Deliver
Method Name |
Request Type |
Response Type |
Description |
Deliver |
.common.Envelope stream |
DeliverResponse stream |
Deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message, then a stream of block replies is received |
DeliverFiltered |
.common.Envelope stream |
DeliverResponse stream |
DeliverFiltered first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message, then a stream of filtered block replies is received |
DeliverWithPrivateData |
.common.Envelope stream |
DeliverResponse stream |
DeliverWithPrivateData first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message, then a stream of block and private data replies is received |
Top
peer/lifecycle/chaincode_definition.proto
ChaincodeEndorsementInfo
ChaincodeEndorsementInfo is (most) everything the peer needs to know in order
to execute a chaincode
Field |
Type |
Label |
Description |
version |
string |
|
|
init_required |
bool |
|
|
endorsement_plugin |
string |
|
|
ChaincodeValidationInfo
ValidationInfo is (most) everything the peer needs to know in order
to validate a transaction
Field |
Type |
Label |
Description |
validation_plugin |
string |
|
|
validation_parameter |
bytes |
|
|
Top
peer/lifecycle/db.proto
StateData
StateData encodes a particular field of a datatype
StateMetadata describes the keys in a namespace. It is necessary because
in collections, range scans are not possible during transactions which
write. Therefore we must track the keys in our namespace ourselves.
Field |
Type |
Label |
Description |
datatype |
string |
|
|
fields |
string |
repeated |
|
Top
peer/lifecycle/lifecycle.proto
ApproveChaincodeDefinitionForMyOrgArgs is the message used as arguments to
_lifecycle.ApproveChaincodeDefinitionForMyOrg
.
ApproveChaincodeDefinitionForMyOrgResult is the message returned by
_lifecycle.ApproveChaincodeDefinitionForMyOrg
. Currently it returns
nothing, but may be extended in the future.
ChaincodeSource
ChaincodeSource.Local
Field |
Type |
Label |
Description |
package_id |
string |
|
|
ChaincodeSource.Unavailable
CheckCommitReadinessArgs
CheckCommitReadinessArgs is the message used as arguments to
_lifecycle.CheckCommitReadiness
.
CheckCommitReadinessResult
CheckCommitReadinessResult is the message returned by
_lifecycle.CheckCommitReadiness
. It returns a map of
orgs to their approval (true/false) for the definition
supplied as args. Additionally, it returns a map of
parameter mismatches between each organization's
approved definition and the definition supplied as args.
CheckCommitReadinessResult.ApprovalsEntry
Field |
Type |
Label |
Description |
key |
string |
|
|
value |
bool |
|
|
CheckCommitReadinessResult.Mismatches
Field |
Type |
Label |
Description |
items |
string |
repeated |
|
CheckCommitReadinessResult.MismatchesEntry
CommitChaincodeDefinitionArgs
CommitChaincodeDefinitionArgs is the message used as arguments to
_lifecycle.CommitChaincodeDefinition
.
CommitChaincodeDefinitionResult
CommitChaincodeDefinitionResult is the message returned by
_lifecycle.CommitChaincodeDefinition
. Currently it returns
nothing, but may be extended in the future.
GetInstalledChaincodePackageArgs
GetInstalledChaincodePackageArgs is the message used as the argument to
'_lifecycle.GetInstalledChaincodePackage'.
Field |
Type |
Label |
Description |
package_id |
string |
|
|
GetInstalledChaincodePackageResult
GetInstalledChaincodePackageResult is the message returned by
'_lifecycle.GetInstalledChaincodePackage'.
Field |
Type |
Label |
Description |
chaincode_install_package |
bytes |
|
|
InstallChaincodeArgs
InstallChaincodeArgs is the message used as the argument to
'_lifecycle.InstallChaincode'.
Field |
Type |
Label |
Description |
chaincode_install_package |
bytes |
|
This should be a marshaled lifecycle.ChaincodePackage |
InstallChaincodeResult
InstallChaincodeArgs is the message returned by
'_lifecycle.InstallChaincode'.
QueryApprovedChaincodeDefinitionArgs
QueryApprovedChaincodeDefinitionArgs is the message used as arguments to
_lifecycle.QueryApprovedChaincodeDefinition
.
Field |
Type |
Label |
Description |
name |
string |
|
|
sequence |
int64 |
|
|
QueryApprovedChaincodeDefinitionResult
QueryApprovedChaincodeDefinitionResult is the message returned by
_lifecycle.QueryApprovedChaincodeDefinition
.
QueryApprovedChaincodeDefinitionsArgs
QueryApprovedChaincodeDefinitionsArgs is the message used as arguments to
_lifecycle.QueryApprovedChaincodeDefinitions
.
QueryApprovedChaincodeDefinitionsResult
QueryApprovedChaincodeDefinitionsResult is the message returned by
_lifecycle.QueryApprovedChaincodeDefinitions
.
QueryApprovedChaincodeDefinitionsResult.ApprovedChaincodeDefinition
QueryChaincodeDefinitionArgs
QueryChaincodeDefinitionArgs is the message used as arguments to
_lifecycle.QueryChaincodeDefinition
.
Field |
Type |
Label |
Description |
name |
string |
|
|
QueryChaincodeDefinitionResult
QueryChaincodeDefinitionResult is the message returned by
_lifecycle.QueryChaincodeDefinition
.
QueryChaincodeDefinitionResult.ApprovalsEntry
Field |
Type |
Label |
Description |
key |
string |
|
|
value |
bool |
|
|
QueryChaincodeDefinitionsArgs
QueryChaincodeDefinitionsArgs is the message used as arguments to
_lifecycle.QueryChaincodeDefinitions
.
QueryChaincodeDefinitionsResult
QueryChaincodeDefinitionsResult is the message returned by
_lifecycle.QueryChaincodeDefinitions
.
QueryChaincodeDefinitionsResult.ChaincodeDefinition
QueryInstalledChaincodeArgs
QueryInstalledChaincodeArgs is the message used as arguments
'_lifecycle.QueryInstalledChaincode'
Field |
Type |
Label |
Description |
package_id |
string |
|
|
QueryInstalledChaincodeResult
QueryInstalledChaincodeResult is the message returned by
'_lifecycle.QueryInstalledChaincode'
QueryInstalledChaincodeResult.Chaincode
QueryInstalledChaincodeResult.References
QueryInstalledChaincodeResult.ReferencesEntry
QueryInstalledChaincodesArgs
QueryInstalledChaincodesArgs currently is an empty argument to
'_lifecycle.QueryInstalledChaincodes'. In the future, it may be
extended to have parameters.
QueryInstalledChaincodesResult
QueryInstalledChaincodesResult is the message returned by
'_lifecycle.QueryInstalledChaincodes'. It returns a list of installed
chaincodes, including a map of channel name to chaincode name and version
pairs of chaincode definitions that reference this chaincode package.
QueryInstalledChaincodesResult.Chaincode
QueryInstalledChaincodesResult.InstalledChaincode
QueryInstalledChaincodesResult.InstalledChaincode.ReferencesEntry
QueryInstalledChaincodesResult.References
Top
peer/peer.proto
Endorser
Top
peer/query.proto
ChaincodeInfo
ChaincodeInfo contains general information about an installed/instantiated
chaincode
Field |
Type |
Label |
Description |
|
|
|
|
name |
string |
|
|
|
|
|
|
version |
string |
|
|
|
|
|
|
path |
string |
|
the path as specified by the install/instantiate transaction |
|
|
|
|
input |
string |
|
the chaincode function upon instantiation and its arguments. This will be blank if the query is returning information about installed chaincodes. |
|
|
|
|
escc |
string |
|
the name of the ESCC for this chaincode. This will be blank if the query is returning information about installed chaincodes. |
|
|
|
|
vscc |
string |
|
the name of the VSCC for this chaincode. This will be blank if the query is returning information about installed chaincodes. |
|
|
|
|
id |
bytes |
|
the chaincode unique id. computed as: H( H(name |
|
version) |
|
H(CodePackage) ) |
ChaincodeQueryResponse
ChaincodeQueryResponse returns information about each chaincode that pertains
to a query in lscc.go, such as GetChaincodes (returns all chaincodes
instantiated on a channel), and GetInstalledChaincodes (returns all chaincodes
installed on a peer)
ChannelInfo
ChannelInfo contains general information about channels
Field |
Type |
Label |
Description |
channel_id |
string |
|
|
ChannelQueryResponse
ChannelQueryResponse returns information about each channel that pertains
to a query in lscc.go, such as GetChannels (returns all channels for a
given peer)
Field |
Type |
Label |
Description |
channels |
ChannelInfo |
repeated |
|
JoinBySnapshotStatus
JoinBySnapshotStatus contains information about whether or a JoinBySnapshot operation
is in progress and the related bootstrap dir if it is running.
Field |
Type |
Label |
Description |
in_progress |
bool |
|
|
bootstrapping_snapshot_dir |
string |
|
|
Top
peer/resources.proto
ChaincodeEndorsement
ChaincodeEndorsement instructs the peer how transactions should be endorsed. The only
endorsement mechanism which ships with the fabric today is the standard 'escc' mechanism.
This code simply simulates the proposal to generate a RW set, then signs the result
using the peer's local signing identity.
Field |
Type |
Label |
Description |
name |
string |
|
Specifies what code to run for endorsements, defaults 'escc' |
ChaincodeIdentifier
ChaincodeIdentifier identifies a piece of chaincode. For a peer to accept invocations of
this chaincode, the hash of the installed code must match, as must the version string
included with the install command.
Field |
Type |
Label |
Description |
hash |
bytes |
|
The hash of the chaincode bytes |
version |
string |
|
A user friendly human readable name corresponding to the ID |
ChaincodeValidation
ChaincodeValidation instructs the peer how transactions for this chaincode should be
validated. The only validation mechanism which ships with fabric today is the standard
'vscc' validation mechanism. This built in validation method utilizes an endorsement policy
which checks that a sufficient number of signatures have been included. The 'arguement'
field encodes any parameters required by the validation implementation.
Field |
Type |
Label |
Description |
name |
string |
|
Specifies which code to run to validate transactions, defaults to 'vscc' |
argument |
bytes |
|
When 'vscc' a marshaled VSCCArgs |
ConfigTree
ConfigTree encapsulates channel and resources configuration of a channel.
Both configurations are represented as common.Config
VSCCArgs
VSCCArgs is passed (marshaled) as a parameter to the VSCC imlementation via the
argument field of the ChaincodeValidation message.
Field |
Type |
Label |
Description |
endorsement_policy_ref |
string |
|
A named reference to an endorsement policy, |
Top
peer/signed_cc_dep_spec.proto
SignedChaincodeDeploymentSpec
SignedChaincodeDeploymentSpec carries the CDS along with endorsements
Field |
Type |
Label |
Description |
chaincode_deployment_spec |
bytes |
|
This is the bytes of the ChaincodeDeploymentSpec |
instantiation_policy |
bytes |
|
This is the instantiation policy which is identical in structure to endorsement policy. This policy is checked by the VSCC at commit time on the instantiation (all peers will get the same policy as it will be part of the LSCC instantation record and will be part of the hash as well) |
owner_endorsements |
Endorsement |
repeated |
The endorsements of the above deployment spec, the owner's signature over chaincode_deployment_spec and Endorsement.endorser. |
Top
peer/snapshot.proto
QueryPendingSnapshotsResponse
QueryPendingSnapshotsResponse specifies the response payload of a query pending snapshots request
Field |
Type |
Label |
Description |
block_numbers |
uint64 |
repeated |
|
SignedSnapshotRequest
SignedSnapshotRequest contains marshalled request bytes and signature
Field |
Type |
Label |
Description |
request |
bytes |
|
The bytes of SnapshotRequest or SnapshotQuery |
signature |
bytes |
|
Signaure over request bytes; this signature is to be verified against the client identity |
SnapshotQuery
SnapshotQuery contains information for a query snapshot request
Field |
Type |
Label |
Description |
signature_header |
common.SignatureHeader |
|
The signature header that contains creator identity and nonce |
channel_id |
string |
|
The channel ID |
SnapshotRequest
SnapshotRequest contains information for a generate/cancel snapshot request
Field |
Type |
Label |
Description |
signature_header |
common.SignatureHeader |
|
The signature header that contains creator identity and nonce |
channel_id |
string |
|
The channel ID |
block_number |
uint64 |
|
The block number to generate a snapshot |
Snapshot
Top
transientstore/transientstore.proto
TxPvtReadWriteSetWithConfigInfo
TxPvtReadWriteSetWithConfigInfo encapsulates the transaction's private
read-write set and additional information about the configurations such as
the latest collection config when the transaction is simulated
TxPvtReadWriteSetWithConfigInfo.CollectionConfigsEntry
Scalar Value Types
.proto Type |
Notes |
C++ |
Java |
Python |
Go |
C# |
PHP |
Ruby |
double |
|
double |
double |
float |
float64 |
double |
float |
Float |
float |
|
float |
float |
float |
float32 |
float |
float |
Float |
int32 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
int64 |
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
uint32 |
Uses variable-length encoding. |
uint32 |
int |
int/long |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
uint64 |
Uses variable-length encoding. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum or Fixnum (as required) |
sint32 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sint64 |
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
fixed32 |
Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
uint32 |
int |
int |
uint32 |
uint |
integer |
Bignum or Fixnum (as required) |
fixed64 |
Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
uint64 |
long |
int/long |
uint64 |
ulong |
integer/string |
Bignum |
sfixed32 |
Always four bytes. |
int32 |
int |
int |
int32 |
int |
integer |
Bignum or Fixnum (as required) |
sfixed64 |
Always eight bytes. |
int64 |
long |
int/long |
int64 |
long |
integer/string |
Bignum |
bool |
|
bool |
boolean |
boolean |
bool |
bool |
boolean |
TrueClass/FalseClass |
string |
A string must always contain UTF-8 encoded or 7-bit ASCII text. |
string |
String |
str/unicode |
string |
string |
string |
String (UTF-8) |
bytes |
May contain any arbitrary sequence of bytes. |
string |
ByteString |
str |
[]byte |
ByteString |
string |
String (ASCII-8BIT) |