Collection of files used to deploy local instance of Hyperledger Fabric, using Composer
To deploy your own network:
- Make sure you have all pre-requisites - https://hyperledger.github.io/composer/latest/installing/installing-prereqs.html
- Clone fabric-dev-servers (folder full of scripts) and put it at the root of the repo.
- Make sure scripts installed in step 1 are in your
PATH
(this is currently hard-coded here). Repo should now look as follows
blokchain
│ README.md
│ startFabric.sh
│ upload_transaction.py
│
└───fixtures
│ │ ...
│
└───test-proofd
│ │ ...
│
└───fabric-dev-servers
│ ...
cd
to root of the project (i.e.blockchain
), run thestartFabric.sh
script
The most relevant file, defining the structure of entities stored on blockchain can be found in test-proofd/models/org.abdn.ac.uk.cto
. There currently are 3 entities:
- Asset, called "Commodity"
- Participant, called "BusinessEntity"
- Transaction, called "Delivery"
If you deploy the network somewhere else and would like to restore all fixtures, first follow steps under Deployment. Then, you can use the helper script upload_transactions
(python3 required) to put the data from experiments back onto blockchain. Make sure that URL, Username and Password is correct in the file. Finally, feel free to run the script ($ python3 upload_transactions.py
) - keep in mind, it might take more than a few seconds to upload all data.