Xooa recently released a long-promised feature around endorsing peers and policies. Previously, you were able to create only observing peers outside of the Xooa console. The observing peer allows you to access the blockchain ledger by keeping itself in sync with Xooa.
Whereas, an endorsing peer will be able to endorse the transactions based on the endorsement policy defined for each of the apps. This new feature is available under the External Peers tab on the Xooa console.
For using this feature, it can be broken down in 4 simple steps:
- Create an endorsing peer on Xooa.
- Setup the endorsing peer on an external platform.
- Test the endorsing peer.
- Create an endorsement policy for an app.
Create an endorsement peer on Xooa
- Click on Create Endorsing Peer.
- Enter the peer label and organization name to get started.
- Click Create.
Request URL and Event URL are optional at the time of creating the peer. You can populate these two fields once the peer is deployed on an external platform.
Setup endorsing peer on an external platform
You will be presented with multiple options to set up the endorsing peer on either a popular cloud provider or on-premises.
Follow the setup instructions presented for the corresponding platform you want to set up the peer on.
Test the endorsing peer
This step involves establishing a connection between the external endorsing peer you have just set up and Xooa.
- Got to External Peer tab.
- Click on the Test button corresponding to the just created external peer.
- Provide the Request URL and the Event URL of the external endorsing peer.
- Test the connection.
Once your peer is successfully tested, you will be able to use this organization while defining endorsing policy.
Create an endorsement policy for an app
Xooa provides an industry-first, simplified web-based endorsement policy editor. You can access the editor under the manage tab of any app created on Xooa.
To define the policy:
- Click on Add New under the Endorsement Policy.
- Enter a Policy Name.
- Add Principal
· Add an organization taking part in the endorsement under the same AND/OR expression
- Add expression – Add a different condition of endorsement.
· AND expression will allow the transaction to be committed only when endorsing peers from all the added organizations endorses the transaction.
· OR expression will allow the transaction to be committed when endorsing peers from any of the added organizations endorses the transaction.
- Click on Save and Apply.
The app will be upgraded, and the new policy will take effect immediately.
The newly configured external endorsing peer will endorse the transactions according to the endorsing policy defined for the app.