0% found this document useful (0 votes)
110 views57 pages

Documentation

This document outlines a final year project that aims to develop a blockchain application for education. It will cover aspects of the education process like student registration, transcripts, and recording achievements. The project aims to address problems in traditional education systems like maintaining student records, copyrighted materials, and forged certificates. It will use blockchain and Hyperledger Fabric to provide transparency, security and verification of educational records and credentials. The document outlines the background, objectives, and methodology that will be used. It provides an overview of the technologies involved like React, blockchain, and Hyperledger Fabric and discusses related work.

Uploaded by

Assem Makhyoun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views57 pages

Documentation

This document outlines a final year project that aims to develop a blockchain application for education. It will cover aspects of the education process like student registration, transcripts, and recording achievements. The project aims to address problems in traditional education systems like maintaining student records, copyrighted materials, and forged certificates. It will use blockchain and Hyperledger Fabric to provide transparency, security and verification of educational records and credentials. The document outlines the background, objectives, and methodology that will be used. It provides an overview of the technologies involved like React, blockchain, and Hyperledger Fabric and discusses related work.

Uploaded by

Assem Makhyoun
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

Arab Academy for Science & Technology & Maritime Transport.

Collage of Computing & Information’s Technologies.

B. Sc. Final Year Project Documentation


Blockchain Application in Education

Submitted By:
Assem Makhyon (CS) Muhammed Khaled Imam (CS)
Ahmed Amgad Abdelrazek (IS) Lama Aly Anwar (CS)
Mohamed Nasser (GM)

Supervised By
Prof. Dr. Ayman Adel Abdel-Hamid
Dr. Yasmine Nagy
February 2021

2
Table of Contents

Chapter 1 5
1.1 Introduction 5
1.2 Problem Statement 5
1.3 Motivation 5
1.4 Objectives 6
1.5 Project Documentation Online 6
Chapter 2 7
2.1 Platforms 7
2.2 Blockchain 9
2.3 HyperLedger Fabric 2.0 11
2.4 Related Work 22
Chapter 3 28
3.1 Product Functionality 28
3.2 Requirements 29
3.3 Design - Diagrams 30
Chapter 4 35
4.1 Technologies Used 36
4.2 Methodology 39
4.3 Front-end 40
4.4 Backend and Blockchain 42
Chapter 5 65
5.1 Future Work 66
5.2 Conclusion 66

3
Table of Figures
Figure 1 Hyperledger fabric policy hierarchy [1]..................................................................................15
Figure 2 Hyperledger Fabric Policy Hierarchy showcasing control implementation. [1]......................17
Figure 3 Peers in a network [1]............................................................................................................18
Figure 4 Elements in a blockchain and how they interact together.....................................................19
Figure 5 Example of the first role of an ordering node. [1]..................................................................21
Figure 6 Second Role of an ordering node. [1]....................................................................................21
Figure 7 How Blockcerts Works [2]......................................................................................................23
Figure 8 SGE's proposed application in cooperation with Hyperledger fabric.....................................25
Figure 9 ODEM Services.......................................................................................................................27
Figure 10 System UseCase Diagram.....................................................................................................30
Figure 11 Sequence Diagram of Student Enrolment Process...............................................................31
Figure 12 Sequence Diagram of Student Registration Process............................................................31
Figure 13 Sequence Diagram of TA Enrolment Process.......................................................................32
Figure 14 Architecture Diagram of the System....................................................................................33
Figure 15 Smart Contracts implemented in the system.......................................................................34
Figure 16 System Overview Diagram...................................................................................................39
Figure 17 Registering Courses Page.....................................................................................................40
Figure 18 Submitting Grades Page.......................................................................................................40
Figure 19 Viewing Transcript Page.......................................................................................................41
Figure 20 Sending a request to view transcript page...........................................................................41

4
Abstract
Blockchain technology will accelerate the end of a paper-based system for certificates.
Educational Organisations can issue any kind of certificates such as qualification or records
of achievement permanently and securely. Furthermore, a possible automation issuance and
storage of the awards, recognition and transfer of credits. Storing and verifying a complete
record of formal achievements throughout lifelong learning are also possible with the
blockchain.
Learners can store their own evidence of formal or informal learning, share it with a desired
audience, and ensure instant verification “Lifelong Learning Passport”. Institutions can also
begin using Blockchain-based cryptocurrencies to facilitate payments involving grants and
other types of funding as well as students paying for their education.
This project is aimed at developing an application for an educational institute that benefits
from the advantages of blockchain. The application would cover most aspects of the
education process such as student registration, handling student transcripts, and storing and
verifying a complete record of formal achievements.

5
Chapter 1
1.1 Introduction
This project is aimed at developing a web application built on top of Blockchain
technology for an educational facility or college. The application would cover most
aspects of the education process such as student registration, handling student transcripts,
and storing and verifying a complete record of formal achievements.
1.2 Problem Statement
Education technology moves fast, and it goes beyond smart boards and remote learning.
When talking about the traditional educational system, problems such as the upkeep of
student records, controlling the dispersal of copyrighted materials, and forged certificates
arise.
Our proposed system is aimed to answering the question of how blockchain technology
can help solve the problems faced by educational facilities today
1.3 Motivation
In February 2020, the Council of Higher Education in Egypt expelled 177 students who
had been admitted to private universities with forged local, Arab and international
certificates, and the Council decided to refer these students to the Public Prosecution to
take the necessary legal measures as a punishment for the crime they committed in
providing forged certificates to obtain seats they did not deserve at a number of private
universities.
At the University of Connecticut, student Social Security numbers and credit card data
were taken. Washington State University and Johns Hopkins University were also the
target of attacks.
In penn state Overall, about 18,000 students and faculty, plus around 500 research
partners, were possibly affected by a breach that might have started as far back as two
years ago.

According to a national survey by HR.com and National Association of Professional


Background Screeners (NAPBS) 2017, nearly all the employers surveyed—96 percent—
stated their organization conducts one or more types of employment background
screening. And among them, 75% did education verification. Employers can find out if
applicants exaggerate or lie on their educational qualifications by contacting their school
or use Global Verification Network and other third party agencies.

