Please find conceptional documentation in our mural proejct in blockhaingbs.
User story: As a user I am only available on certain dates only if specific person(s) are also attending on the same date.
Eventually, this results into a chained voting, meaning that specific persons can vote with lent votes, if the vote is within the agreed dates..
- We will use https://www.draw.io/ for our additional software documentation
- We will provide all our models as an editable xml and also as an image file
- Lending a vote: Available dates & representatives are picked and placed as chaincode onto the blockchain.
- Regular voting: When voting for a date the smart contract is evaluated and executed if a lend vote applies.
start services
npm start
This will start 7 containers
- ca0 - fabric certification authority
- orderer.chained-voting.com - orderer service
- peer0.org.chained-voting.com - endorser for chaincode
- client - container to host web app - on
http://<docker-machine-ip>:4200/
- server - container to host REST API (for client) - on
http://<docker-machine-ip>:3000/
- mysql - contains the fabric data stored for performance
- fabric-explorer - container to host fabric monitoring - on
http://<docker-machine-ip>:8080/
stop services
npm stop
This will stop all containers, including the created container for the smart contracts. The image is removed as well.
npm test
This will execute the go tests.
When the docker server container is started it will initially run the grunt tasks for TS transpilation and linting and then watch the src/ for TS changes and start the application the nodemon task.
As soon as changes to the TS occur the watch task will run both TS tasks mentioned above. The nodemon will notice the changed JS file and restart the application.
This is how the crypto-config & channel artifacts are generated.
- Generate certificates using cryptogen tool
$CRYPTOGEN generate --config=./crypto-config.yaml
-
Replace the private key of the ca in the docker-compose.yaml with the *_sk in crypto-config/peerOrganizations/org.chained-voting.com/ca/
-
Generating Orderer Genesis block
$CONFIGTXGEN -profile OrdererGenesis -outputBlock ./channel-artifacts/genesis.block
- Generating channel configuration transaction 'channel.tx'
$CONFIGTXGEN -profile Channel -outputCreateChannelTx ./channel-artifacts/channel.tx -channelID default
- Generating anchor peer update for Org1MSP (only needed for cross peer communication - as we aren't doing that, you may skip that step.)
$CONFIGTXGEN -profile Channel -outputAnchorPeersUpdate ./channel-artifacts/OrgMSPanchors.tx -channelID default -asOrg OrgMSP