0% found this document useful (0 votes)
40 views

E Voting System Using Ethereum Blockchain-DOCUMENT

Uploaded by

karthikcln2309
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

E Voting System Using Ethereum Blockchain-DOCUMENT

Uploaded by

karthikcln2309
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 69

E VOTING SYSTEM USING ETHEREUM BLOCKCHAIN

ABSTRACT
ABSTRACT

In this project we are implementing Blockchain based E-Voting system which


works as a decentralized server where multiple nodes will maintain user’s voting
details and if one node crashed or down then users can get voting details from
other working nodes. In existing centralized server voting details were managing in
single server and if this server hacked or down then all voting details will be
unavailable and this server can be attacked or hacked and can alter vote counting
data. Blockchain storage support immutable data storage which means data cannot
be alter or hacked as each node in the Blockchain will verify each Block storage
with the help of hashcodes and if verification failed then Blockchain or users will
get notification of data changed.
TABLE OF CONTENTS

S.NO CONTENT PGNO


1 Introduction
1.1 Software requirements
1.2 Hardware requirements
2 Feasibility study
2.1 Economic feasibility
2.2 Technical feasibility
2.3 Social feasibility
3 Literature survey
4 System analysis
4.1 Existing system
4.1.1 Disadvantages of existing system
4.2 Proposed system
4.2.1 Advantages of proposed system
4.3 Functional requirements
4.4 Non-Functional requirements
5 System design
5.1 System architecture
5.2 UML diagrams
6 Implementation
6.1 Modules
6.2 Sample code
7 Software environment
8 System testing
8.1 Testing strategies
8.2 Test cases
9 Screens
10 Conclusion
11 References
LIST OF FIGURE

FIG.NO FIG.NAME PG.NO


5.1.1 System architecture
5.1.2 Dataflow diagram
5.2.1 Usecase diagram
5.2.2 Class diagram
5.2.3 Activity diagram
5.2.4 Sequence diagram
5.2.5 Collaboration diagram
5.2.6 Component diagram
5.2.7 Deployment diagram
INTRODUCTION

1.INTRODUCTION
Every six out of ten country is a democracy. Election plays an important role in
democracy. It gives the rights to the citizen to elect the leader and the country’s
representative, But the process of voting is flawed as the voting infrastructure is
not using a proper architecture. The voting machines that are used in almost all the
democracies are centralized i.e, a particular person or community controls and
analyses the collected data from the voting process. Which makes the process
vulnerable to many flaws in the system and lack of transparency to the voters. To
overcome this situation and to empower the democracy the Blockchain technology
can be used. The blockchain technology provides a decentralized and distributed
architecture for development of applications. The ethereum community introduced
the concept of decentralized applications which uses the blockchain technology to
create an app. The major difference between a centralized and a decentralized
application is, In decentralized application instead of using the traditional database
at its backend the blockchain is used. Blockchain serves as the decentralized and
distributed database system which uses cryptography for the storage of information
which helps in storage of immutable data. The Blockchain technology provides a
peer to peer communication and eliminates the third party. Initially the blockchain
technology was used in cryptocurrencies but the introduction of decentralized
applications have opened a door of opportunities for the exploitation of the
blockchain technology. As already mentioned, with its unique distributed ,
decentralized and distributed architecture the blockchain technology may resolve
many issues in the digital age and it may help in the implementation of an e-voting
platform which is not mostly used do to the presence of many threats in the web
like hackers and security issues so with the introduction of decentralized
application a secure, safe, decentralized and distributed e-voting platform can be
implemented which will be free from all vulnerabilities and threats and yet keep
the voters vote and identity intact.

1.1 SOFTWARE REQUIREMENTS

Software requirements deal with defining software resource requirements and


prerequisites that need to be installed on a computer to provide optimal functioning
of an application. These requirements or prerequisites are generally not included in
the software installation package and need to be installed separately before the
software is installed.

Platform – In computing, a platform describes some sort of framework, either in


hardware or software, which allows software to run. Typical platforms include a
computer’s architecture, operating system, or programming languages and their
runtime libraries.

Operating system is one of the first requirements mentioned when defining system
requirements (software). Software may not be compatible with different versions
of same line of operating systems, although some measure of backward
compatibility is often maintained. For example, most software designed for
Microsoft Windows XP does not run on Microsoft Windows 98, although the
converse is not always true. Similarly, software designed using newer features of
Linux Kernel v2.6 generally does not run or compile properly (or at all) on Linux
distributions using Kernel v2.2 or v2.4.

APIs and drivers – Software making extensive use of special hardware devices,
like high-end display adapters, needs special API or newer device drivers. A good
example is DirectX, which is a collection of APIs for handling tasks related to
multimedia, especially game programming, on Microsoft platforms.
Web browser – Most web applications and software depending heavily on Internet
technologies make use of the default browser installed on system. Microsoft
Internet Explorer is a frequent choice of software running on Microsoft Windows,
which makes use of ActiveX controls, despite their vulnerabilities.

1)Visual Studio Community Version

2)Nodejs ( Version 12.3.1)

3)Python IDEL ( Python 3.7 )

1.2 HARDWARE REQUIREMENTS

The most common set of requirements defined by any operating system or