It was found that Almeda University is affiliated with Axact's international diploma mill
scheme, one located in Islamabad, Pakistan with more than 800 people across Canada
having purchased fake degrees from there. A fake university monitor for UK degrees did
over 160,000 verification checks from 2008 when it was first set up to 2016 and shut
down 30 fake universities in 2015.

6
1.4 Objectives
 Minimize or eliminate academic paper work that might get lost or damaged.
 Protect transcripts from tamper attempts either from a malicious user or a hacker.
 Save employees and students time required to process printed documents.
 Save money spent on translation and shipping.

1.5 Project Documentation Outline


In chapter 2, the background and the related work will be discussed furthermore we will
go through applications and platform concepts that are close to our own in concept.

In Chapter 3, the software development phases will be discussed in detail. First, the
system requirements will be determined, then the diagrams will be generated according to
the system requirements.

In chapter 4, we discuss the main features in the method, starting with the front end and
its main functions and ending with the backend and its functions.

7
Chapter 2: Background and Related Work
Chapter 2 will explain some of the background that might be critical to understand the inner
working of our system. The rest of the Chapter will be organized as follows:
• Section 2.1 describes the platforms we use in our system.
• Section 2.2 describes Blockchain and some relevant terms.
• Section 2.3 describes Hyperledger Fabric 2 and some relevant concepts.
• Section 2.4 describes some Algorithm’s we went through or close to.
• Section 2.5 shows some relative scientific papers.
• Section 2.6 shows some of the relative work.

2.1 Platforms
2.1.1 React.js
React.js is an open-source JavaScript library that is used for building user interfaces
specifically for single-page applications. It’s used for handling the view layer for web and
mobile apps. React also allows us to create reusable UI components. React was first created
by Jordan Walke, a software engineer working for Facebook. React first deployed on
Facebook’s newsfeed in 2011 and on Instagram.com in 2012.
React allows developers to create large web applications that can change data, without
reloading the page. The main purpose of React is to be fast, scalable, and simple. It works
only on user interfaces in the application. This corresponds to the view in the MVC template.
It can be used with a combination of other JavaScript libraries or frameworks, such as
Angular JS in MVC.
React JS is also called simply to React or React.js.
React.js properties includes the following:

8
2.1.2 Node.js
Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the
world.
Node.js came into existence when the original developers of JavaScript extended it from
something you could only run in the browser to something you could run on your machine as
a standalone application. Now you can do much more with JavaScript than just making
websites interactive. JavaScript now has the capability to do things that other scripting
languages like Python can do. Both your browser JavaScript and Node.js run on the V8
JavaScript runtime engine. This engine takes your JavaScript code and converts it into a
faster machine code. Machine code is low-level code which the computer can run without
needing to first interpret it.

9
2.1.3 MongoDB
MongoDB is a document database with the scalability and flexibility that you want with the
querying and indexing that you need.
MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from
document to document and data structure can be changed over time.
The document model maps to the objects in your application code, making data easy to work
with.
Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and
analyze your data.
MongoDB is a distributed database at its core, so high availability, horizontal scaling, and
geographic distribution are built in and easy to use.
MongoDB is free to use. Versions released prior to October 16, 2018 are published under the
AGPL. All versions released after October 16, 2018, including patch fixes for prior versions,
are published under the Server Side Public License (SSPL) v1.

Section 2.2 Blockchain


Blockchain basically is a decentralized, distributed ledger that maintains a continuously
growing list of data records and transactions. At the most basic level a blockchain is simply
just a chain of blocks where the block is digital information and the chain is a database.
2.2.1 Block
A block contains an ordered set of transactions. It is cryptographically linked to the preceding
block, and in turn it is linked to be subsequent blocks. The first block in such a chain of
blocks is called the genesis block. Blocks are created by the ordering service, and then
validated and committed by peers.
2.2.2 Chain
The ledger’s chain is a transaction log structured as hash-linked blocks of transactions. Peers
receive blocks of transactions from the ordering service, mark the block’s transactions as
valid or invalid based on endorsement policies and concurrency violations, and append the
block to the hash chain on the peer’s file system.

10
2.2.3 Channel
A channel is a private blockchain overlay which allows for data isolation and confidentiality.
A channel-specific ledger is shared across the peers in the channel, and transacting parties
must be authenticated to a channel in order to interact with it. Channels are defined by a
Configuration-Block.
2.2.4 Consensus
A broader term overarching the entire transactional flow, which serves to generate an
agreement on the order and to confirm the correctness of the set of transactions constituting a
block.
2.2.5 World state
Also known as the “current state”, the world state is a component of the HyperLedger Fabric
Ledger. The world state represents the latest values for all keys included in the chain
transaction log. Chaincode executes transaction proposals against world state data because
the world state provides direct access to the latest value of these keys rather than having to
calculate them by traversing the entire transaction log. The world state will change every time
the value of a key changes (for example, when the ownership of a car – the “key” – is
transferred from one owner to another – the “value”) or when a new key is added (a car is
created). As a result, the world state is critical to a transaction flow, since the current state of
a key-value pair must be known before it can be changed. Peers commit the latest values to
the ledger world state for each valid transaction included in a processed block.
2.2.6 Smart contract
A smart contract is code – invoked by a client application external to the blockchain network
– that manages access and modifications to a set of key-value pairs in the World State via
Transaction. In Hyperledger Fabric, smart contracts are packaged as chaincode. Chaincode is
installed on peers and then defined and used on one or more channels.
A smart contract defines the different states of a business object and governs the processes
that move the object between these different states.
Smart contracts are important because they allow us to define the key business processes and
data that are shared across the different users collaborating in a blockchain network.
The same version of the smart contract must be used by all applications connected to the
network so that they jointly implement the same shared business processes and data.
2.2.7 External Builder and Launcher
An external builder and launcher consists of four programs or scripts:
bin/detect: Determine whether or not this buildpack should be used to build the chaincode
package and launch it.
bin/build: Transform the chaincode package into executable chaincode.
bin/release (optional): Provide metadata to the peer about the chaincode.

11
bin/run (optional): Run the chaincode.
2.2.8 How Does a Blockchain Work?

