hyperledger fabric:一个通道内的节点之间的读取查询和通信

hyperledger fabric: read query and communicating amoung peers within a channel

我知道读取查询是一个链代码调用,它读取分类帐的当前状态但不写入分类帐。 客户端应用程序可以选择提交只读事务以进行排序、验证和提交(用于审计目的)

问题:

  1. 是否可以在不通过链代码的情况下读取分类帐数据库? 是什么阻止频道上的某人在不使用合同的情况下直接读取 CouchDB(假设使用的是底层数据库)并避免记录读取

  2. 从根本上说,我们在 fabric 中使用异步通信。启动交易的节点仅与对等方同步对话,在启动排序服务后,将在所有验证检查后将 txn 提交到账本..

以下可能吗? 节点A提交数据到账本请求操作->需要节点B来完成。

节点A通知B查看账本并执行操作,B完成后通知A查看更新后的账本是否可行?

Is it possible to read the ledger db without going via the chaincode ? What prevents someone on channel from directly reading CouchDB (assuming that is the underlying DB used) without using contracts and avoiding recording of reads

如果您有权访问数据库本身,没有什么能阻止您这样做。 但是,客户端通常无权访问数据库,因此对等方(通过链代码)可以对哪些客户端和哪些数据可以读取执行选择性逻辑。 想想应用服务器、servlet 容器等。 从浏览器浏览的用户无权访问应用程序服务器使用的数据库,对吗? 这里也发生了类似的事情。

Fundamentally, we use an async communication in fabric. The node initiating transaction talks only with the peers synchronously and after that ordering service is initiated which will commit the txn to ledger after all verification check..

严格来说,排序服务不会将交易提交到账本,因为排序服务没有账本。它将交易打包成块,然后将块发送给对等方。然后是对等节点验证该块并将其提交到他们自己的分类帐中。

Is this possible for node A to notify B to check ledger and perform operation and B upon completion notify A to check the updated ledger ?

您需要客户端 SDK 来协调所有这些。仅在客户端请求的上下文中使用 运行 用户链码。 因此,您可以让客户端执行提交交易的操作,然后客户端发送另一笔交易,其中链码检查当前分类帐等。