software application is the physical computer resources, also known as hardware,
A hardware requirements list is often accompanied by a hardware compatibility list
(HCL), especially in case of operating systems. An HCL lists tested, compatible,
and sometimes incompatible hardware devices for a particular operating system or
application. The following sub-sections discuss the various aspects of hardware
requirements.

Architecture – All computer operating systems are designed for a particular


computer architecture. Most software applications are limited to particular
operating systems running on particular architectures. Although architecture-
independent operating systems and applications exist, most need to be recompiled
to run on a new architecture. See also a list of common operating systems and their
supporting architectures.
Processing power – The power of the central processing unit (CPU) is a
fundamental system requirement for any software. Most software running on x86
architecture define processing power as the model and the clock speed of the CPU.
Many other features of a CPU that influence its speed and power, like bus speed,
cache, and MIPS are often ignored. This definition of power is often erroneous, as
AMD Athlon and Intel Pentium CPUs at similar clock speed often have different
throughput speeds. Intel Pentium CPUs have enjoyed a considerable degree of
popularity, and are often mentioned in this category.

Memory – All software, when run, resides in the random access memory (RAM)
of a computer. Memory requirements are defined after considering demands of the
application, operating system, supporting software and files, and other running
processes. Optimal performance of other unrelated software running on a multi-
tasking computer system is also considered when defining this requirement.

Secondary storage – Hard-disk requirements vary, depending on the size of


software installation, temporary files created and maintained while installing or
running the software, and possible use of swap space (if RAM is insufficient).

Display adapter – Software requiring a better than average computer graphics


display, like graphics editors and high-end games, often define high-end display
adapters in the system requirements.

Peripherals – Some software applications need to make extensive and/or special


use of some peripherals, demanding the higher performance or functionality of
such peripherals. Such peripherals include CD-ROM drives, keyboards, pointing
devices, network devices, etc.

1)Operating System : Windows Only


2)Processor : i5 and above

3)Ram : 4gb and above

4)Hard Disk : 50 GB
FEASIBILITY STUDY

2. FEASIBILITY STUDY
The feasibility of the project is analyzed in this phase and business
proposal is put forth with a very general plan for the project and some cost
estimates. During system analysis the feasibility study of the proposed system is
to be carried out. This is to ensure that the proposed system is not a burden to
the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.

Three key considerations involved in the feasibility analysis are

 ECONOMICAL FEASIBILITY
 TECHNICAL FEASIBILITY
 SOCIAL FEASIBILITY

2.1 ECONOMICAL FEASIBILITY

This study is carried out to check the economic impact that the system will
have on the organization. The amount of fund that the company can pour into the
research and development of the system is limited. The expenditures must be
justified. Thus the developed system as well within the budget and this was
achieved because most of the technologies used are freely available. Only the
customized products had to be purchased.

2.2 TECHNICAL FEASIBILITY


This study is carried out to check the technical feasibility, that is, the
technical requirements of the system. Any system developed must not have a high
demand on the available technical resources. This will lead to high demands on the
available technical resources. This will lead to high demands being placed on the
client. The developed system must have a modest requirement, as only minimal or
null changes are required for implementing this system.

2.3 SOCIAL FEASIBILITY

The aspect of study is to check the level of acceptance of the system by the
user. This includes the process of training the user to use the system efficiently.
The user must not feel threatened by the system, instead must accept it as a
necessity. The level of acceptance by the users solely depends on the methods that
are employed to educate the user about the system and to make him familiar with
it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.
LITERATURE SURVEY

3.LITERATURE SURVEY

3.1 Bitcoin: a peer-to-peer electronic cash system:


https://www.ussc.gov/sites/default/files/pdf/training/annual-national-training-seminar/2018/
Emerging_Tech_Bitcoin_Crypto.pdf

ABSTRACT: A purely peer-to-peer version of electronic cash would allow online


payments to be sent directly from one party to another without going through a
financial institution. Digital signatures provide part of the solution, but the main
benefits are lost if a trusted third party is still required to prevent double-spending.
We propose a solution to the double-spending problem using a peer-to-peer
network. The network timestamps transactions by hashing them into an ongoing
chain of hash-based proof-of-work, forming a record that cannot be changed
without redoing the proof-of-work. The longest chain not only serves as proof of
the sequence of events witnessed, but proof that it came from the largest pool of
CPU power. As long as a majority of CPU power is controlled by nodes that are
not cooperating to attack the network, they'll generate the longest chain and
outpace attackers. The network itself requires minimal structure. Messages are
broadcast on a best effort basis, and nodes can leave and rejoin the network at will,
accepting the longest proof-of-work chain as proof of what happened while they
were gone.

3.2 Ethereum: a secure decentralised generalised transaction ledger:

https://www.semanticscholar.org/paper/ETHEREUM%3A-A-SECURE-DECENTRALISED-GENERALISED-
LEDGER-Wood/da082d8dcb56ade3c632428bfccb88ded0493214

ABSTRACT: The blockchain paradigm when coupled with cryptographically-


secured transactions has demonstrated its utility through a number of projects, with
Bitcoin being one of the most notable ones. Each such project can be seen as a
simple application on a decentralised, but singleton, compute resource. We can call
this paradigm a transactional singleton machine with shared-state. Ethereum
implements this paradigm in a generalised manner. Furthermore it provides a
plurality of such resources, each with a distinct state and operating code but able to
interact through a message-passing framework with others. We discuss its design,
implementation issues, the opportunities it provides and the future hurdles we
envisage.

