Manage Ordering Service
This topic contains information about how founders and participants manage the ordering service.
What is the Ordering Service?
Oracle Blockchain Platform supports Raft as the consensus type.
For more information on the Hyperledger Fabric implementation of the Raft protocol, see: The Ordering Service - Raft.
With the older Kafka consensus type, the whole network can have at most two orderer nodes, and they have to join all channels. In some cases, they may be overloaded, and cannot be scaled out. With the Raft consensus type, the network can have an arbitrary number of orderer nodes, and each channel can define its own orderer node set. Different channels can use different orderer nodes, and orderer nodes will no longer be the bottleneck.
However, the Raft consensus type can be complicated to configure properly. There are rules about what can or can't be done, and if these rules are not followed the channel and even the network may not work. The following guidelines should reduce the problems you encounter:
Keep the Majority of the Ordering Service Nodes (OSN) Alive
- If there are 50% or less OSNs working in the network, network management will no longer be functional. No new channels can be created, no new orderer nodes can be added into network, no orderer can be removed from network, and so on.
- If there are 50% or less OSNs working in the application channel, no transaction can be submitted to this application channel. Queries may still function correctly, however administrative operations such as adding a new organization, changing the access control list, or instantiating or deploying chaincodes will fail.
Be cautious when adding a new OSN to the network or an application channel. Ensure the owner is trustworthy and the OSN is robust.
When removing OSNs or an organization, ensure that more than 50% of the OSNs will remain working. For example, if you had 2 organizations with 3 OSNs each, if you removed one organization, during the removal it would be interpreted as only 50% of the OSNs being functional. Add an OSN to the remaining organization before deleting the extraneous organization to ensure that you always exceed 50% of the OSNs working.
Do Not Add or Remove Orderers Frequently
UNKNOWN: Stream removed
SERVICE UNAVAILABLE
BAD REQUEST
This may last a few minutes. If you have removed the previous Raft leader OSN from the channel, this may last as long as 20 minutes.
Ensure that you aren't adding or removing orderers frequently. If multiple orderers must be added or removed, do one at a time ensuring that the network has returned to operational status before making the next change.
Ensure the New Orderer is Started As Soon As Possible
When adding a new orderer into network, usually two organizations will be involved: the founder and the owner of the new orderer. Both parties must follow the instructions in Join the Participant or Scaled-Out OSNs to the Founder's Ordering Service all the way to completion or the founder won't be able to manage the network.
Join the Participant or Scaled-Out OSNs to the Founder's Ordering Service
When you provision a participant instance, it is created with 3 orderers. The orderers are inactive until they are joined to a network. When you scale out a founder, the new orderers are also inactive until they are joined to a network.
To add or remove multiple orderers, add or remove one at a time and ensure that the network has returned to operational status before making the next change. See What is the Ordering Service? for additional important details about adding, removing, starting, and stopping Raft orderers.
Export the OSN Settings From the Participant or Scaled-Out Orderers
To join the participant or scaled-out orderers to a network, export their settings and import them into the founder.
-
In the participant console (or the founder console for scaled-out orderers), on the Node tab find the orderer node (or the first orderer node if multiple nodes exist). Select the Action menu for this node and select Export OSN Settings.
This generates a JSON file with the settings and saves the file. The file contains the organization's certificate and the selected orderer service node (OSN) settings signed by the private key of the administrator of the participant organization. Send this file to the administrator of the founder instance.
Applications that are run on channels that use this OSN also require this exported TLS certificate. See Before You Develop an Application.
-
In the founder console, open the Network tab. Click Add OSN. A window opens prompting you for the location of the JSON file that was provided by the participant. Select to upload the file and click Add.
The participant organization or newly scaled-out orderer is added to the orderer organization section of the system channel list.
Export the Founder's Configuration Settings
After the participant or scaled-out orderers have been added to the founder, you must export the founder's settings and import them into the participant or scaled-out orderer.
-
In the founder console, open the Network tab. Click Export Network Config Block.
The network configuration block contains the latest system channel configuration block. This can be saved and sent to the participant administrator.
-
In the participant console (or the founder console for scaled-out orderers), on the Node tab find the orderer node (or the first orderer node if multiple nodes exist). Select the Action menu for this node and select Import Network Config Block.
You are prompted for the file that was sent by the founder instance administrator.
-
In the participant console, refresh the Node tab. The orderer node status should be listed as down. From the Action menu select Start.
Each orderer node that is started will be added to the Raft cluster in the founder.
Note:
You can't add multiple OSNs to a network in a single batch. Ensure that only one OSN is added at a time.Edit Ordering Service Settings for the Network
You can update the ordering service settings for the founder instance.
- The updated settings are used when you create new channels and are not applied to existing channels.
- Separately you can update the ordering service settings for an individual existing channels as described in Edit Ordering Service Settings for a Channel.
- If you change the ordering service settings and there are applications running against the network, then those applications must be manually updated to use the revised ordering service settings.
- It isn’t common, but in some situations, you might expose a different ordering service to some of the network participants. In this case, you’ll export the updated network config block and the required participants will import the revised settings. See Join the Participant or Scaled-Out OSNs to the Founder's Ordering Service.
View Ordering Service Settings
You can view the founder's ordering service settings that were imported into a participant’s Oracle Blockchain Platform instance.