Get desktop application:
View/edit binary Protocol Buffers messages
Interface exported by the server.
Return the serve status.
deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled consenter.SeekInfo message, then a stream of block replies is received.
deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled consenter.SeekInfo message, then a stream of **filtered** block replies is received.
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 smart contract (or more generically on the ledger); the response might be success/error (conveyed in the SmartContractResponse 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.
Version indicates message protocol version
Timestamp is the time that the message was created as defined by the sender
A response message indicating whether the endorsement of the action was successful
The payload of response. It is the bytes of ProposalResponsePayload
The endorsement of the proposal, basically the endorser's signature over the payload
Interface exported by the events server
event chatting using Event
SignedEvent is used for any communication between consumer and producer
Signature over the event bytes
Marshal of Event object
Event is used by - consumers (adapters) to send Register - producer to advertise supported types and events
Register consumer sent event
producer events
Unregister consumer sent events
Creator of the event, specified as a certificate chain
Timestamp of the client - used to mitigate replay attacks
If mutual TLS is employed, this represents the hash of the client's TLS certificate
Interface that provides support to smartContract execution. SmartContractContext provides the context necessary for the server to respond appropriately.
event emitted by smartContract. Used only with Init or Invoke. This event is then stored (currently) with Block.NonHashData.TransactionResult
group id
APIResource represents an API resource in the peer whose ACL is determined by the policy_ref field
The policy name to use for this API
AnchorNode message structure which provides information about anchor node, it includes host name, port number and node certificate.
Used in:
DNS host name of the anchor node
The port number
AnchorNodes simply represents list of anchor nodes which is used in ConfigurationItem
Confidentiality Levels
DeliverResponse
Used as response type in: Deliver.Deliver, Deliver.DeliverFiltered
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)
Used in: , ,
Identity of the endorser (e.g. its certificate)
Signature of the payload included in ProposalResponse concatenated with the endorser's certificate; ie, sign(ProposalResponse.payload + endorser)
Used in:
FilteredBlock is sent by producers and contains minimal information about the block.
Used in: ,
The position in the blockchain
FilteredSmartContractAction is a minimal set of information about an action within a transaction.
Used in:
FilteredTransaction is a minimal set of information about a transaction within a block.
Used in:
FilteredTransactionActions is a wrapper for array of TransactionAction message from regular block
Used in:
ChannelInfo contains general information about channels
Used in:
ChannelQueryResponse returns information about each channel that pertains to a query in lscc.go, such as GetChannels (returns all channels for a given peer)
Used in: ,
Ideally we should just have the following oneof for different Reg types and get rid of EventType. But this is an API change Additional Reg types may add messages specific to their type to the oneof.
Used as request type in: Admin.GetModuleLogLevel, Admin.SetModuleLogLevel
Used as response type in: Admin.GetModuleLogLevel, Admin.SetModuleLogLevel
Used in:
ProcessedTransaction wraps an Envelope that includes a transaction along with an indication of whether the transaction was validated or invalidated by committing node. 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 node. So that the originally submitted transaction Envelope is not modified, the ProcessedTransaction wrapper is returned.
An Envelope which includes a processed transaction
An indication of whether the transaction was validated or invalidated by committing node
A Proposal is sent to an endorser for endorsement. The proposal contains: 1. 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 SmartContractHeaderExtension message used to extend the Header for type SmartContract. 2. A payload whose type depends on the header's type field. 3. An extension whose type depends on the header's type field. Let us see an example. For type SmartContract (see the Header message), we have the following: 1. The header is a Header message whose extensions field is a SmartContractHeaderExtension message. 2. The payload is a SmartContractProposalPayload message. 3. The extension is a SmartContractAction that might be used to ask the endorsers to endorse a specific SmartContractAction, thus emulating the submitting node model.
The header of the proposal. It is the bytes of the Header
The payload of the proposal as defined by the type in the proposal header.
Optional extensions to the proposal. Its content depends on the Header's type field. For the type SmartContract, it might be the bytes of a SmartContractAction message.
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 smart contracts, it contains a hashed representation of the proposal (proposalHash) and a representation of the smart contract state changes and events inside the extension field.
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). However this implies that the hash can only be verified if the entire proposal message is available when ProposalResponsePayload is included in a transaction or stored in the ledger. For confidentiality reasons, with smart contracts it might be undesirable to store the proposal payload in the ledger. If the type is smart contract, this is handled by separating the proposal's header and the payload: the header is always hashed in its entirety whereas the payload can either be hashed fully, or only its hash may be hashed, or nothing from the payload can be hashed. The PayloadVisibility field in the Header's extension controls to which extent the proposal payload is "visible" in the sense that was just explained.
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 smart contract, it's a SmartContractAction message
Used in:
---------- consumer events --------- Register is sent by consumers for registering events string type - "register"
Used in:
Rejection is sent by consumers for erroneous transaction rejection events string type - "rejection"
Used in:
A response with a representation similar to an HTTP response that can be used within another message.
Used in: ,
A status code that should follow the HTTP status codes.
A message associated with the response code.
A payload that can be used to include metadata with this response.
ConfigTree encapsulates Group and resources configuration of a Group. Both configurations are represented as common.Config
Used as response type in: Admin.GetStatus, Admin.StartServer
Used in:
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: 1. 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. 2. 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); 3. Verification that the signature on proposalBytes is valid; 4. Detect replay attacks;
Used as request type in: Endorser.ProcessProposal
Used as field type in:
The bytes of Proposal
Signaure over proposalBytes; this signature is to be verified against the creator identity contained in the header of the Proposal message marshaled as proposalBytes
SignedSmartContractDeploymentSpec carries the CDS along with endorsements
This is the bytes of the ChaincodeDeploymentSpec
This is the instantiation policy which is identical in structure to endorsement policy. This policy is checked by the VSSC 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)
The endorsements of the above deployment spec, the owner's signature over smartContract_deployment_spec and Endorsement.endorser.
This message is necessary to facilitate the verification of the signature (in the signature field) over the bytes of the transaction (in the transactionBytes field).
The bytes of the Transaction. NDD
Signature of the transactionBytes The public key of the signature is in the header field of TransactionAction There might be multiple TransactionAction, so multiple headers, but there should be same transactor identity (cert) in all headers
SmartContractAction contains the actions the events generated by the execution of the SmartContract.
This field contains the read set and the write set produced by the SmartContract executing this invocation.
This field contains the events generated by the SmartContract executing this invocation.
This field contains the result of executing this invocation.
This field contains the SmartContractID of executing this invocation. Endorser will set it with the SmartContractID called by endorser while simulating proposal. Committer will validate the version matching with latest SmartContract version. Adding SmartContractID to keep version opens up the possibility of multiple SmartContractAction per transaction.
SmartContractActionPayload is the message to be used for the TransactionAction's payload when the Header's type is set to SmartContract. It carries the SmartContractProposalPayload and an endorsed action to apply to the ledger.
This field contains the bytes of the SmartContractProposalPayload message from the original invocation (essentially the arguments) after the application of the visibility function. The main visibility modes are "full" (the entire SmartContractProposalPayload message is included here), "hash" (only the hash of the SmartContractProposalPayload message is included) or "nothing". This field will be used to check the consistency of ProposalResponsePayload.proposalHash. For the SmartContract type, ProposalResponsePayload.proposalHash is supposed to be H(ProposalHeader || f(SmartContractProposalPayload)) where f is the visibility function.
The list of actions to apply to the ledger
SmartContractData 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 specifc (see CDSPackage and SignedCDSPackage)
Specify the deployment of a SmartContract. TODO: Define `codePackage`.
Controls when the SmartContract becomes executable.
Used in:
SmartContractEndorsedAction carries information about the endorsement of a specific proposal
Used in:
This is the bytes of the ProposalResponsePayload message signed by the endorsers. Recall that for the SmartContract type, the ProposalResponsePayload's extenstion field carries a SmartContractAction
The endorsement of the proposal, basically the endorser's signature over proposalResponsePayload
SmartContractEndorsement 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.
Specifies what code to run for endorsements, defaults 'escc'
SmartContractEvent is used for events and registrations that are specific to smart contract string type - "Smart Contract"
Used in: , ,
SmartContractHeaderExtension is the Header's extentions message to be used when the Header's type is SmartContract. This extensions is used to specify which SmartContract to invoke and what should appear on the ledger.
The PayloadVisibility field controls to what extent the Proposal's payload (recall that for the type SmartContract, it is SmartContractProposalPayload message) field will be visible in the final transaction and in the ledger. Ideally, it would be configurable, supporting at least 3 main visibility modes: 1. all bytes of the payload are visible; 2. only a hash of the payload is visible; 3. nothing is visible. Notice that the visibility function may be potentially part of the ESCC. In that case it overrides PayloadVisibility field. Finally notice that this field impacts the content of ProposalResponsePayload.proposalHash.
The ID of the SmartContract to target.
SmartContractID 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
Used in: , ,
deploy transaction will use the path
all other requests will use the name (really a hashcode) generated by the deploy transaction
user friendly version name for the SmartContract
SmartContractIdentifier identifies a piece of SmartContract. For a peer to accept invocations of this SmartContract, the hash of the installed code must match, as must the version string included with the install command.
The hash of the SmartContract bytes
A user friendly human readable name corresponding to the ID
ChaincodeInfo contains general information about an installed/instantiated chaincode
Used in:
the path as specified by the install/instantiate transaction
the chaincode function upon instantiation and its arguments. This will be blank if the query is returning information about installed chaincodes.
the name of the ESCC for this chaincode. This will be blank if the query is returning information about installed chaincodes.
the name of the VSCC for this chaincode. This will be blank if the query is returning information about installed chaincodes.
the chaincode unique id. computed as: H( H(name || version) || H(CodePackage) )
Carries the SmartContract function and its arguments. UnmarshalJSON in transaction.go converts the string-based REST/JSON input to the []byte-based current SmartContractInput structure.
Used in:
Carries the SmartContract function and its arguments.
This field can contain a user-specified ID generation algorithm If supplied, this will be used to generate a ID If not supplied (left empty), sha256base64 will be used The algorithm consists of two parts: 1, a hash function 2, a decoding used to decode user (string) input to bytes Currently, SHA256 with BASE64 is supported (e.g. idGenerationAlg='sha256base64')
Used in:
SmartContractProposalPayload is the Proposal's payload message to be used when the Header's type is SmartContract. It contains the arguments for this invocation.
Input contains the arguments for this invocation. If this invocation deploys a new SmartContract, ESCC/VSCC are part of this field. This is usually a marshaled SmartContractInvocationSpec
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.
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)
SmartContractReg is used for registering smartcontract Interests when EventType is SMART_CONTRACT
Used in:
Carries the SmartContract specification. This is the actual metadata required for defining a SmartContract.
Used in: ,
Used in:
SmartContractValidation instructs the peer how transactions for this SmartContract should be validated. The only validation mechanism which ships with fabric today is the standard 'vssc' 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.
Specifies which code to run to validate transactions, defaults to 'vssc'
When 'vssc' a marshaled VSSCArgs
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 (SmartContractProposalPayload). 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.
Used in:
The payload is an array of TransactionAction. An array is necessary to accommodate multiple actions per transaction
TransactionAction binds a proposal to its action. The type field in the header dictates the type of action to be applied to the ledger.
Used in:
The header of the proposal action, which is the proposal header
The payload of the action as defined by the type in the header For SmartContract, it's the bytes of SmartContractActionPayload
Used in:
---------- producer events ---------
Used in:
VSSCArgs is passed (marshaled) as a parameter to the VSSC imlementation via the argument field of the SmartContractValidation message.
A named reference to an endorsement policy,