Programming Club
https://www.facebook.com/groups/pclubiitk/
IITKBucks
A blockchain based cryptocurrency
In this project we built a custom cryptocurrency using a blockchain model. Everyone developed their own node. The model can be used for secure transactions that can be verified by anyone without the need of a central body. A major advantage of such a network is that it maintains strict anonymity, as a public key is all that is needed to make a transaction.
We first built various parts of the application singularly as assignments. Then all of us built our own node. The nodes can be deployed on any computer and tunnelled through ngrok to get a hostname. We also built an interaction tool to help end users to make transactions. The interaction tool can be deployed or run separate from the miner. It only needs the url of any one node, to which it will send the request.
In the first phase, we learn about blockchains and solved assignments to singularly implement different parts of the project.
In the second phase, we put together the various parts implemented at assignments into a main application.
One node of the project had been deployed on https://iitkbucks.pclub.in from 13th July 2020 till 26th July 2020. Through trying to communicate with that node, we found and eliminated the bugs in our applications. In this phase, we brought our programs to completion.
All of us built our own nodes, in a language of our preference, following the API specification given below. In total, there were 9 nodes implemented in Javascript, 4 in python, 1 in Java and 1 in Go.
We implemented the following endpoints in our nodes:
The part for mining a new block had to run in parallel with the HTTP server. In order to prevent the main thread from blocking, we needed to implement multithreading in our applications. For this purpose, we used worker threads in Javascript, the threading module in python, and the java.util.concurrent package in Java.
The frontend is the part with which the user interacts. This could be a desktop GUI application, a web app, or a Command Line Interface. The choice was left to the students to choose which type of frontend they would want to build. Most students chose to build a CLI.
One node had been deployed at https://iitkbucks.pclub.in for about 2 weeks. The nodes can be deployed as and when required. They will pick up the chain from one of the peers and can start building the chain further. The following is a list of the people involved in the project, and links to their repositories, containing the code for their nodes: