Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Blockchain by (4.1k points)

I'm new to Hyperledger Fabric. Can any one tell me where the endorsing policy is stored in Hyperledger Fabric?

Thanks in advance

1 Answer

0 votes
by (14.4k points)

When an endorsement policy is specified or modified for a chaincode or smart contract within the context of a channel, it is stored in the configuration block for that channel by the orderer.

From the Hyperledger Fabric 1.1 documentation:

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

  • Verifies the channel_id and read_set. All elements in the read_set must exist at the given versions.
  • Computes the update set by collecting all elements in the write_set which do not appear at the same version in the read_set.
  • Verifies that each element in the update set increments the version number of the element update by exactly 1.
  • Verifies that the signature set attached to the ConfigUpdateEnvelope satisfies the mod_policy for each element in the update set.
  • Computes a new complete version of the config by applying the update set to the current config.
  • 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.
  • Writes the new ConfigEnvelope into an 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.
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...