How many peers in the network need to endorse a transaction?
The number of peers required to endorse a transaction is driven by the endorsement policy that is specified at chaincode deployment time.
Does an application client need to connect to all peers?
Clients only need to connect to as many peers as are required by the endorsement policy for the chaincode.
How do I ensure data privacy?
There are various aspects to data privacy. First, you can segregate your network into channels, where each channel represents a subset of participants that are authorized to see the data for the chaincodes that are deployed to that channel.
Second, you can use private-data to keep ledger data private from other organizations on the channel. A private data collection allows a defined subset of organizations on a channel the ability to endorse, commit, or query private data without having to create a separate channel. Other participants on the channel receive only a hash of the data. For more information refer to the Using Private Data in Fabric tutorial. Note that the key concepts topic also explains when to use private data instead of a channel.
Third, as an alternative to Fabric hashing the data using private data, the client application can hash or encrypt the data before calling chaincode. If you hash the data then you will need to provide a means to share the source data. If you encrypt the data then you will need to provide a means to share the decryption keys.
Fourth, you can restrict data access to certain roles in your organization, by building access control into the chaincode logic.
Fifth, ledger data at rest can be encrypted via file system encryption on the peer, and data in-transit is encrypted via TLS.
Do the orderers see the transaction data?
No, the orderers only order transactions, they do not open the transactions. If you do not want the data to go through the orderers at all, then utilize the private data feature of Fabric. Alternatively, you can hash or encrypt the data in the client application before calling chaincode. If you encrypt the data then you will need to provide a means to share the decryption keys.
How do application clients know the outcome of a transaction?
The transaction simulation results are returned to the client by the endorser in the proposal response. If there are multiple endorsers, the client can check that the responses are all the same, and submit the results and endorsements for ordering and commitment. Ultimately the committing peers will validate or invalidate the transaction, and the client becomes aware of the outcome via an event, that the SDK makes available to the application client.
How do I query the ledger data?
Within chaincode you can query based on keys. Keys can be queried by range, and composite keys can be modeled to enable equivalence queries against multiple parameters. For example a composite key of (owner,asset_id) can be used to query all assets owned by a certain entity. These key-based queries can be used for read-only queries against the ledger, as well as in transactions that update the ledger.
If you model asset data as JSON in chaincode and use CouchDB as the state database, you can also perform complex rich queries against the chaincode data values, using the CouchDB JSON query language within chaincode. The application client can perform read-only queries, but these responses are not typically submitted as part of transactions to the ordering service.
How do I query the historical data to understand data provenance?
The chaincode API GetHistoryForKey() will return history of values for a key.
How to guarantee the query result is correct, especially when the peer being queried may be recovering and catching up on block processing?
The client can query multiple peers, compare their block heights, compare their query results, and favor the peers at the higher block heights.
Does Hyperledger Fabric support smart contract logic?
Yes. We call this feature Chaincode. It is our interpretation of the smart contract method/algorithm, with additional features.
A chaincode is programmatic code deployed on the network, where it is executed and validated by chain validators together during the consensus process. Developers can use chaincodes to develop business contracts, asset definitions, and collectively-managed decentralized applications.
How do I create a business contract?
There are generally two ways to develop business contracts: the first way is to code individual contracts into standalone instances of chaincode; the second way, and probably the more efficient way, is to use chaincode to create decentralized applications that manage the life cycle of one or multiple types of business contracts, and let end users instantiate instances of contracts within these applications.
How do I create assets?
Users can use chaincode (for business rules) and membership service (for digital tokens) to design assets, as well as the logic that manages them.
There are two popular approaches to defining assets in most blockchain solutions: the stateless UTXO model, where account balances are encoded into past transaction records; and the account model, where account balances are kept in state storage space on the ledger.
Each approach carries its own benefits and drawbacks. This blockchain technology does not advocate either one over the other. Instead, one of our first requirements was to ensure that both approaches can be easily implemented.
Which languages are supported for writing chaincode?
Chaincode can be written in any programming language and executed in containers. Currently, Golang, node.js and java chaincode are supported.
It is also possible to build Hyperledger Fabric applications using Hyperledger Composer.
Does the Hyperledger Fabric have native currency?
No. However, if you really need a native currency for your chain network, you can develop your own native currency with chaincode. One common attribute of native currency is that some amount will get transacted (the chaincode defining that currency will get called) every time a transaction is processed on its chain.
Where can I find what are the highlighted differences between releases?
The differences between any subsequent releases are provided together with the Releases.
Where to get help for the technical questions not answered above?
I have an ordering service up and running and want to switch consensus algorithms. How do I do that?
This is explicitly not supported.
What is the orderer system channel?
The orderer system channel (sometimes called ordering system channel) is the channel the orderer is initially bootstrapped with. It is used to orchestrate channel creation. The orderer system channel defines consortia and the initial configuration for new channels. At channel creation time, the organization definition in the consortium, the /Channel group's values and policies, as well as the /Channel/Orderer group's values and policies, are all combined to form the new initial channel definition.
If I update my application channel, should I update my orderer system channel?
Once an application channel is created, it is managed independently of any other channel (including the orderer system channel). Depending on the modification, the change may or may not be desirable to port to other channels. In general, MSP changes should be synchronized across all channels, while policy changes are more likely to be specific to a particular channel.
Can I have an organization act both in an ordering and application role?
Although this is possible, it is a highly discouraged configuration. By default the /Channel/Orderer/BlockValidation policy allows any valid certificate of the ordering organizations to sign blocks. If an organization is acting both in an ordering and application role, then this policy should be updated to restrict block signers to the subset of certificates authorized for ordering.
I want to write a consensus implementation for Fabric. Where do I begin?
A consensus plugin needs to implement the Consenter and Chain interfaces defined in the consensus package. There are two plugins built against these interfaces already: solo and kafka. You can study them to take cues for your own implementation. The ordering service code can be found under the orderer package.
I want to change my ordering service configurations, e.g. batch timeout, after I start the network, what should I do?
This falls under reconfiguring the network. Please consult the topic on configtxlator.
How can I deploy Solo in production?
Solo is not intended for production. It is not, and will never be, fault tolerant.
How do I remove a node from the ordering service?
Add the node's certificate to the relevant orderer's MSP CRL to prevent peers/clients from connecting to it.
Prevent the node from connecting to the Kafka cluster by leveraging standard Kafka access control measures such as TLS CRLs, or firewalling.
I have never deployed a Kafka/ZK cluster before, and I want to use the Kafka-based ordering service. How do I proceed?
The Hyperledger Fabric documentation assumes the reader generally has the operational expertise to setup, configure, and manage a Kafka cluster (see Caveat emptor). If you insist on proceeding without such expertise, you should complete, at a minimum, the first 6 steps of the Kafka Quickstart guide before experimenting with the Kafka-based ordering service. You can also consult this sample configuration file for a brief explanation of the sensible defaults for Kafka/ZooKeeper.
Where can I find a Docker composition for a network that uses the Kafka-based ordering service?
Consult the end-to-end CLI example.
Why is there a ZooKeeper dependency in the Kafka-based ordering service?
Kafka uses it internally for coordination between its brokers.
I'm trying to follow the BYFN example and get a "service unavailable" error, what should I do?
Check the ordering service's logs. A "Rejecting deliver request because of consenter error" log message is usually indicative of a connection problem with the Kafka cluster. Ensure that the Kafka cluster is set up properly, and is reachable by the ordering service's nodes.
When is a BFT version of the ordering service going to be available?
No date has been set. We are working towards a release during the 1.x cycle, i.e. it will come with a minor version upgrade in Fabric. Track FAB-33 for updates.