E-Attendance using Blockchain Test phase, srs, design phase and source code final deliverable
Domain / Category Web application / Blockchain.
Abstract / Introduction
In this project we will develop a Blockchain based web application to record the students’ attendance. The goal is to build an application that allows users to mark E-attendance by using Blockchain technology. The student attendance records will be stored on the Blockchain, which will be immutable and permanent. Users will interact with the application via a simple web interface and mark their attendance in user module. The proposed system provides a platform to store and verify the student’s attendance record using Blockchain technology with the help of the unique student ID and institute can verify whether the student is authorized to mark the attendance or not. There are two modules of the system
- College / institute (admin)
- Student (user)
Functional Requirements:
Following are the main functional requirements
- Implementing blockchain for secure data storage.
- Storing student attendance data along with their roll numbers in the blockchain.
- Retrieval of data from the blockchain.
- Web interface for insertion and retrieval of data.
- Ability to check if a block has been tampered with.
College /Institute (Admin):
The institute work as an administrator, the main functions included in admin module are:
- create a student account to mark the attendance.
- Enrolling the students by assigning the unique roll number
- Perform a check that student is registered to the particular class or not.
- maintain the attendance record onto the Blockchain.
Student Module (User)
Students are the users of the application, the main functions included in user module are:
- create a login user interface for students to mark the attendance.
- Students can mark and view their attendance record by logging into their account.
- The student is also capable of sending a request to the college authorities if any discrepancy is found in attendance.
- A student can also justify an absence for three days only.
Step by step method to create Blockchain
- Implementing Blockchain and Store transactions into blocks
The transactions are packed into blocks. A block can contain one or many transactions. The blocks containing the transactions are generated frequently and added to the blockchain. Because there can be multiple blocks, each block should have a unique ID.
- Add digital fingerprints to the blocks
You need to add a hash function. A hash function is a function that takes data of any size and produces data of a fixed size from it (called a hash), which is generally used to identify the input. There are various popular hash functions; we will use the SHA-256 hashing function.
- Chain the blocks
We need a mechanism to make sure that any change in the previous blocks invalidates the entire chain. This will be implemented by including the hash of the previous block in the current block in a new field called previous_hash.
- Implement a Proof of Work algorithm
A new field will be added to the block called nonce. A nonce is a number that will keep changing until we get a hash that satisfies our constraint. The number of zeroes specified in the constraint decides the “difficulty” of our Proof of Work algorithm (more the number of zeroes, harder it is to figure out the nonce).
- Add blocks to the chain: To add a block to the chain, we’ll first have to verify that,
- The data is untampered i.e., the Proof of Work provided is correct
- The order of transactions is preserved i.e., the previous_hash field of the block to be added points to the hash of the latest block in our chain.
- Mining
Storing student attendance data along with their roll numbers in the block, the transactions will initially be stored as a pool of unconfirmed transactions. The process of putting the unconfirmed transactions in a block and computing Proof of Work is known as “mining blocks.” Once the nonce satisfying our constraints is figured out, we can say that a block has been mined, and it can be put into the chain.
- Create interfaces
Create interfaces for Blockchain node to interact with the application we’re going to build. We’ll be using a popular Python microframework called Flask to create a REST-API to interact with and invoke various operations on a blockchain node.
- Establish consensus and decentralization
We need multiple nodes to maintain the blockchain. So, to transition from a single node to a peer-to-peer network, we need a mechanism to let a new node become aware of other peers in the network. A simple consensus algorithm could be to agree upon the longest valid chain.
Tools:
- Python 3.6+
- Flask 0.12.2+
- Postman using PyCharm
Supervisor:
Name: Fouzia Jumani