gpt4 book ai didi

hyperledger-fabric - Endorsing 策略存储在哪里?

转载 作者:行者123 更新时间:2023-12-04 07:58:42 25 4
gpt4 key购买 nike

我是 Hyperledger Fabric 的新手。谁能告诉我背书政策存储在 Hyperledger Fabric 中的什么位置?

提前致谢

最佳答案

当您在 channel 上下文中为链代码指定(或修改)背书策略时,它存储在 configuration block 中订购者为该 channel 。

来自 Hyperledger Fabric 1.1 文档:

When the CONFIG_UPDATE is received, the orderer computes the resulting CONFIG by doing the following:

  1. Verifies the channel_id and read_set. All elements in the read_set must exist at the given versions.

  2. Computes the update set by collecting all elements in the write_set which do not appear at the same version in the read_set.

  3. Verifies that each element in the update set increments the version number of the element update by exactly 1.

  4. Verifies that the signature set attached to the ConfigUpdateEnvelope satisfies the mod_policy for each element in the update set.

  5. Computes a new complete version of the config by applying the update set to the current config.

  6. Writes the new config into a ConfigEnvelope which includes the CONFIG_UPDATE as the last_update field and the new config encoded in the config field, along with the incremented sequence value.

  7. Writes the new ConfigEnvelope into a Envelope of type CONFIG, and ultimately writes this as the sole transaction in a new configuration block.

When the peer (or any other receiver for Deliver) receives this configuration block, it should verify that the config was appropriately validated by applying the last_update message to the current config and verifying that the orderer-computed config field contains the correct new configuration.

关于hyperledger-fabric - Endorsing 策略存储在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50810855/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com