2.2.9 Types of Blockchain

Section 2.3 Hyperledger Fabric 2.0


What is Hyperledger Fabric?
The Linux Foundation founded the Hyperledger project in 2015 to advance cross-industry
blockchain technologies. Rather than declaring a single blockchain standard, it encourages a
collaborative approach to developing blockchain technologies via a community process, with

12
intellectual property rights that encourage open development and the adoption of key
standards over time.
Hyperledger Fabric is one of the blockchain projects within Hyperledger. Like other
blockchain technologies, it has a ledger, uses smart contracts, and is a system by which
participants manage their transactions.
Where Hyperledger Fabric breaks from some other blockchain systems is that it is private and
permissioned. Rather than an open permissionless system that allows unknown identities to
participate in the network (requiring protocols like “proof of work” to validate transactions
and secure the network), the members of a Hyperledger Fabric network enroll through a
trusted Membership Service Provider (MSP).
Hyperledger Fabric also offers several pluggable options. Ledger data can be stored in
multiple formats, consensus mechanisms can be swapped in and out, and different MSPs are
supported.
Hyperledger Fabric also offers the ability to create channels, allowing a group of participants
to create a separate ledger of transactions. This is an especially important option for networks
where some participants might be competitors and not want every transaction they make — a
special price they’re offering to some participants and not others, for example — known to
every participant. If two participants form a channel, then those participants — and no others
— have copies of the ledger for that channel.
2.3.1 Shared Ledger
Hyperledger Fabric has a ledger subsystem comprising two components: the world state and
the transaction log. Each participant has a copy of the ledger to every Hyperledger Fabric
network they belong to.
The world state component describes the state of the ledger at a given point in time. It’s the
database of the ledger. The transaction log component records all transactions which have
resulted in the current value of the world state; it’s the update history for the world state. The
ledger, then, is a combination of the world state database and the transaction log history.
The ledger has a replaceable data store for the world state. By default, this is a LevelDB key-
value store database. The transaction log does not need to be pluggable. It simply records the
before and after values of the ledger database being used by the blockchain network.
2.3.2 Smart Contracts
Hyperledger Fabric smart contracts are written in chaincode and are invoked by an
application external to the blockchain when that application needs to interact with the ledger.
In most cases, chaincode interacts only with the database component of the ledger, the world
state (querying it, for example), and not the transaction log.
Chaincode can be implemented in several programming languages. Currently, Go and Node
are supported.

13
2.3.3 Consensus
Transactions must be written to the ledger in the order in which they occur, even though they
might be between different sets of participants within the network. For this to happen, the
order of transactions must be established and a method for rejecting bad transactions that
have been inserted into the ledger in error (or maliciously) must be put into place.
This is a thoroughly researched area of computer science, and there are many ways to achieve
it, each with different trade-offs. For example, PBFT (Practical Byzantine Fault Tolerance)
can provide a mechanism for file replicas to communicate with each other to keep each copy
consistent, even in the event of corruption. Alternatively, in Bitcoin, ordering happens
through a process called mining where competing computers race to solve a cryptographic
puzzle which defines the order that all processes subsequently build upon.
Hyperledger Fabric has been designed to allow network starters to choose a consensus
mechanism that best represents the relationships that exist between participants. As with
privacy, there is a spectrum of needs; from networks that are highly structured in their
relationships to those that are more peer-to-peer.
2.3.4 Blockchain Network
A blockchain network is a technical infrastructure that provides ledger and smart contract
(chaincode) services to applications. Primarily, smart contracts are used to generate
transactions which are subsequently distributed to every peer node in the network where they
are immutably recorded on their copy of the ledger. The users of applications might be end
users using client applications or blockchain network administrators.
In most cases, multiple organizations come together as a consortium to form the network and
their permissions are determined by a set of policies that are agreed by the consortium when
the network is originally configured. Moreover, network policies can change over time
subject to the agreement of the organizations in the consortium.
2.3.5 Identity
The different actors in a blockchain network include peers, orderers, client applications,
administrators and more. Each of these actors — active elements inside or outside a network
able to consume services — has a digital identity encapsulated in an X.509 digital certificate.
These identities really matter because they determine the exact permissions over resources
and access to information that actors have in a blockchain network.
A digital identity furthermore has some additional attributes that Fabric uses to determine
permissions, and it gives the union of an identity and the associated attributes a special name
— principal. Principals are just like userIDs or groupIDs, but a little more flexible because
they can include a wide range of properties of an actor’s identity, such as the actor’s
organization, organizational unit, role or even the actor’s specific identity. When we talk
about principals, they are the properties which determine their permissions.
For an identity to be verifiable, it must come from a trusted authority. A membership service
provider (MSP) is that trusted authority in Fabric. More specifically, an MSP is a component
that defines the rules that govern the valid identities for this organization. The default MSP

14
implementation in Fabric uses X.509 certificates as identities, adopting a traditional Public
Key Infrastructure (PKI) hierarchical model.
2.3.6 MSP
Because Fabric is a permissioned network, blockchain participants need a way to prove their
identity to the rest of the network in order to transact on the network. Certificate Authorities
issue identities by generating a public and private key which forms a key-pair that can be
used to prove identity. Because a private key can never be shared publicly, a mechanism is
required to enable that proof which is where the MSP comes in.
Despite its name, the Membership Service Provider does not actually provide anything.
Rather, the implementation of the MSP requirement is a set of folders that are added to the
configuration of the network and is used to define an organization both inwardly
(organizations decide who its admins are) and outwardly (by allowing other organizations to
validate that entities have the authority to do what they are attempting to do). Whereas
Certificate Authorities generate the certificates that represent identities, the MSP contains a
list of permissioned identities.
The MSP identifies which Root CAs and Intermediate CAs are accepted to define the
members of a trust domain by listing the identities of their members, or by identifying which
CAs are authorized to issue valid identities for their members.
But the power of an MSP goes beyond simply listing who is a network participant or member
of a channel. It is the MSP that turns an identity into a role by identifying specific privileges
an actor has on a node or channel. Note that when a user is registered with a Fabric CA, a role
of admin, peer, client, orderer, or member must be associated with the user. For example,
identities registered with the “peer” role should, naturally, be given to a peer. Similarly,
identities registered with the “admin” role should be given to organization admins.
2.3.7 MSP domains
MSPs occur in two domains in a blockchain network:
 Locally on an actor’s node (local MSP)
 In channel configuration (channel MSP)
The key difference between local and channel MSPs is not how they function – both turn
identities into roles – but their scope. Each MSP lists roles and permissions at a particular
level of administration.
2.3.8 Policies
At its most basic level, a policy is a set of rules that define the structure for how decisions are
made and specific outcomes are reached. To that end, policies typically describe a who and a
what, such as the access or rights that an individual has over an asset. Policies are one of the
things that make Hyperledger Fabric different from other blockchains like Ethereum or
Bitcoin. In those systems, transactions can be generated and validated by any node in the
network. The policies that govern the network are fixed at any point in time and can only to
be changed using the same process that governs the code. Because Fabric is a permissioned
blockchain whose users are recognized by the underlying infrastructure, those users have the

15
ability to decide on the governance of the network before it is launched, and change the
governance of a running network.
Policies allow members to decide which organizations can access or update a Fabric network,
and provide the mechanism to enforce those decisions. Policies contain the lists of
organizations that have access to a given resource, such as a user or system chaincode. They
also specify how many organizations need to agree on a proposal to update a resource, such
as a channel or smart contracts. Once they are written, policies evaluate the collection of
signatures attached to transactions and proposals and validate if the signatures fulfill the
governance agreed to by the network.
Policies are implemented at different levels of a Fabric network. Each policy domain governs
different aspects of how a network operates.

Figure 1 Hyperledger fabric policy hierarchy [1]

2.3.9 System channel configuration


Every network begins with an ordering system channel. There must be exactly one ordering
system channel for an ordering service, and it is the first channel to be created. The system
channel also contains the organizations who are the members of the ordering service
(ordering organizations) and those that are on the networks to transact (consortium
organizations).
The policies in the ordering system channel configuration blocks govern the consensus used
by the ordering service and define how new blocks are created. The system channel also
governs which members of the consortium are allowed to create new channels.

16
17
2.3.10 Application channel configuration
Application channels are used to provide a private communication mechanism between
organizations in the consortium.
The policies in an application channel govern the ability to add or remove members from the
channel. Application channels also govern which organizations are required to approve a
chaincode before the chaincode is defined and committed to a channel using the Fabric
chaincode lifecyle. When an application channel is initially created, it inherits all the ordering
service parameters from the orderer system channel by default. However, those parameters
(and the policies governing them) can be customized in each channel.
2.3.11 Access control lists (ACLs)
Network administrators will be especially interested in the Fabric use of ACLs, which
provide the ability to configure access to resources by associating those resources with
existing policies. These “resources” could be functions on system chaincode (e.g.,
“GetBlockByNumber” on the “qscc” system chaincode) or other resources (e.g.,who can
receive Block events). ACLs refer to policies defined in an application channel configuraton
and extends them to control additional resources.
2.3.12 Smart contract endorsement policies
Every smart contract inside a chaincode package has an endorsement policy that specifies
how many peers belonging to different channel members need to execute and validate a
transaction against a given smart contract in order for the transaction to be considered valid.
Hence, the endorsement policies define the organizations (through their peers) who must
“endorse” (i.e., approve of) the execution of a proposal.
2.3.13 Modification policies
There is one last type of policy that is crucial to how policies work in Fabric, the
Modification policy. Modification policies specify the group of identities required to sign
(approve) any configuration update. It is the policy that defines how the policy is updated.
Thus, each channel configuration element includes a reference to a policy which governs its
modification.

18
2.3.14 The Fabric policy domains
While Fabric policies are flexible and can be configured to meet the needs of a network, the
policy structure naturally leads to a division between the domains governed by either the
Ordering Service organizations or the members of the consortium. In the following diagram
you can see how the default policies implement control over the Fabric policy domains

Figure 2 Hyperledger Fabric Policy Hierarchy showcasing control implementation. [1]


below.

2.3.15 Peers
A blockchain network is comprised primarily of a set of peer nodes (or, simply, peers). Peers
are a fundamental element of the network because they host ledgers and smart contracts.
Recall that a ledger immutably records all the transactions generated by smart contracts
(which in Hyperledger Fabric are contained in a chaincode, more on this later). Smart
contracts and ledgers are used to encapsulate the shared processes and shared information in a
network, respectively.
Peers can be created, started, stopped, reconfigured, and even deleted. They expose a set of
APIs that enable administrators and applications to interact with the services that they
provide.

19
Figure 3 Peers in a network [1]
A blockchain network is comprised of peer nodes, each of which can hold copies of ledgers
and copies of smart contracts. In this example, the network N consists of peers P1, P2 and P3,
each of which maintain their own instance of the distributed ledger L1. P1, P2 and P3 use the
same chaincode, S1, to access their copy of that distributed ledger.
We can see that it’s the peer that hosts both the ledger and chaincode. More accurately, the
peer actually hosts instances of the ledger, and instances of chaincode.
A peer is able to host more than one ledger, which is helpful because it allows for a flexible
system design. The simplest configuration is for a peer to manage a single ledger, but it’s
absolutely appropriate for a peer to host two or more ledgers when required.
There isn’t a fixed relationship between the number of ledgers a peer has and the number of
chaincodes that can access that ledger. A peer might have many chaincodes and many ledgers
available to it.
Applications always connect to peers when they need to access ledgers and chaincodes. The
Fabric Software Development Kit (SDK) makes this easy for programmers — its APIs enable
applications to connect to peers, invoke chaincodes to generate transactions, submit
transactions to the network that will get ordered, validated and committed to the distributed
ledger, and receive events when this process is complete.
Through a peer connection, applications can execute chaincodes to query or update a ledger.
The result of a ledger query transaction is returned immediately, whereas ledger updates
involve a more complex interaction between applications, peers and orderers.

20
Figure 4 Elements in a blockchain and how they interact together

