GreenPlus Blockchain Manual2

GreenWebPlus Blockchain manual


1- Click on the link to see the Portal LogIn page.




2- Click on `Create an Account` to open the account registration.

2.1- fill all the required data.

2.2- read and agree to the `terms and condition`.

2.3- click on `Register` and activate your account.












3- go back to the `Login` page and enter your credentials to login to your account. Then navigate to `Products-Blockchain`.

4- Click on `New Project` and follow the structure:

4.1- Enter your Project name.

4.2- Select your desired monitoring plan. (Free plan is currently available)

4.3- Click on `New Project`

4.4- Select a plan for your network. (Free plan is currently available)

4.5- Select a payment method. (Static plan is currently available)

4.6- Select your desired zone. (Blockchain-Event is currently available)





5- Click on your newly created project. Check your Overview.


6.1 Navigate to `Topology` and click on `New Organization`.

6.2 Enter your Organization Name.

6.3 Click on `Peers` and add as many Peers as you want.

6.4 Click on `Orderers` and add as many Orderers as you want.

6.5 After your topology creation is finished, click on `New Organization` and the CA, Peers, Orderers will be created very soon.







7- Add as many as organizations that you wish, you can also add them at any time you want.

8- Create channels to isolate different tasks of the blockchain system in different channels.

8.1- Set your channel name.

8.2- Add the Orderers you want to be a part of this channel, you can also add them at any time you want.

8.3- Add the Peers you want to be a part of this channel, you can also add them at any time you want.

8.4- You can set some Peers to be `Anchor` in thischannel. (After the channel creation, you can not remove the Anchors)



9- Create as many Channels as you wish. You can also add them at any time you want.


10- Install chaincodes on your Peer nodes.

Caution: for installing chaincode, you should first create a docker image based on your chaincode and push it into the GreenWebPlus registry (it should be public).


Simple example for Node Chaincodes:

FROM node:14-alpine
COPY . .RUN npm install
CMD [“npm”, “run”, “start”]


Caution: as the chaincode will be installed externally, you should change the `package.json` file and set the `scripts.start` value to `fabric-chaincode-node server` as shown below:


“scripts”: {
“lint”: “tslint -c tslint.json ‘src/**/*.ts'”,
“pretest”: “npm run lint”,
“test”: “nyc mocha -r ts-node/register src/**/*.spec.ts”,
“start”: “fabric-chaincode-node server”


10.1- Set a Name for your chaincode.

10.2- Set a version of your chaincode.

10.3- Select the Registry you pushed your chaincode into.

10.4- Select the Registry Image name. (Repository)

10.5- Set the Image Tag to be used.

10.6- Add as many Peers as you wish, you can also add them at any time you want.






11- Add as many as Chaincodes that you wish, you can also add them at any time you want.


12- For running a Chaincode on top of a Channel you should `Instantiate` it, Navigate to `Instantiate` and select your Channel, then click on `Approve` in order to approve the chaincode by all Organizations.

12.1- select the channel name.

12.2- select the chaincode.

12.3- select the chaincode version.

12.4- set whether to Initial the args at the time of `Committing` or not.

12.5- select the Organizations that you wish to Approve the chaincode on top of the channel. (you must select all of them so you can commit in the next stage)

12.6- Select the Policy for accepting the transactions(Consensus):

12.6.1- The Policy can be `Majority` of Organizations.

12.6.2- The Policy can be `Custom` so you can create whatever policy you wish with `AND`, `OR` and `OUTOF` definitions. AND(x,y,z) policy means all of the x,y,z. OR(x,y,z) policy means one of the x,y,z. OUTOF(i, x,y,z) policy means i numbers from x,y,z. (i should be fewer that sum(x,y,z)) the combination of `AND`, `OR`

and `OUTOF` definitions, like:

AND(x, OR(y,z))

Hint: for more info visit this.

12.7- Private Data Collections(PVC) are used to keep all or part of the data inside a transaction to be private.

You should set all values to create a collection, you can also create as many collections as you wish.

Hint: for more info visit this.





13- Click on `Approve`


14- If you want to start the chaincode on the channel, you should `Commit` it. For changing the Approvement, you can reApprove it and then Commit the latest one.






15- For accessing the Blockchain nodes, you can navigate to `Clients` and download your `Connection Profile`

16- Clients are credentials for creating transactions using the client side application with connection profile. To create a new Client certificate, select the Organization you want to have the client in it and then click on `New Client`.

16.1- Enter the client name.


16.2- If you want advanced settings, click on Advance.

16.2.1- You can add as many `Affiliations` as you wish.

16.2.2- You can add your own CSR.









17- Monitoring section involves all credentials for Hyperledger Fabric, Kibana(Log, Metric monitoring) and all Database(CouchDB) access details.