Challenge Overview
Welcome to Topcoder - Challenge Review Processing with Blockchain challenge creation and member registration
Project Background
Technology Stack
Individual requirements
1. Use the setup from previous challenge (found in forum). Below is the configuration:
2. Use the Node.Js API service provided in forum and add new endpoints as described below:
2.1 POST /challenges/{challengeId}/submissions
2.1.2 Chaincode
2.2 GET /challenges/{challengeId}/submissions/{submissionId}
2.1.2 Chaincode
3. All IDs can be either positive Long values or UUID strings. They must be unique in the whole system
Challenge Objectives
- Create setup for POC for Challenge Review process using Hyperledger Fabric v1.2, for showcasing the blockchain capabilities in Topcoder platform
Project Background
- Topcoder is trying to determine if Blockchain can be used to control the review process of challenges
- To build the blockchain network Hyperledger Fabric 1.2 is going to be used
- To store the submission files IPFS (Inter-Planetary File System) must be used
- The idea is to have the chaincode of Hyperledger Fabric 1.2 doing all business logic and the challenge data related to review process (review, appeal, appeals response and manager response) will be store into the blockchain ledger
- This is a challenge of a series of challenges to build this PoC application
Technology Stack
- Hyperledger Fabric 1.2
- IPFS (Inter-Planetary File System)
- Node.Js - for chaincode and client SDK
- Docker
Individual requirements
- The new review process flow using blockchain can be found in forum. Please register to get access.
- In this challenge we want to:
1. Use the setup from previous challenge (found in forum). Below is the configuration:
- Network: topcoder-review
- Orgs: Topcoder, Clients, Members, & Moderators
- Peers: 2 peers for each org
- Channels: topcoder-client (Topcoder and Clients) and topcoder-review (Topcoder, Members, and Moderators)
- Orderer: Solo
2. Use the Node.Js API service provided in forum and add new endpoints as described below:
2.1 POST /challenges/{challengeId}/submissions
2.1.1 API
- Will be used to save the file to IPFS and store the information into submissions property in challenge object. Should be saved the file name, IPFS hash and memberId. See example below.
- Joi should be used to validate data and any error should be returned in JSON format.
- Only user with member role can upload a submission.
- Payload (multi-form):
a) file : the file to be uploaded
b) fileName : the original file's name
c) memberId : the member's id
b) fileName : the original file's name
c) memberId : the member's id
2.1.2 Chaincode
- Check if member is registered to challenge.
- Add prefix to file's name submission_{challengeId}.
- Store file to IPFS and retrieve HASH.
- Save data to ledger - example below:
{ "projectId": 1, "copilotId": 1, "name": "A great name", "description": "A long description", "challanges": [ { "challengeId": 1, "name": "A great name", "description": "A long description", "members": [ { "memberId": 5, "status": 1 }, { "memberId": 7, "status": 0 } ], "submissions": [ { "submissionId": 1, "memberId": 5, "originalFileName": "work_005.zip", "fileName": "submission_001_work_005.zip", "ipfsHash": "A VERY BIG HASH", "timestamp": "ISO 8601 timestamp" } ] } ] }
2.2 GET /challenges/{challengeId}/submissions/{submissionId}
2.1.1 API
- Will be used to retrieve the file from IPFS
- Joi should be used to validate data and any error should be returned in JSON format
2.1.2 Chaincode
- Fetch the IPFS hash for submissionId and send the file from IPFS to rest API
- Only user with copilot role for that project, manager or member registered to challenge and that uploaded the file can download the submission
3. All IDs can be either positive Long values or UUID strings. They must be unique in the whole system
Final Submission Guidelines
- Zip file with submission files
- Chaincode file
- Node.Js application
- Detailed documentation for configuring and deploying