Peers, in conjunction with orderers, ensure that the ledger is kept up-to-date on every peer. In
this example, application A connects to P1 and invokes chaincode S1 to query or update the
ledger L1. P1 invokes S1 to generate a proposal response that contains a query result or a
proposed ledger update. Application A receives the proposal response and, for queries, the
process is now complete. For updates, A builds a transaction from all of the responses, which
it sends to O1 for ordering. O1 collects transactions from across the network into blocks, and
distributes these to all peers, including P1. P1 validates the transaction before committing to
L1. Once L1 is updated, P1 generates an event, received by A, to signify completion.
2.3.16 The Ledger
In Hyperledger Fabric, a ledger consists of two distinct, though related, parts – a world state
and a blockchain. Each of these represents a set of facts about a set of business objects.
Firstly, there’s a world state – a database that holds current values of a set of ledger states.
The world state makes it easy for a program to directly access the current value of a state
rather than having to calculate it by traversing the entire transaction log. Ledger states are, by
default, expressed as key-value pairs. The world state can change frequently, as states can be
created, updated and deleted.
Secondly, there’s a blockchain – a transaction log that records all the changes that have
resulted in the current the world state. Transactions are collected inside blocks that are
appended to the blockchain – enabling you to understand the history of changes that have
resulted in the current world state. The blockchain data structure is very different to the world
state because once written, it cannot be modified; it is immutable.
2.3.17 Namespaces
Each chaincode has its own world state that is separate from all other chaincodes. World
states are in a namespace so that only smart contracts within the same chaincode can access a
given namespace. A blockchain is not namespaced. It contains transactions from many
different smart contract namespaces.
2.3.18 Channels

21
In Hyperledger Fabric, each channel has a completely separate ledger. This means a
completely separate blockchain, and completely separate world states, including namespaces.
It is possible for applications and smart contracts to communicate between channels so that
ledger information can be accessed between them.
2.3.19 The Ordering Service
What is ordering?
Many distributed blockchains, such as Ethereum and Bitcoin, are not permissioned, which
means that any node can participate in the consensus process, wherein transactions are
ordered and bundled into blocks. Because of this fact, these systems rely on probabilistic
consensus algorithms which eventually guarantee ledger consistency to a high degree of
probability, but which are still vulnerable to divergent ledgers (also known as a ledger
“fork”), where different participants in the network have a different view of the accepted
order of transactions.
Hyperledger Fabric works differently. It features a node called an orderer (it’s also known as
an “ordering node”) that does this transaction ordering, which along with other orderer nodes
forms an ordering service. Because Fabric’s design relies on deterministic consensus
algorithms, any block validated by the peer is guaranteed to be final and correct. Ledgers
cannot fork the way they do in many other distributed and permissionless blockchain
networks.
In addition to promoting finality, separating the endorsement of chaincode execution (which
happens at the peers) from ordering gives Fabric advantages in performance and scalability,
eliminating bottlenecks which can occur when execution and ordering are performed by the
same nodes.
In addition to their ordering role, orderers also maintain the list of organizations that are
allowed to create channels. This list of organizations is known as the “consortium”, and the
list itself is kept in the configuration of the “orderer system channel” (also known as the
“ordering system channel”). By default, this list, and the channel it lives on, can only be
edited by the orderer admin. Note that it is possible for an ordering service to hold several of
these lists, which makes the consortium a vehicle for Fabric multi-tenancy.
Orderers also enforce basic access control for channels, restricting who can read and write
data to them, and who can configure them. Remember that who is authorized to modify a
configuration element in a channel is subject to the policies that the relevant administrators
set when they created the consortium or the channel. Configuration transactions are processed
by the orderer, as it needs to know the current set of policies to execute its basic form of
access control. In this case, the orderer processes the configuration update to make sure that
the requestor has the proper administrative rights. If so, the orderer validates the update
request against the existing configuration, generates a new configuration transaction, and
packages it into a block that is relayed to all peers on the channel. The peers then processs the
configuration transactions in order to verify that the modifications approved by the orderer do
indeed satisfy the policies defined in the channel.

22
Figure 5 Example of the first role of an ordering node. [1]

The first role of an ordering node is to package proposed ledger updates. In this example,
application A1 sends a transaction T1 endorsed by E1 and E2 to the orderer O1. In parallel,
Application A2 sends transaction T2 endorsed by E1 to the orderer O1. O1 packages
transaction T1 from application A1 and transaction T2 from application A2 together with
other transactions from other applications in the network into block B2. We can see that in
B2, the transaction order is T1,T2,T3,T4,T6,T5 – which may not be the order in which these
transactions arrived at the orderer! (This example shows a very simplified ordering service
configuration with only one ordering node.)

Figure 6 Second Role of an ordering node. [1]

The second role of an ordering node is to distribute blocks to peers. In this example, orderer
O1 distributes block B2 to peer P1 and peer P2. Peer P1 processes block B2, resulting in a
new block being added to ledger L1 on P1. In parallel, peer P2 processes block B2, resulting
in a new block being added to ledger L1 on P2. Once this process is complete, the ledger L1
has been consistently updated on peers P1 and P2, and each may inform connected
applications that the transaction has been processed.

23
Section 2.4 Related Work
2.4.1 Scientific Papers
Blockchain in Education: Introduction and Critical Review of the State of
Art
This state of art attempts to provide references and links that help to know better and reflect
about this new technology, as well as to contribute starting the indispensable debate about
how education would implement this, and in what terms.

Blockchain-Based Applications in Education: A Systematic Review


This article is a systematic review of research investigating blockchain-based educational
applications. It focuses on three main themes: (1) educational applications that have been
developed with blockchain technology, (2) benefits that blockchain technology could bring to
education, and (3) challenges of adopting blockchain technology in education. A detailed
results analysis of each theme was conducted as well as an intensive discussion based on the
findings. This review also offers insight into other educational areas that could benefit from
blockchain technology.

A Review of Blockchain based Educational Projects