3.3 Smart contract templates: foundations, design landscape and research


directions:

https://www.researchgate.net/publication/
305779577_Smart_Contract_Templates_foundations_design_landscape_and_research_directions_CDCl
ack_VABakshi_and_LBraine_arxiv160800771_2016

ABSTRACT: In this position paper, we consider some foundational topics


regarding smart contracts (such as terminology, automation, enforceability, and
semantics) and define a smart contract as an agreement whose execution is both
automatable and enforceable. We explore a simple semantic framework for smart
contracts, covering both operational and non-operational aspects. We describe
templates and agreements for legally-enforceable smart contracts, based on legal
documents. Building upon the Ricardian Contract triple, we identify operational
parameters in the legal documents and use these to connect legal agreements to
standardised code. We also explore the design landscape, including increasing
sophistication of parameters, increasing use of common standardised code, and
long-term academic research. We conclude by identifying further work and
sketching an initial set of requirements for a common language to support Smart
Contract Templates.

3.4 Towards remote e-voting: Estonian case:


https://dl.gi.de/bitstream/handle/20.500.12116/29132/Proceeding.GI.47-9.pdf?
sequence=1&isAllowed=y

ABSTRACT: This paper gives an overview about the Estonian e-voting system.
Paper discusses how the concept of e-voting system is designed to resist some of
the main challenges of remote e-voting: secure voters authentication, assurance of
privacy of voters, giving the possibility of re-vote, and how an e-voting system can
be made comprehensible to build the public trust.

3.5 E-Democracy: The Next Generation Direct Democracy and Applicability


in Turkey:

https://www.researchgate.net/publication/308796230_E-
Democracy_The_Next_Generation_Direct_Democracy_and_Applicability_in_Turkey

ABSTRACT: In 21. century, fast expansion of the internet has made all people a
potential internet user. At the same time, the advance in the digital technology, the
internet has become a suitable yet ideal platform for delivering public services.
Hence, many public services are started to be offered to citizens through the
internet in all over the World. But, general elections and votes couldn’t be moved
to the Internet completely because of lack of infrastructure, and security and
privacy concerns. In this work, an e-democracy model is introduced, where
elections and votes can be made online; pros and cons of this model are
investigated, current practices are analyzed, solutions to some problems are given
and potential contribution of the internet to the direct democracy is discussed. In
themodelthat we proposed, any citizen who has a legislative proposal, shall be able
to start an online petition, time and location independent. The petitions with
enough support, shall be accepted or put forward as a referendum, with approval of
local or country administration. Hence, via technology, it will be possible for
people to attend the government administration more actively and transition to the
direct democracy that is the essence of the democracy will be enabled.
SYSTEM ANALYSIS

4.SYSTEM ANALYSIS
4.1 EXISTING SYSTEM:

Voting information was managed by a single server in the existing centralised


system, and if this server was compromised or went down, all voting information
would be lost. This server is vulnerable to assault or hacking, and it is possible to

change vote-counting information on it.

4.1.1 DISADVANTAGES OF EXISTING SYSTEM:


1. if this server was compromised or went down, all voting information would
be lost
2. This server is vulnerable to assault or hacking

4.2 Proposed System:


Since each node in the blockchain verifies each Block storage with the aid of
hashcodes, blockchain storage supports immutable data storage, which means data
cannot be altered or compromised. If verification fails, then the blockchain or users
will be notified that the data has changed. We are maintaining all voter information
in the proposed E-Voting system using the Ethereum Blockchain technology since

it provides immutable data storage.

4.2.1 Advantages of proposed system:

1. Block storage with the help of hashcodes and if verification failed then
Blockchain or users will get notification of data changed

4.3 FUNCTIONAL REQUIREMENTS


1.Data Collection
2.Data Preprocessing
3.Training And Testing
4.Modiling
5.Predicting

4.4 NON FUNCTIONAL REQUIREMENTS


NON-FUNCTIONAL REQUIREMENT (NFR) specifies the quality attribute of a software system.
They judge the software system based on Responsiveness, Usability, Security, Portability and
other non-functional standards that are critical to the success of the software system.
Example of nonfunctional requirement, “how fast does the website load?” Failing to meet
non-functional requirements can result in systems that fail to satisfy user needs. Non-
functional Requirements allows you to impose constraints or restrictions on the design of
the system across the various agile backlogs. Example, the site should load in 3 seconds
when the number of simultaneous users are > 10000. Description of non-functional
requirements is just as critical as a functional requirement.

 Usability requirement
 Serviceability requirement
 Manageability requirement
 Recoverability requirement
 Security requirement
 Data Integrity requirement
 Capacity requirement
 Availability requirement
 Scalability requirement
 Interoperability requirement
 Reliability requirement
 Maintainability requirement
 Regulatory requirement
 Environmental requirement
SYSTEM DESIGN

5. SYSTEM DESIGN

5.1 SYSTEM ARCHITECTURE:


Fig.5.1.1 System architecture

DATA FLOW DIAGRAM:

1. The DFD is also called as bubble chart. It is a simple graphical formalism


