Add Codecov coverage reporting (#48)
Generate coverage.out from unit tests and upload it via codecov/codecov-action, with informational-only status checks matching fabric-x-evm.
Signed-off-by: Ry Jones ry@linux.com Signed-off-by: Arne arner@users.noreply.github.com Co-authored-by: Arne arner@users.noreply.github.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Fabric-X Client SDK
This SDK provides a modular set of building blocks that can be used to develop client applications, endorsers, and custom components for Fabric-X and Hyperledger Fabric 3.
Status
This preview version can be used for testing and prototypes. It does not provide the level of resilience you would need for production yet, and APIs will change without warning.
Prerequisites
Getting started
Then import whichever packages you need:
Run the unit tests:
To run the integration tests against a real Fabric-X network, see the integration package.
Components
fabrictestfake network is used. It can also be pointed to real networks.Notifiertracks specific transactions you submitted;AllTxStreamerdelivers a real-time feed of every committed transaction (optionally filtered by namespace or status).Receiving transaction events
There are three complementary mechanisms for receiving committed transaction data, each suited to a different need:
network.Synchronizernotification.Notifiernotification.AllTxStreamerAll three can be used independently and composed in the same application. Both
NotifierandAllTxStreamerare backed by the Fabric-X sidecar’s Notification Service and require no signer.For example, if you were building a block explorer, you would take the
network.Synchronizer, load it with anidentity.Signerand point to the committer sidecar. With help of theblocks.Processor, thefabric(x).Parserand a custom handler, you extract the information you want to store from the blocks that are coming in through the Synchronizer. Then you build your application around it.If you were building a chaincode endorser, you would use the same elements, as well as the
endorsement.ProposalBuilder, world state storage like the provided instate.VersionedDBwith astate.SimulationStoreon top. You might choose to expose the classic Fabric ProcessProposal API. To complete the picture, you could equip your client applications with an endorsement client fromnetwork.Peerand thenetwork.Submitter.For an end-to-end example endorser application, check out custom-endorser in the fabric-x-samples repo. It leans heavily on the code of this SDK.
Useful links
Contributing
Contributions are welcome. Please read CODE_OF_CONDUCT.md before opening a pull request.
License
Apache License 2.0 — see LICENSE.