Blockchain is a decentralized and shared distributed ledger that records the transaction
history done by totally different nodes within the whole network. The technology is
practically used in the field of education for record-keeping, digital certification, etc. There
have already been several papers published on this, but no one can't find a single paper
covering the blockchain-based educational projects. So, There is a gap of latest trends to
education. Blockchain-based educational projects resolve the issues of today's educators. On
that basis, we conclude that there is a need for conducting a systematic literature review. This
study, therefore, reviews the artistic gap between these two based on educational projects. For
this purpose, the paper focuses on exploring some block-chain based projects and protocols
that are used in these projects. It also analyses the block-chain features that are being used
and the services are offered by the existing educational projects using block-chain features to
improve the execution of this technology in education.

24
2.4.2 Applications
Blockcerts
Blockcerts is an open standard for building apps that issue and verify blockchain-based
official records. These may include certificates for civic records, academic credentials,
professional licenses, workforce development, and more.
Blockcerts consists of open-source libraries, tools, and mobile apps enabling a decentralized,
standards-based, recipient-centric ecosystem, enabling trustless verification through
blockchain technologies.
Blockcerts uses and encourages consolidation on open standards. Blockcerts is committed to
self-sovereign identity of all participants, and enabling recipient control of their claims
through easy-to-use tools such as the certificate wallet (mobile app). Blockcerts is also
committed to availability of credentials, without single points of failure.
These open-source repos may be utilized by other research projects and commercial
developers. It contains components for creating, issuing, viewing, and verifying certificates
across any blockchain. These components form all the parts needed for a complete
ecosystem. How it Works?

Figure 7 How Blockcerts Works [2]

25
Sony Global Eductaion
Sony Global Education is a subsidiary of Sony Corporation and Sony Computer Science
Labs, Inc. Founded in 2015, its mission is “to provide a range of unifying, non-traditional
services that inspire a passion for learning across the world and that offer the opportunity
to act on this passion, and to create a new educational infrastructure for a connected
society.” In order to make this a reality, Sony Global Education will continue to roll out
new educational experiences that stimulate learners’ curiosity and will continue to
actively pursue partnerships with others who share its passion for education.

In phase one, Sony and a selected technology partner researched permissioned blockchains
that could support a consortium of collaborators. They identified the need to use smart
contracts for managing data access, data partitioning to keep some information hidden
from some collaborators while exposing it to others, and an open source platform to avoid
vendor lock in. This phase concluded with a decision to use Hyperledger Fabric, which is a
blockchain framework and one of the Hyperledger projects hosted by The Linux Foundation.
The evaluation team selected Hyperledger Fabric because it is a general-purpose business
platform and open source project that can support smart contracts via chaincode and
data partitioning via channels. The team had considered other platforms, but eliminated
them from the running over concerns about security aspects like data access control as
well as concerns about being ready to withstand actual operation. Hyperledger Fabric was
also selected because it allows for more flexible data models and business logic compared
to other blockchain solutions. When Hyperledger Fabric v1.0 was released, the team was
confident that it could meet all of the team’s requirements.
In phase two, Sony Global Education created a prototype of the credentials platform using
Hyperledger Fabric hosted on a secure cloud within a short period of time. A proven
agile methodology was used to flexibly incorporate the requirements and implement a
variety of use cases. This prototype helped the evaluation
team determine that the technology did indeed provide all the functionality necessary for
building a next-generation credentials platform.
Now in phase three, Sony Global Education plans to put the credentials platform to
the test by using it to manage educational data generated by 250,000 participants in
a world wide math competition called Global Math Challenge, which is held online and

26
hosted by Sony Global Education. This competition, now in its 4th year, is the world’s
first widely accessible, global-scale mathematics contest. The data it generates includes
transcripts, global rankings, and test analysis that gives participants unique insights into
their thinking process and actionable advice on how to improve. The authenticity of the
transcript from this challenge will be checked on the credentials platform.

Figure 8 SGE's proposed application in cooperation with Hyperledger fabric

27
ODEM
ODEM is an on-demand education marketplace that
connects students, educators, and universities or
accredited entities where, together, they develop and
engage in personal and group in-person educational
programs. It is a decentralized, blockchain-based platform
that provides a single, trusted, and worldwide network
that integrates all levels of the education supply chain.

Usability/benefits of ODEM for students, educators, and


universities and training providers:
 Blockchain technology forms the foundation of the ODEM platform. The platform
also uses artificial intelligence for various purposes that benefits all stakeholders
involved. Below are some remarkable benefits that ODEM provides for students,
educators, and service providers:
 Blockchain technology serves to link all the moving parts related to organizing,
administering, and sharing information about program offerings.
 Artificial intelligence helps to seamlessly manage complex requests, organizing
complete educational programs around the world.
 AI also helps discover and match students and service providers based on pre-set
requirements.
 Students and other education buyers can easily research and find the perfect
curriculum from educators around the world.
 For educators, it increases their visibility among all education buyers, generates real-
time feedback on programs, and pays incentives for the development of relevant
programs.
 The platform reduces costs and improves access to premium education by directly
connecting educators with students eliminating inefficient and costly intermediaries.
 Students can see an educator’s full credentials and teaching history as identity and
reputation are carefully managed with public and private profiles.
 ODEM’s Ethereum smart contracts ensure painless cross-border payments across all
currencies and instill trust when managing international transactions.
 Both students and educators are incentivized with ODEM Tokens to continually
increase the quality of their program content.
Besides the above benefits, the ODEM platform allows students to select their desired
programs and take courses that are designed by employers seeking specific skill sets.
Students can tailor their study schedule to their lifestyle and learning preferences. They can
choose in-person courses, online-interactive training, or a blended learning format. Students
can store their academic records on the Ethereum blockchain, a decentralized file storage
system accessible from the ODEM platform. Education transcripts and credentials on the
blockchain are controlled and owned by students, so they can instantly verify and share their
qualifications with future employers and recruiters.
ODEM works with employers who are actively looking for new talent. Employers use the
ODEM platform as a recruiting tool based on verified academic or work experience records.
So students can fill out their career profile with the ODEM Skills Wizard to view which

28
skillsets match their competencies in the current job market and get hired by the suitable
employers from the ODEM platform.
Above all, what is even more exciting is ODEM is absolutely free and can be accessed on all
iOS, Android, Web, and Desktop platforms.

