Source code for Blockchain certified Documents for trusted information (BC-DTI) for conference DESRIST2020. TODO: Fill-in more information about his application/demo
- hyperledger-chaincode/ - Contains chaincode for this application
- hyperledger-api-server/ - API server implementation for the chaincode
- website/ - Frontend for the application
- The acceptor of the university uploads the document which needs to be inserted to the system.
- The SHA256 of the document is calculated and awaits for approver for endorsement.
- The approver verifies the correctness of the document and signs it.
- This is send to the chaincode which submites the transaction proposal to the orderer.
- Orderer orders a new transaction and mines a fresh block with the data.
- The verifier uploads the document to be verified from the verification page.
- The SHA256 of the document is calculated and submits to the chaincode.
- The chaincode fetches the correct SHA256 of the document from the blockchain and verifies it with the one SHA256 provided by the verifier.
- The chaincode returns true or false based on check.
- golang >= 1.13.5
- Hyperledger Fabric = 1.4.4
- Optional: Install system packages necessary for fabric
./run.sh fabric-system
- Install the fabric itself
./run.sh fabric-platform
- Get the test network up with default
mychannel
(cd fabric-samples/test-network; ./network.sh down && ./network.sh up createChannel -s couchdb && ./network.sh deployCCCV)
- Verify existing documents in the network
(cd fabric-samples/test-network; FABRIC_CFG_PATH=$PWD/../config/ ./scripts/insert.sh 0)
- Insert the
sha256sum
of a test ID (111092-221P
) and first Document test_doc.txt
(cd fabric-samples/test-network; FABRIC_CFG_PATH=$PWD/../config/ ./scripts/insert.sh 1)
- Insert the
sha256sum
of a test ID (111092-221P
) and second Document test_doc2.txt
(cd fabric-samples/test-network; FABRIC_CFG_PATH=$PWD/../config/ ./scripts/insert.sh 2)
- The verification can also been seen in the console and also from couchdb of
peer0
orpeer1
http://localhost:5984 or http://localhost:7984