使用configtxlator修改genesis块(Modifying the genesis block using configtxlator)

编程入门 行业动态 更新时间:2024-10-23 17:31:48
使用configtxlator修改genesis块(Modifying the genesis block using configtxlator)

关于如何在Fabric网络运行后修改系统通道配置,我有点困惑。

我认为configtxlator工具可用于创建具有必要更改的补丁事务,但此事务如何应用于系统通道? 可以使用peer channel update CLI工具吗?

I'm a little confused as to how to modify the system channel configuration once the Fabric network is operational.

I gather that the configtxlator tool can be used to create a patch transaction with the necessary changes, but how is this transaction then applied to the system channel? Can the peer channel update CLI tool be used for this?

最满意答案

您可以使用configtxlator工具找到有关重新配置通道的configtxlator方法。 基本上,高水平流程将是:

使用configtxlator将配置解码为json。 提取配置部分 创建新配置 编码新旧配置 发送它们以计算配置更新增量 解码配置更新并包装到信封中 生成新的配置事务 通过提交新配置更新频道。

以下是详细描述重新配置流程的官方文档的链接。

是的,您可以使用peer cli工具更新配置,如下所示:

peer channel update -f config_update_as_envelope.pb -c mychannel -o orderer:7050

You can find how-to tour on reconfiguring the channel with configtxlator tool. Basically the high level flow will be:

Decode the configuration into json using configtxlator. Extract config section Create new configuration Encode both new and old configs Send them to compute the config update delta Decode the config update and wrap up into envelope Produce new config transaction Update channel by submitting new config.

Here is the link for official docs describing reconfiguration flow in details.

And yes you can use peer cli tool to update the configuration as following:

peer channel update -f config_update_as_envelope.pb -c mychannel -o orderer:7050

更多推荐

本文发布于:2023-07-24 20:08:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1250567.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:genesis   configtxlator   block   Modifying

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!