29
Figure 9 ODEM Services

30
Chapter 3 System Analysis & Design
In this chapter, the software development phases will be discussed in details. First, the
system requirements will be determined, then the diagrams will be generated according
to the system requirements. After these phases are complete, we will be ready to start
the implementation process. This process involves the programming phase. After
completing these tasks the software will be ready.

31
Section 3.1 Product Functionality
Section 3.2 Requirements
3.2.1 Functional Requirements
 Register new students
 Academic Staff should be able to submit grades of students
 Student view his information
 Student should be able to self-register
 Admin Register Academic Staff
 Admin should be able to add/update courses
 Academic advisor should be able to register students
 Implementing rubric rules when it comes to registering students
 Each branch Implements a different CA
 Network shouldn’t have a single point of failure
3.2.2 Non-functional Requirements
 20 tps throughput
 System scalability
 Immutability
 Inter-operability

32
Section 3.3 Design – Diagrams
3.3.1 UseCase Diagram

Figure 10 System UseCase Diagram

33
3.3.2 Sequence Diagrams
Student Enrolment

Figure 11 Sequence Diagram of Student Enrolment Process

Student Registration

Figure 12 Sequence Diagram of Student Registration Process

34
TA Registration

Figure 13 Sequence Diagram of TA Enrolment Process

35
3.3.3 Architecture Diagram

Figure 14 Architecture Diagram of the System

36
3.3.4 Smart Contracts Diagram

Figure 15 Smart Contracts implemented in the system

37
Chapter 4 Methodology & Implementation
Chapter 4 describes the front end and the back-end methodology and implementation
of the proof of concept prototype.

38
Section 4.1 Technologies Used
4.1.1 React.js
React.js is an open-source JavaScript library that is used for building user interfaces
specifically for single-page applications. It’s used for handling the view layer for web and
mobile apps. React also allows us to create reusable UI components. React was first created
by Jordan Walke, a software engineer working for Facebook. React first deployed on
Facebook’s newsfeed in 2011 and on Instagram.com in 2012.
React allows developers to create large web applications that can change data, without
reloading the page. The main purpose of React is to be fast, scalable, and simple. It works
only on user interfaces in the application. This corresponds to the view in the MVC template.
It can be used with a combination of other JavaScript libraries or frameworks, such as
Angular JS in MVC.
React JS is also called simply to React or React.js.
React.js properties includes the following:

4.1.2 Node.js
Node.js® is a JavaScript runtime built on Chrome’s V8 JavaScript engine.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
Node.js’ package ecosystem, npm, is the largest ecosystem of open source libraries in the
world.
Node.js came into existence when the original developers of JavaScript extended it from
something you could only run in the browser to something you could run on your machine as
a standalone application. Now you can do much more with JavaScript than just making

39
websites interactive. JavaScript now has the capability to do things that other scripting
languages like Python can do. Both your browser JavaScript and Node.js run on the V8
JavaScript runtime engine. This engine takes your JavaScript code and converts it into a
faster machine code. Machine code is low-level code which the computer can run without
needing to first interpret it.

4.1.3 MongoDB
MongoDB is a document database with the scalability and flexibility that you want with the
querying and indexing that you need.
MongoDB stores data in flexible, JSON-like documents, meaning fields can vary from
document to document and data structure can be changed over time.
The document model maps to the objects in your application code, making data easy to work
with.
Ad hoc queries, indexing, and real time aggregation provide powerful ways to access and
analyze your data.
MongoDB is a distributed database at its core, so high availability, horizontal scaling, and
geographic distribution are built in and easy to use.
MongoDB is free to use. Versions released prior to October 16, 2018 are published under the
AGPL. All versions released after October 16, 2018, including patch fixes for prior versions,
are published under the Server Side Public License (SSPL) v1.

40
4.1.4 HyperLedger Fabric
The Linux Foundation founded the Hyperledger project in 2015 to advance cross-industry
blockchain technologies. Rather than declaring a single blockchain standard, it encourages a
collaborative approach to developing blockchain technologies via a community process, with
intellectual property rights that encourage open development and the adoption of key
standards over time.
Hyperledger Fabric is one of the blockchain projects within Hyperledger. Like other
blockchain technologies, it has a ledger, uses smart contracts, and is a system by which
participants manage their transactions.
Where Hyperledger Fabric breaks from some other blockchain systems is that it is private and
permissioned. Rather than an open permissionless system that allows unknown identities to
participate in the network (requiring protocols like “proof of work” to validate transactions
and secure the network), the members of a Hyperledger Fabric network enroll through a
trusted Membership Service Provider (MSP).
Hyperledger Fabric also offers several pluggable options. Ledger data can be stored in
multiple formats, consensus mechanisms can be swapped in and out, and different MSPs are
supported.
Hyperledger Fabric also offers the ability to create channels, allowing a group of participants
to create a separate ledger of transactions. This is an especially important option for networks
where some participants might be competitors and not want every transaction they make — a
special price they’re offering to some participants and not others, for example — known to
every participant. If two participants form a channel, then those participants — and no others
— have copies of the ledger for that channel.

41
Section 4.2 Methodology
System Overview Diagram

Figure 16 System Overview Diagram

The diagram shows an overview of how our system works. The frontend interacts with the
backend and the backend in turn interacts with the blockchain. Interactions are through
requests and responses sent in JSON format.

42
Section 4.3 Front-end

Figure 17 Registering Courses Page

Figure 18 Submitting Grades Page

43
Figure 19 Viewing Transcript Page

Figure 20 Sending a request to view transcript page

44
Section 4.4 Blockchain
4.4.1 Creating the Network
Block Specification

figure 1

figure 1 determines all the operations regarding each block,

BatchTimeOut: time to wait before commiting the block to the blockchain, this is crucial to calibrate
accurately for if it is too low, peers will fail to catch up, and if it is too high it will cause an
unnecessary bottle neck, this is also directly relatable to MaxMessagesCount.

MaxMessageCount: the maximum number of messages or records to save in each block, this has to
be as large as the network allows for, because it highly influences performance, a block may have
lower but not higher number of messages

