2

When using an application which utilizes a hyperledger fabric network the application has an identity, e.g. a user identity. When invoking functions, it has to be send to and singed by all endorsing peers. The application needs to handle this whole process, so it has to have knowledge about the blockchain network/logic.

I think that this might not be a good design for an sdk. It would be better that the application connects to a peer and sends it invocation request to the connected peer. The peer then handles all the blockchain logic, including the endorsement and the sending to the orderer peer.

E.g. Tendermint does it like this. The interface between application and blockchain then becomes thin and easy to work with.

Is this also possible with hyperledger fabric sdk? E.g. assume there is an endorsement policy which states that two peers have to endorse a transaction. It is possible to communicate just whith one peer and let it automatically handle the whole transaction flow?

4

1 回答 1

1

在调用函数时,它必须被发送给所有背书节点并由其签名。应用程序需要处理整个过程,因此它必须了解区块链网络/逻辑。

是的,不幸的是,现在 - 应用程序需要在其中编写背书策略逻辑。另一个有问题的方面是它需要预先配置对等点的端点。

然而,时间不长!希望在 v1.2 或 v1.3 中,Fabric 将具有服务发现机制,在该机制中 Fabric SDK 将查询对等点以获取网络元数据信息,例如其他对等点在哪里运行,以及诸如“给定链码foo in channel bar之类的信息,我应该向哪些同行寻求认可?” 并且应用程序不必处理所有基础设施级别的知识,而只关注业务逻辑。

于 2017-12-29T09:15:25.367 回答