You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Hyperledger Composer 0.19:如何用composer network install重新部署BNA增量变更

Incremental BNA Deployment in Hyperledger Composer 0.19 (Replacing composer network update)

Got it, since composer network update was removed in Hyperledger Composer 0.19, you'll use a combination of composer network install and composer network upgrade to push incremental changes from your updated BNA file to the running network. Here's the detailed workflow:

Step 1: Prepare the Updated BNA

First, make sure your modified BNA file has an incremented version number (this is mandatory—Composer uses versioning to distinguish updates). For example, if your original BNA was my-network@1.0.0.bna, update the version in your package.json to 1.0.1 (or 1.1.0, depending on your change scope) and repackage the BNA.

Step 2: Install the Updated BNA on Peer Nodes

Use the composer network install command to push the new BNA to the peer nodes in your network. This makes the updated network definition available to the peers:

composer network install --card <your-admin-card> --archiveFile <path-to-updated-bna>
  • Replace <your-admin-card> with your network admin card name (e.g., admin@my-network).
  • Replace <path-to-updated-bna> with the file path of your new BNA (e.g., ./dist/my-network@1.0.1.bna).

Step 3: Upgrade the Running Network

Once the new BNA is installed, use composer network upgrade to switch the running network to the new version. This activates the updated business logic and model:

composer network upgrade --card <your-admin-card> --networkName <network-name> --networkVersion <new-version>
  • <network-name> is the name of your business network (matches the name field in your package.json).
  • <new-version> is the incremented version number of your updated BNA (e.g., 1.0.1).

Step 4: Verify the Update

Confirm the network is running the new version by pinging it:

composer network ping --card <your-admin-card>

Check the output for the Network Version field—it should match the version of your updated BNA.

Key Notes

  • Versioning is non-negotiable: You can't install a BNA with the same version as an existing one; always increment the version for changes.
  • Admin permissions: Ensure your admin card has the necessary network admin privileges to perform install and upgrade operations.
  • Data compatibility: If your update includes changes to asset/participant structures or transaction logic, test for data compatibility first to avoid breaking existing network data.

内容的提问来源于stack exchange,提问作者Uma Santharam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.26 09:06:23