为什么每个 endoser peer 运行 一个带有 nodejs 链码的 ccenv 容器

Why every endoser peer run a ccenv container with nodejs chaincode

我们知道链码安装在每个 endoser peer 上,并且只在一个 endoser peer 上实例化。

1, so other peer will copy dev* image of chaincode and run it when needed?

此外,我发现,当使用 composer 来 deploy/upgrade 链码时,每个 endoser peer 都会 运行 一个 ccenv docker 容器,

2, just the ccenv to build the chaincode, why not just use one peer to build the image and copy to other peer?
3, the ccenv build the chaincode, will be included in install step or the instantiate step for more clear instruction?

因为我同时发现了太多的ccenv 运行,经常有一个失败。

Fabric 是一个分布式系统,因此期望 Peer 是 运行 作为独立组件,例如不在同一 docker 网络中的同一台机器上(这将不是有效的部署场景,只是一个开发场景)。这就是为什么每个节点都需要构建并且 运行 它是链代码容器的实例,你不能让一个节点构建链代码,因为其他节点在他们自己的环境中将无法访问它

Hyperledger Composer 将向通道上的所有对等点发送实例化请求,因此所有这些对等点在实例化时都会构建一个链代码版本,以便它可以 运行 实例化交易模拟。

ccenv 是包含构建链码所需组件的容器映像,它不用于 运行 链码。