问题
I've been working around hyperledger fabric for a while. I'm successful in install and form network of Fabric without using docker with 5 peers. Now I try to Setup Auditor and non-validationg peers within the network. I surf around ,but cannot find any clear document in this. Can anyone help?
回答1:
The notion of a validating peer is no longer existent in Hyperledger Fabric v1.x architecture(s). Every peer node is both a validating and committing peer; the distinction is between the roles of committing and endorsing. Endorsing peers will actually have chaincode installed on their filesystems and they will execute transactions to produce an "endorsement".
To further expand, ledgers only exist in the purview of channels. As such a peer will "subscribe" or "join" a channel, and by extension have a unique ledger that is specific to that channel. Therefore chaincode state is specific to an individual channel and is not shared across (it should be noted though that you can query chaincode on another channel and use the returned values as inputs for a transaction). That's a bit of a digression, but an important point nonetheless.
To answer your question wrt to an auditor, there are a few possibilities. 1. Orgs could share the appropriate certs, thus allowing access to their peer node(s). The auditor could then query ledger history on specific channels.
2. An auditor maintains a peer node on each channel that needs overview. The auditor would not act as an endorser for chaincode transactions, but as a result of being on the channel, would commit all transactions to its own ledger.
3. At the time of audit, the auditor joins the channel and receives the entire history of transactions. Once the inspection is complete, auditor is removed from the channel. ** This probably provides the most privacy, but can be tricky as chaincode versions evolve, along with key/vals and functions **
来源:https://stackoverflow.com/questions/43624431/hyperledger-fabric-how-to-set-up-auditor-in-non-permission-network-and-permissio