8

In the build your first network documentation.
TwoOrgsOrdererGenesis: generates the genesis block for a Solo ordering service.
TwoOrgsChannel: generates the genesis block for our channel, mychannel.

The mychannel.tx is the genesis block in the channel and any peer who want to join the channel require this.

In the complete tutorial once the orderer genesis block is created it never used. And also Is there any other blockchain also present other than the channel ledger?

Does this orderer genesis block require for system channel?

Shubham Chadokar
  • 2,520
  • 1
  • 24
  • 45

4 Answers4

6

In the build your first network documentation.

Let me start from pointing to official documentation here

TwoOrgsOrdererGenesis: generates the genesis block for a Solo ordering service. TwoOrgsChannel: generates the genesis block for our channel, mychannel.

Here is the source of the confusion, in fact TwoOrgsChannel profile generates configuration transaction which is submitted to the system channel and it includes configuration required for formation of the new channel. Such as channel policies and members of the channel consortium which by the way have to be a subset of the consortium defined within genesis block of the system channel.

The mychannel.tx is the genesis block in the channel and any peer who want to join the channel require this.

This is config transaction to be submitted to the ordering service such that it will create a new channel and return genesis block for new channel so peers could use it to join it.

In the complete tutorial once the orderer genesis block is created it never used. And also Is there any other blockchain also present other than the channel ledger?

It's always used to bootstrap your ordering service nodes for example after shutdowns or restarts.

Does this orderer genesis block require for system channel?

In fact, system channel bootstrapped using this genesis block. Now to complete on @Narendranath Reddy answer, genesis block contains consortium information which he called a network definition, basically it contains all certificates of organizations root CAs. Therefore allowing to initialize channels MSPs and use those root CAs certificates to validate ACLs, endorsements and clients signatures.

Artem Barger
  • 40,769
  • 9
  • 59
  • 81
3

Good Questions thanks @Shubham Chadokar

Channel.tx is needed which contain channel policy information

while joining we will need the latest block which contains network configuration which is needed in order to join peers to channel.

SEE below detailed information

Statement1:

The mychannel.tx is the genesis block in the channel and any peer who want to join the channel require this.

Answer

Note: mychannel.tx is not the genesis block

I would like to highlight the difference between genesis.block mychannel.tx

  • genesis.block is a configuration of an HLF network (contains network definition)

  • mychannel.tx >>> initial binary configuration definition (contains sign-able channel definition)

ordering system channel: orderers maintain the long list of all organizations that are allowed to create channels. This list of organizations is known as the “consortium”, and the list itself is kept in the configuration of the “orderer system channel”.

Now the interesting part what is present inside mychannel.tx

  • mychannel.tx is a binary file
  • One can decode this file using protolator Commands:

Step1: GOTO fabricsamples/bin ./configtxlator start

Step2: GOTO mychannel.tx file location then issue below command

curl -X POST --data-binary @mychannel.tx http://127.0.0.1:7059/protolator/decode/common.Envelope > mychannel.json

The results of decoding the file mychannel.tx which is a common.Envelope produced by the configtxgen tool contains a common.ConfigUpdate object. This object has the name "config_update" within the "payload.data" JSON object.

This is the object that is needed as the source of the template to be used for creating new channels. The common.ConfigUpdate is the object that will be signed by all organizations and submitted to the orderer to create a new channel.

mychannel.tx contains read/write set of mychannel

Result:

{ "channel_id": "mychannel", "read_set": { "groups": { "Application": { "groups": { "Org1MSP": {} } } }, "values": { "Consortium": { "value": { "name": "SampleConsortium" } } } }, "write_set": { "groups": { "Application": { "groups": { "Org1MSP": {} }, "mod_policy": "Admins", "policies": { "Admins": { "policy": { "type": 3, "value": { "rule": "MAJORITY", "sub_policy": "Admins" } } }, "Readers": { "policy": { "type": 3, "value": { "sub_policy": "Readers" } } }, "Writers": { "policy": { "type": 3, "value": { "sub_policy": "Writers" } } } }, "version": "1" } }, "values": { "Consortium": { "value": { "name": "SampleConsortium" } } } } }


I have done the same for the genesis.block check this http://ideone.com/L1hcRX which contain genesis.block as json format which contain all network information.


Statement 2: the complete tutorial once the orderer genesis block is created it never used. And also Is there any other blockchain also present other than the channel ledger?

Answer

I hope now you have got sufficient information. genesis block main purpose is network configuration, once network is up and running we will not use again except you onboard new organization which contain orderer you can use old genesis.block later it will fetch latest configuration from other orderers.


Does this orderer genesis block require for system channel?


YES

Narendranath Reddy
  • 3,833
  • 3
  • 13
  • 32
  • Consider a new org join the network later at some point. What will be the scenario then? How does the orderer gets the info of the new org? – Shubham Chadokar Aug 23 '19 at 05:40
  • Hey, Orderer’s will be in sync since all will be in a cluster. Two scenarios: 1) New Org join without having Orderer 2) New org will join with Orderer. If a new org joins the existing consortium with Orderer then new Orderer will get all blocks and ledger through tipis if Kafka elder aft then leader will make sure to meet quorum. If new org joins without Orderer then new org can depends on any other organisation Orderer – Narendranath Reddy Aug 23 '19 at 05:49
  • Sorry, but your answer is not proper for this question. And orderer will not sync on its own. Just create a new org without order and try to create a channel it'll give not work. Join a new org to an existing channel is a different thing. – Shubham Chadokar Aug 23 '19 at 09:36
  • Hey, @Subham in hyperledger fabric consortium is the top level. When you create a network means, you are creating consortium. In order to create a channel new org must be part of consortium. The only way to add new org to the consortium is you need to update the channel. Once you update the channel with new org doesn't care weather you have order or not you are part of consortium you can create a channel. Note: If channel policy has MAJORITY Admins >>> This is another scenario – Narendranath Reddy Aug 23 '19 at 09:40
  • The terminology here can be confusing because the Fabric docs are not completely consistent. Some docs use 'genesis block' to mean only the orderer genesis block, while others use 'genesis block' to describe the channel creation transaction - technically this is also a genesis block. – RichVel Mar 26 '21 at 10:42
0

Orderer genesis block is the genesis block for the system channel as it is the basic configuration block for the network. It a special channel managed by the orderer admins which includes a list of the organizations permitted to create channels.

The genesis block of the orderer system channel is special: it must be created and included in the configuration of the node before the node can be started.

Trinayan
  • 867
  • 6
  • 15
  • Adding some info: **ordering system channel**: orderers maintain the long list of all organizations that are allowed to create channels. This list of organizations is known as the “consortium”, and the list itself is kept in the configuration of the “orderer system channel”. – Narendranath Reddy Aug 19 '19 at 19:18
0

Most importantly, the ordering system channel contains the crypto material that defines an organizations in a consortium: the root certificates and the admin certificates. They allow organizations to join new channels without supplying new crypto material each time.

Nikhil Gupta
  • 191
  • 5