AbsoluteMaxBytes: the absolute maximum number of serialized messages allowed in a block.

PreferredMaxBytes: the optimal number of messages in a block.

45
CA Definition

Figure 2

Figure 2 shows the virtual machines responsible for certificate authorities for each
organization among with port numbers and commands responsible for setting each virtual
machine

46
Network
1. Network up
a. Create orgs
b. Create consortium
c. Docker create network
2. Create Channels
a. Create channel tx
b. Create anchor peer tx
c. Create channel
d. Join channel
e. Update anchor peer
3. Deploy chain code
a. Package chaincode
b. Install chaincode
c. Approve chaincode definition
d. Commit chaincode
e. Query commited

Application
1. Configure connection
a. App utils
b. Connectorgs (bash script )
c. Gateway connection
2. Interface
a. Chaincode
i. Business rules
ii. Helper functions
iii. Implement functions
3. Web server
a. Handle requests/responses
b. Parse json
c. Call chaincode functions
4. Client
a. Handle requests
b. Style
c. Parse json

Network
4. Network up

47
a. Create orgs
i. create virtual machines for certificate authorities from
“network/docker/docker-compose-ca.yaml”
ii.

b. Create consortium
i. A consortium defines roles of all the organizations or virtual machines and it
is defined in “network/configtx/configtx.yaml”

48
ii.

c. Docker create network


i. Create virtual machines for main organizations from the
“network/docker/docker-compose-net.yaml”

49
d.

e.
5. Create Channels
a. Create Application channel for each channel
b.

c. Create anchor peer tx


i. Achor peer is the part that allows for interaction between peers

50
d.

e. Create channel
i. Create channels for peers to join
ii.

f. Join channel
i. Each peer joins the channel
ii.

g. Update anchor peer


i. After joining, the achor peers need to be updated to accommodate for the
newly joined peers

51
ii.

6. Deploy chain code


a. Package chaincode
i. Chaincode is packed to facilitate installation
ii.

b. Install chaincode
i. Each peer installs chaincode
ii.

c. Approve chaincode definition


i. Each peer approve chaincode
ii.

d. Commit chaincode

52
i.

e. Query commited
f.

Chapter 5 Conclusion
5. 1 Summary
In chapter 4 we discussed the front end and the back end of our application.
Inchapter 5 we will provide a conclusion to our experiences working on this
project and the things we hope to implement in the future.

53
54
Section 5.1 Future Work
Implementing the process of transferring from one college to another within the
same university or to a new university altogether as well as offering multiple
blockchain support
Section 5.2 Conclusion
Educatiom is vital for the betterment of society therefore ensuring that the
education systems are kept up to date with the latest technologies is paramount.
Working on this project is a first step towards helping achieve that. It was quite
a challengine experience but has gicen us the chance to learn new skills and
further develop our skill sets.

55
ARAB ACADEMY FOR SCIENCE, TECHNOLOGY, AND
MARITIME TRANSPORT
COLLEGE OF COMPUTING AND INFORMATION TECHNOLOGY
Academic Year: 2020/2021 Semester: 8th semester of October
Senior Project Summary Report
Project Title Applications of Blockchain in
Education
Supervisor(s) Prof. Dr. Ayman Adel
Dr. Yasmine Nagi
Team Members Names: Registration Numders:
Assem Makhyon 17102070
Ahmed Amgad 16100770
Mohamed Nasser 16101293
Muhammed Imam 16200119
Lama Aly Anwar 16102475

Project Deliverables This project aims to implement an


educational system using blockchain
technology.
Ethical Considerations Data is privileged to authorised users.
Social Impact Our application will reduce the rates
of fraud in the educational sector.
Professional Responsibility Assem Makhyon: Programming and
Software Development
Ahmed Amgad:
Mohamed Nasser:
Muhammed Imam: Programming and
Software Development
Lama Aly Anwar: Programming and
Software Development

Supervisor Name Signature

56
References
1. hyperledger-fabricdocs Documentation Release master by
hyperledger [1]
2. Kalogeropoulos, Anastasios. (2018). A Reference Architecture for
Blockchain-based Resource-intensive Computations managed by
Smart Contracts.
3. GRADUBIQUE: AN ACADEMIC TRANSCRIPT DATABASE
USING BLOCKCHAIN ARCHITECTURE by Thinh Nguyen, San
Jose State University (Fall 12-14-2018)
4. Blockchain in Education Report By Alexander Grech and
Anthony F. Camilleri
5. An Overview of Blockchain for Higher Education Research Paper By
Timothy Arndt
6. ‫الجهاز المركزي للتعبئة العامة واإلحصاء‬
i. ‫ خريجو‬: ‫اسم النشرة‬
‫الجامعات والمعاهد العليا‬
2019 ‫عام‬
7. Cyberattack 101: Why Hackers Are Going After Universities By
Keith Wagstaff and Chiara A Sottile (2015)
8. Business Data Processing Occupational Performance Survey: Interim
Report
9. Bartolomé, Antonio & Torlà, Carles & Castañeda, Linda & Adell,
Jordi. (2017). BLOCKCHAIN IN EDUCATION: INTRODUCTION
AND CRITICAL REVIEW OF THE STATE OF THE ART. 61.
10.21556/edutec.2017.61.
10.Ethereum: Platform Review - Opportunities and Challenges for
Private and Consortium Blockchains By Vitalik Buterin
11.Alammary A, Alhazmi S, Almasri M, Gillani S. Blockchain-Based
Applications in Education: A Systematic Review. Applied Sciences.
2019; 9(12):2400. https://doi.org/10.3390/app9122400
12.Hameed, Bushra & Khan, Muhammad Murad & Numan, Abdul &
Ahmed, Muhammad & Talib, M & Ashfaq, Faiza & Usman, Hafiz &
Yousaf, M. (2019). A Review of Blockchain based Educational
Projects. International Journal of Advanced Computer Science and
Applications. 10.
13.Blockcerts https://www.blockcerts.org/guide/ [2]
14.Sony Global Education https://blockchain.sonyged.com/
15.ODEM https://odem.cloud/

57

You might also like