Clyde D'Cruz
Clyde D'Cruz

Reputation: 2065

Can you start up an orderer, without peer organisations?

Can an orderer be bootstrapped without any knowledge of organizations that will later be part of the consortium ?

The fabric samples usually have some consortiums defined in the configtx.yaml.

Can the orderer general genesis block be created with ONLY knowledge of the orderer organization? Will this allow organizations to be added later ?

Upvotes: 0

Views: 57

Answers (2)

Yadhukrishna
Yadhukrishna

Reputation: 842

Yes, Orderer Genesis Block has a System Channel configured usually called testchainid by default, and all the consortium and organizations in them is part of this channel config block.

The typical structure of the system channel config looks like

&ConfigGroup{
    Groups: map<string, *ConfigGroup> {
        "Application":&ConfigGroup{
            Groups:map<String, *ConfigGroup> {
                {{org_name}}:&ConfigGroup{
                    Values:map<string, *ConfigValue>{
                        "MSP":msp.MSPConfig,
                        "AnchorPeers":peer.AnchorPeers,
                    },
                },
            },
        },
        "Orderer":&ConfigGroup{
            Groups:map<String, *ConfigGroup> {
                {{org_name}}:&ConfigGroup{
                    Values:map<string, *ConfigValue>{
                        "MSP":msp.MSPConfig,
                    },
                },
            },

            Values:map<string, *ConfigValue> {
                "ConsensusType":orderer.ConsensusType,
                "BatchSize":orderer.BatchSize,
                "BatchTimeout":orderer.BatchTimeout,
                "KafkaBrokers":orderer.KafkaBrokers,
            },
        },
        "Consortiums":&ConfigGroup{
            Groups:map<String, *ConfigGroup> {
                {{consortium_name}}:&ConfigGroup{
                    Groups:map<string, *ConfigGroup> {
                        {{org_name}}:&ConfigGroup{
                            Values:map<string, *ConfigValue>{
                                "MSP":msp.MSPConfig,
                            },
                        },
                    },
                    Values:map<string, *ConfigValue> {
                        "ChannelCreationPolicy":common.Policy,
                    }
                },
            },
        },
    },

    Values: map<string, *ConfigValue> {
        "HashingAlgorithm":common.HashingAlgorithm,
        "BlockHashingDataStructure":common.BlockDataHashingStructure,
        "Consortium":common.Consortium,
        "OrdererAddresses":common.OrdererAddresses,
    },
}

Notice "Consortiums":&ConfigGroup{... in it, This is the Config Group where you would be required to add the MSP of the new organization that you want to add to the consortium.

The process of adding the org to the consortium is similar to that of adding org to a channel except you're adding the org to system channel.

Another Sidenote: You don't require the signature of the existing orgs in the consortium to add a new org, Orderer can do it alone.

Upvotes: 0

Dave Enyeart
Dave Enyeart

Reputation: 2573

Yes, you can add peer organizations after initial channel configuration.

See the tutorial for adding an organization at a later point in time.

Upvotes: 1

Related Questions