that can be used to represent a system in terms of input data to the
system, various processing carried out on this data, and the output data is
generated by this system.
2. The data flow diagram (DFD) is one of the most important modeling tools. It
is used to model the system components. These components are the
system process, the data used by the process, an external entity that
interacts with the system and the information flows in the system.
3. DFD shows how the information moves through the system and how it is
modified by a series of transformations. It is a graphical technique that
depicts information flow and the transformations that are applied as data
moves from input to output.
4. DFD is also known as bubble chart. A DFD may be used to represent a
system at any level of abstraction. DFD may be partitioned into levels that
represent increasing information flow and functional detail.

Home

NO PROCESS
Yes NO
VERIFY

Cast your vote

Vote saved in blocks

Admin login

View vote count

End process
Fig.5.1.3 Dataflow diagram

5.2 UML DIAGRAMS

UML stands for Unified Modeling Language. UML is a standardized


general-purpose modeling language in the field of object-oriented software
engineering. The standard is managed, and was created by, the Object
Management Group.
The goal is for UML to become a common language for creating models of
object oriented computer software. In its current form UML is comprised of two
major components: a Meta-model and a notation. In the future, some form of
method or process may also be added to; or associated with, UML.
The Unified Modeling Language is a standard language for specifying,
Visualization, Constructing and documenting the artifacts of software system, as
well as for business modeling and other non-software systems.
The UML represents a collection of best engineering practices that have
proven successful in the modeling of large and complex systems.
The UML is a very important part of developing objects oriented software
and the software development process. The UML uses mostly graphical notations
to express the design of software projects.

GOALS:
The Primary goals in the design of the UML are as follows:
1. Provide users a ready-to-use, expressive visual modeling Language so that
they can develop and exchange meaningful models.
2. Provide extendibility and specialization mechanisms to extend the core
concepts.
3. Be independent of particular programming languages and development
process.
4. Provide a formal basis for understanding the modeling language.
5. Encourage the growth of OO tools market.
6. Support higher level development concepts such as collaborations,
frameworks, patterns and components.
7. Integrate best practices.

Use case diagram:

A use case diagram in the Unified Modeling Language (UML) is a type of


behavioral diagram defined by and created from a Use-case analysis. Its purpose is
to present a graphical overview of the functionality provided by a system in terms
of actors, their goals (represented as use cases), and any dependencies between
those use cases. The main purpose of a use case diagram is to show what system
functions are performed for which actor. Roles of the actors in the system can be
depicted.
Cast your vote

vote saved in blocks

Admin
Candidate login

view vote count

Fig.5.2.1 Usecase diagram

Class diagram:

The class diagram is used to refine the use case diagram and define a detailed design of
the system. The class diagram classifies the actors defined in the use case diagram into a set of
interrelated classes. The relationship or association between the classes can be either an "is-a" or
"has-a" relationship. Each class in the class diagram may be capable of providing certain
functionalities. These functionalities provided by the class are termed "methods" of the class.
Apart from this, each class may have certain "attributes" that uniquely identify the class.
Cast your vote
candidate id
voter name
aadhar number

cast your vote()

admin.
username
password

login()
view vote count()

Fig.5.2.2 Class diagram

Activity diagram:

The process flows in the system are captured in the activity diagram. Similar to a state
diagram, an activity diagram also consists of activities, actions, transitions, initial and final
states, and guard conditions.
Home

Cast your vote

Vote saved in blocks

Admin login

View vote count

Fig.5.2.3 Activity diagram

Sequence diagram:

A sequence diagram represents the interaction between different objects in the system. The
important aspect of a sequence diagram is that it is time-ordered. This means that the exact
sequence of the interactions between the objects is represented step by step. Different objects in
the sequence diagram interact with each other by passing "messages".
candidate admin application

cast your vote

vote save in blocks

admin login

view vote count

Fig.5.2.4 Sequence diagram

Collaboration diagram:

A collaboration diagram groups together the interactions between different objects. The
interactions are listed as numbered interactions that help to trace the sequence of the interactions.
The collaboration diagram helps to identify all the possible interactions that each object has with
other objects.
candidat
e

2: vote save in blocks


1: cast your vote

applicati admin
on
3: admin login
4: view vote count

Fig.5.2.5 Collaboration diagram

Component diagram:

The component diagram represents the high-level parts that make up the system. This
diagram depicts, at a high level, what components form part of the system and how they are
interrelated. A component diagram depicts the components culled after the system has undergone
the development or construction phase.
Admin

application candidate

blockchain

Fig.5.2.6 Component diagram

Deployment diagram:

The deployment diagram captures the configuration of the runtime elements of the
application. This diagram is by far most useful when a system is built and ready to be deployed.

User System

Fig.5.2.7 Deployment diagram


IMPLEMENTATION
6. IMPLEMENTATION

MODULES:

1. Admin
2. Candidate

Admin module: Using this module admin can login with his details and he can
view the count of votes

Candidate module: Using this module candidate can cast his vote with his details

6.2 SAMPLE CODE:

#!/usr/bin/env python3

from __future__ import annotations

import os

import pathlib

import subprocess

import sys

here = pathlib.Path(__file__).parent

def main(*args: str) -> int:

if len(args) == 0:

print("Parameters required")

return 1

if sys.platform == "win32":

script = "activated.ps1"

