Refactor orderer broadcast (#25)
This change adopts the broadcast implementation pattern from fabric-x-committer that eliminates performance bottlenecks in transaction submission. The previous implementation had two critical issues: it used goroutines making Send() asynchronous, and it blocked waiting for orderer response status which significantly slowed down the system.
The new implementation maintains persistent gRPC streams that are reused across multiple sends, with a background goroutine continuously draining responses to prevent blocking. This fire-and-forget approach removes the need to wait for orderer acknowledgment, as the orderer’s acceptance doesn’t guarantee finality anyway. Streams are automatically recreated on failure, and the orderer lifecycle is now managed through context for proper cleanup.
Signed-off-by: Alessandro Sorniotti aso@zurich.ibm.com Signed-off-by: Arne Rutjes arne123@gmail.com Co-authored-by: Arne Rutjes arne123@gmail.com
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. Some components are designed to be compatible with classic Fabric as well for easy reuse.
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.
Components
fabrictestfake network is used. It can also be pointed to real networks.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 providedstate.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.