command = ["powershell",

os.fspath(here.joinpath(script)),
*args]

else:

script = "activated.sh"

command = ["sh",

os.fspath(here.joinpath(script)),

*args]

completed_process =

subprocess.run(command)

return completed_process.returncode

sys.exit(main(*sys.argv[1:]))
#

# Install helper code to manage inserting the correct version for the GUI
# Gets the version from the result of "chia version"
# Converts to proper symver format so NPM doesn't complain
# Adds the version info to the package.json file
#
from __future__ import annotations

import json
import os
import subprocess
from os.path import exists

from pkg_resources import parse_version

#
# The following function is borrowed from
#
https://github.com/inveniosoftware/invenio-assets/blob/maint-1.0/invenio_as
sets/npm.py
# Copyright (C) 2015-2018 CERN.
#
def make_semver(version_str: str) -> str:
v = parse_version(version_str)
major = v._version.release[0]
try:
minor = v._version.release[1]
except IndexError:
minor = 0
try:
patch = v._version.release[2]
except IndexError:
patch = 0

prerelease = []
if v._version.pre:
prerelease.append("".join(str(x) for x in v._version.pre))
if v._version.dev:
prerelease.append("".join(str(x) for x in v._version.dev))

local = v.local

version = "{0}.{1}.{2}".format(major, minor, patch)

if prerelease:
version += "-{0}".format(".".join(prerelease))
if local:
version += "+{0}".format(local)

return version

def get_chia_version() -> str:


version: str = "0.0"
output = subprocess.run(["chia", "version"], capture_output=True)
if output.returncode == 0:
version = str(output.stdout.strip(), "utf-8").splitlines()[-1]
return make_semver(version)

def update_version(package_json_path: str):


if not exists(package_json_path):
return

with open(package_json_path) as f:
data = json.load(f)

data["version"] = get_chia_version()

with open(package_json_path, "w") as w:


json.dump(data, indent=4, fp=w)

if __name__ == "__main__":
update_version(f"{os.path.dirname(__file__)}/chia-blockchain-gui/
package.json")
update_version(f"{os.path.dirname(__file__)}/chia-blockchain-gui/packages/
gui/package.json")
from __future__
import annotations

import os

from setuptools import setup

dependencies = [

"aiofiles==22.1.0", # Async IO for files

"blspy==1.0.16", # Signature library

"chiavdf==1.0.8", # timelord and vdf verification

"chiabip158==1.1", # bip158-style wallet filters

"chiapos==1.0.11", # proof of space

"clvm==0.9.7",
"clvm_tools==0.4.6", # Currying, Program.to, other
conveniences
"chia_rs==0.1.16",

"clvm-tools-rs==0.1.25", # Rust implementation of


clvm_tools' compiler
"aiohttp==3.8.3", # HTTP server for full node rpc

"aiosqlite==0.17.0", # asyncio wrapper for sqlite,


to store blocks
"bitstring==3.1.9", # Binary data management
library
"colorama==0.4.5", # Colorizes terminal output

"colorlog==6.7.0", # Adds color to logs

"concurrent-log-handler==0.9.20", # Concurrently
log and rotate logs
"cryptography==38.0.3", # Python cryptography
library for TLS - keyring conflict
"filelock==3.8.0", # For reading and writing config
multiprocess and multithread safely (non-reentrant
locks)
"keyring==23.9.3", # Store keys in MacOS Keychain,
Windows Credential Locker
"PyYAML==6.0", # Used for config file format

"setproctitle==1.2.3", # Gives the chia processes


readable names
"sortedcontainers==2.4.0", # For maintaining sorted
mempools
"click==8.1.3", # For the CLI

"dnspython==2.2.1", # Query DNS seeds

"watchdog==2.1.9", # Filesystem event watching -


watches keyring.yaml
"dnslib==0.9.23", # dns lib

"typing-extensions==4.4.0", # typing backports like


Protocol and TypedDict
"zstd==1.5.2.6",
"packaging==21.3",

"psutil==5.9.1",

upnp_dependencies = [

"miniupnpc==2.2.2", # Allows users to open ports on


their router
]

dev_dependencies = [

"anyio",

"build",

"coverage",

"diff-cover",

"pre-commit",

"py3createtorrent",

"pylint",

"pytest",

"pytest-asyncio>=0.18.1", # require attribute


'fixture'
"pytest-cov",

"pytest-monitor; sys_platform == 'linux'",

"pytest-xdist",

"twine",

"isort",
"flake8",

"mypy",

"black==22.10.0",

"aiohttp_cors", # For blackd

"ipython", # For asyncio debugging

"pyinstaller==5.6.2",

"types-aiofiles",

"types-cryptography",

"types-pkg_resources",

"types-pyyaml",

"types-setuptools",

legacy_keyring_dependencies = [

"keyrings.cryptfile==1.3.9",

kwargs = dict(

name="chia-blockchain",

author="Mariano Sorgente",

author_email="[email protected]",

description="Chia blockchain full node, farmer,


timelord, and wallet.",
url="https://chia.net/",

license="Apache License",
python_requires=">=3.7, <4",

keywords="chia blockchain node",

install_requires=dependencies,

extras_require=dict(

dev=dev_dependencies,

upnp=upnp_dependencies,

legacy_keyring=legacy_keyring_dependencies,

),

packages=[

"build_scripts",

"chia",

"chia.cmds",

"chia.clvm",

"chia.consensus",

"chia.daemon",

"chia.data_layer",

"chia.full_node",

"chia.timelord",

"chia.farmer",

"chia.harvester",

"chia.introducer",

"chia.plot_sync",

"chia.plotters",

"chia.plotting",
"chia.pools",

"chia.protocols",

"chia.rpc",

"chia.seeder",

"chia.server",

"chia.simulator",

"chia.types.blockchain_format",

"chia.types",

"chia.util",

"chia.wallet",

"chia.wallet.db_wallet",

"chia.wallet.puzzles",

"chia.wallet.cat_wallet",

"chia.wallet.did_wallet",

"chia.wallet.nft_wallet",

"chia.wallet.settings",

"chia.wallet.trading",

"chia.wallet.util",

"chia.ssl",

"mozilla-ca",

],

entry_points={

"console_scripts": [

"chia = chia.cmds.chia:main",
"chia_daemon = chia.daemon.server:main",

"chia_wallet = chia.server.start_wallet:main",

"chia_full_node =
chia.server.start_full_node:main",
"chia_harvester =
chia.server.start_harvester:main",
"chia_farmer = chia.server.start_farmer:main",

"chia_introducer =
chia.server.start_introducer:main",
"chia_crawler = chia.seeder.start_crawler:main",

"chia_seeder = chia.seeder.dns_server:main",

"chia_timelord = chia.server.start_timelord:main",

"chia_timelord_launcher =
chia.timelord.timelord_launcher:main",
"chia_full_node_simulator =
chia.simulator.start_simulator:main",
"chia_data_layer =
chia.server.start_data_layer:main",
"chia_data_layer_http =
chia.data_layer.data_layer_server:main",
]

},

package_data={

"chia": ["pyinstaller.spec"],

"": ["*.clvm", "*.clvm.hex", "*.clib", "*.clinc",


"*.clsp", "py.typed"],
"chia.util": ["initial-*.yaml", "english.txt"],

"chia.ssl": ["chia_ca.crt", "chia_ca.key",


"dst_root_ca.pem"],
"mozilla-ca": ["cacert.pem"],

},
long_description=open("README.md").read(),

long_description_content_type="text/markdown",

zip_safe=False,

project_urls={

"Source": "https://github.com/Chia-Network/chia-
blockchain/",
"Changelog": "https://github.com/Chia-Network/chia-
blockchain/blob/main/CHANGELOG.md",
},

if len(os.environ.get("CHIA_SKIP_SETUP", "")) < 1:

setup(**kwargs) # type: ignore


SOFTWARE ENVIRONMENT
7. SOFTWARE ENVIRONMENT

PYTHON LANGUAGE:

Python is an interpreted, object-oriented, high-level programming language with dynamic


semantics. Its high-level built in data structures, combined with dynamic typing and dynamic
binding, make it very attractive for Rapid Application Development, as well as for use as a
scripting or glue language to connect existing components together. Python's simple, easy to
learn syntax emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program modularity and code reuse.
The Python interpreter and the extensive standard library are available in source or binary form
without charge for all major platforms, and can be freely distributed. Often, programmers fall in
love with Python because of the increased productivity it provides. Since there is no compilation
step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or
bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error,
it raises an exception. When the program doesn't catch the exception, the interpreter prints a
stack trace. A source level debugger allows inspection of local and global variables, evaluation
of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so
on. The debugger is written in Python itself, testifying to Python's introspective power. On the
other hand, often the quickest way to debug a program is to add a few print statements to the
source: the fast edit-test-debug cycle makes this simple approach very effective.

Python is a dynamic, high-level, free open source, and interpreted programming language. It
supports object-oriented programming as well as procedural-oriented programming. In Python,
we don’t need to declare the type of variable because it is a dynamically typed language. For
example, x = 10 Here, x can be anything such as String, int, etc.

Features in Python:

There are many features in Python, some of which are discussed below as
follows:

1. Free and Open Source

Python language is freely available at the official website and you can download
it from the given download link below click on the Download
Python keyword. Download Python Since it is open-source, this means that
source code is also available to the public. So you can download it, use it as well
as share it.

2. Easy to code

Python is a high-level programming language . Python is very easy to learn the


language as compared to other languages like C, C#, Javascript, Java, etc. It is
very easy to code in the Python language and anybody can learn Python basics in
a few hours or days. It is also a developer-friendly language.
3. Easy to Read

As you will see, learning Python is quite simple. As was already established,
Python’s syntax is really straightforward. The code block is defined by the
indentations rather than by semicolons or brackets.

4. Object-Oriented Language

One of the key features of Python is Object-Oriented programming . Python


supports object-oriented language and concepts of classes, object encapsulation,
etc.

5. GUI Programming Support

Graphical User interfaces can be made using a module such as PyQt5, PyQt4,
wxPython, or Tk in python. PyQt5 is the most popular option for creating
graphical apps with Python.

6. High-Level Language

Python is a high-level language. When we write programs in Python, we do not


need to remember the system architecture, nor do we need to manage the
memory.

7. Extensible feature

Python is an Extensible language. We can write some Python code into C or C++
language and also we can compile that code in C/C++ language.
8. Easy to Debug

Excellent information for mistake tracing. You will be able to quickly identify
and correct the majority of your program’s issues once you understand how
to interpret Python’s error traces. Simply by glancing at the code, you can
determine what it is designed to perform.

9. Python is a Portable language

Python language is also a portable language. For example, if we have Python


code for windows and if we want to run this code on other platforms such
as Linux, Unix, and Mac then we do not need to change it, we can run this code
on any platform.

10. Python is an Integrated language

Python is also an Integrated language because we can easily integrate Python


with other languages like C, C++, etc.

11. Interpreted Language:

Python is an Interpreted Language because Python code is executed line by line at


a time. like other languages C, C++, Java, etc. there is no need to compile Python
code this makes it easier to debug our code. The source code of Python is
converted into an immediate form called bytecode.

12. Large Standard Library

Python has a large standard library that provides a rich set of modules and
functions so you do not have to write your own code for every single thing. There
are many libraries present in Python such as regular expressions, unit-testing,
web browsers, etc.

13. Dynamically Typed Language

Python is a dynamically-typed language. That means the type (for example- int,
double, long, etc.) for a variable is decided at run time not in advance because of
this feature we don’t need to specify the type of variable.

14. Frontend and backend development

With a new project py script, you can run and write Python codes in HTML with
the help of some simple tags <py-script>, <py-env>, etc. This will help you do
frontend development work in Python like javascript. Backend is the strong forte
of Python it’s extensively used for this work cause of its frameworks
like Django and Flask.

15. Allocating Memory Dynamically

In Python, the variable data type does not need to be specified. The memory is
automatically allocated to a variable at runtime when it is given a value.
Developers do not need to write int y = 18 if the integer value 15 is set to y. You
may just type y=18.

LIBRARIES/PACKGES :-

Tensorflow

TensorFlow is a free and open-source software library for dataflow and differentiable
programming across a range of tasks. It is a symbolic math library, and is also used
for machine learning applications such as neural networks. It is used for both research and
production at Google.‍
TensorFlow was developed by the Google Brain team for internal Google use. It was released
under the Apache 2.0 open-source license on November 9, 2015.

Numpy

Numpy is a general-purpose array-processing package. It provides a high-performance


multidimensional array object, and tools for working with these arrays.

It is the fundamental package for scientific computing with Python. It contains various features
including these important ones:

 A powerful N-dimensional array object


 Sophisticated (broadcasting) functions
 Tools for integrating C/C++ and Fortran code
 Useful linear algebra, Fourier transform, and random number capabilities
Besides its obvious scientific uses, Numpy can also be used as an efficient multi-dimensional
container of generic data. Arbitrary data-types can be defined using Numpy which allows
Numpy to seamlessly and speedily integrate with a wide variety of databases.

Pandas

Pandas is an open-source Python Library providing high-performance data manipulation and analysis
tool using its powerful data structures. Python was majorly used for data munging and preparation. It
had very little contribution towards data analysis. Pandas solved this problem. Using Pandas, we can
accomplish five typical steps in the processing and analysis of data, regardless of the origin of data load,
prepare, manipulate, model, and analyze. Python with Pandas is used in a wide range of fields including
academic and commercial domains including finance, economics, Statistics, analytics, etc.

Matplotlib

Matplotlib is a Python 2D plotting library which produces publication quality figures in a


variety of hardcopy formats and interactive environments across platforms. Matplotlib can be
used in Python scripts, the Python and IPython shells, the Jupyter Notebook, web application
servers, and four graphical user interface toolkits. Matplotlib tries to make easy things easy
and hard things possible. You can generate plots, histograms, power spectra, bar charts, error
charts, scatter plots, etc., with just a few lines of code. For examples, see the sample
plots and thumbnail gallery.

For simple plotting the pyplot module provides a MATLAB-like interface, particularly when
combined with IPython. For the power user, you have full control of line styles, font
properties, axes properties, etc, via an object oriented interface or via a set of functions
familiar to MATLAB users.

Scikit – learn

Scikit-learn provides a range of supervised and unsupervised learning algorithms via a


consistent interface in Python. It is licensed under a permissive simplified BSD license and is
distributed under many Linux distributions, encouraging academic and commercial use.

SYSTEM TESTING
8. SYSTEM TESTING
System testing, also referred to as system-level tests or system-integration testing,
is the process in which a quality assurance (QA) team evaluates how the various
components of an application interact together in the full, integrated system or
application. System testing verifies that an application performs tasks as designed.
This step, a kind of black box testing, focuses on the functionality of an
application. System testing, for example, might check that every kind of user input
produces the intended output across the application.

Phases of system testing:

A video tutorial about this test level. System testing examines every component of
an application to make sure that they work as a complete and unified whole. A QA
team typically conducts system testing after it checks individual modules with
functional or user-story testing and then each component through integration
testing.
If a software build achieves the desired results in system testing, it gets a final
check via acceptance testing before it goes to production, where users consume the
software. An app-dev team logs all defects, and establishes what kinds and amount
of defects are tolerable.

8.1Software Testing Strategies:

Optimization of the approach to testing in software engineering is the best way to


make it effective. A software testing strategy defines what, when, and how to do
whatever is necessary to make an end-product of high quality. Usually, the
following software testing strategies and their combinations are used to achieve
this major objective:

Static Testing:

The early-stage testing strategy is static testing: it is performed without actually


running the developing product. Basically, such desk-checking is required to detect
bugs and issues that are present in the code itself. Such a check-up is important at
the pre-deployment stage as it helps avoid problems caused by errors in the code
and software structure deficits.
Structural Testing:

It is not possible to effectively test software without running it. Structural testing,
also known as white-box testing, is required to detect and fix bugs and errors
emerging during the pre-production stage of the software development process. At
this stage, unit testing based on the software structure is performed using
regression testing. In most cases, it is an automated process working within the test
automation framework to speed up the development process at this stage.
Developers and QA engineers have full access to the software’s structure and data
flows (data flows testing), so they could track any changes (mutation testing) in the
system’s behavior by comparing the tests’ outcomes with the results of previous
iterations (control flow testing).

Behavioral Testing:

The final stage of testing focuses on the software’s reactions to various activities
rather than on the mechanisms behind these reactions. In other words, behavioral
testing, also known as black-box testing, presupposes running numerous tests,
mostly manual, to see the product from the user’s point of view. QA engineers
usually have some specific information about a business or other purposes of the
software (‘the black box’) to run usability tests, for example, and react to bugs as
regular users of the product will do. Behavioral testing also may include
automation (regression tests) to eliminate human error if repetitive activities are
required. For example, you may need to fill 100 registration forms on the website
to see how the product copes with such an activity, so the automation of this test is
preferable.
8.2 TEST CASES:

S.NO INPUT If available If not available

1 Cast your vote Candidate can cast his There is no process


vote with his details

2 Admin login Admin can login There is no process

3 View vote count Admin can view the There is no process


vote count
SCREENS

7. SCREENSHOTS
CONCLUSION
10.CONCLUSION

By building this planned sensible contract of ours, we've succeeded in moving e-


voting to the blockchain platform and that we self-addressed a number of the
basicproblems that bequest e-voting systems have, by victimization the facility of
the Ethereum network and therefore the blockchain structure. As a results of our
trials, the idea of blockchain and therefore the security methodology that it uses,
specifically changeless hash chains, has become pliant to polls and elections. This
accomplishment might even pave the manner for different blockchain applications
that have impact on each facet of human life. At this time, Ethereum and therefore
thesensible contracts, that created one in all the foremost revolutionary
breakthroughs since the blockchain itself, helped to overturn the restricted
perception of blockchain as a cryptocurrency (coin), and turned it into a broader
solution-base for several Internet-related problems with the fashionable world, and
should alter the world use of blockchain. E-voting remains a disputed topic inside
each political and scientific circles. Despite the existence of some excellent
examples, most of that ar still in use; more makes an attempt were either did not
offer the protection and privacy options of a conventional election or have serious
usability and quantifiability problems [7]. On the contrary, blockchain-based e -
voting solutions, as well as the one we've enforced victimization the sensible
contracts and therefore the Ethereum network, address (or mightaddress with
relevant modifications) most of the protection issues, like privacy of voters,
integrity, verification and nonrepudiation of votes, and transparency of
investigating. Yet, there are some properties that can't be selfaddressed entirely
victimization the blockchain, for instance authentication of voters (on the non-
publiclevel, not on the account level) needs further mechanisms to be integrated,
adore use of biometric factors. The prominence of distributed systems stands out
particularly once considering the mitigation of the danger that storing the
registrations at a central location (office). this could continuously somehow enable
officers to own the chance to physically access to the vote records, that could lead
on to corruptions and cheatings by the authorities. in addition, in today's connected
world, with the idea of the net of Things (IoT), expectedly, several non-computer
devices can gain access to the net. whereas we have a tendency to ar still
performing on a itinerant application as a supportive extension to our work to
widen the usability; it's necessary to notice that, excluding phones and tablets; air
con devices, cars, chairs, clothes, refrigerators, televisions, and lots of different
everyday objects are/will be ready to directly reach to the net. In terms of
blockchain, it won’t be troublesome to create such distributed systems once there's
such an outsized network and a reserve process power. Moreover, if of these
devices work along as a grid to shorten the validation amount of transactions in a
very blockchain, we'll be ready to do most of our on-line transactions firmly,
reliably, and effectively, not solely in theory however conjointly in apply.
BIBILOGRAPHY
11. REFERENCES
[1] S. Nakamoto, “Bitcoin: a peer-to-peer electronic cash system”, [Online]. Available:
https://bitcoin.org/bitcoin.pdf .

[2] G. Wood, "Ethereum: a secure decentralised generalised transaction ledger", Ethereum


Project Yellow Paper, vol. 151, pp. 1- 32, 2014.

[3] C.D. Clack, V.A. Bakshi, and L. Braine, “Smart contract templates: foundations, design
landscape and research directions”, Mar 2017, arXiv:1608.00771.

[4] E. Maaten, “Towards remote e-voting: Estonian case”, Electronic Voting in Europe-
Technology, Law, Politics and Society, vol. 47, pp. 83-100, 2004.

[5] U.C. Çabuk, A. Çavdar, and E. Demir, "E-Demokrasi: Yeni Nesil Do÷rudan Demokrasi ve
Türkiye’deki Uygulanabilirli÷i", [Online]

You might also like