A simple Blockchain implementation in Golang for an Election vote casting application
This project was started due to the scarcity of authenticity and transparency of the elections held in the Republic of Sudan in the past. It aims to break those barriers by implementing a blockchain solution.
By using Golang, the project is able to handle high traffic load and performance bottlenecks other languages suffer from while working on any platform with a small disk footprint (~15MB is the final size of the Docker image).
E-voting systems provide numerous benefits which include:
-
Prevention of fraud, by reducing human involvement
-
Acceleration of results processing
-
Reduction of spoilt ballots by improved presentation and automatic validation of ballots
-
Reduction of costs due to decreasing voting overhead
-
Increase involvement in democratic process due to easer availability (remote voting)
-
Potential for more direct democracy.
Introducing an e-voting system is inherently connected with many challenges which are not only technical but also procedural and legislative. One the most substantial of weaknesses of e-voting systems are:
- lack of transparency and understanding of the system which leads to lack of trust in the solution and undermines its whole sense
- lack of widely accepted standards for e-voting systems
- risk of fraud and manipulation by privileged insiders or hackers
- increased costs of voting infrastructure with regard to power supply, communication technology, etc.
Blockchain technology can provide a solution to some of these problems. One of the properties of blockchain is an ability to create a platform for a public verification of data stored inside. Utilizing this characteristic of blockchain technology allows for a possibility of the creation of an e-voting system which can be audited by common voters instead of dedicated institutions and officials.
Quoted from Towards the intelligent agents for blockchain e-voting systems - Procedia Computer Science 141 (2018) 239-146
- Block and Blockchain validation
- Vote duplication check
- Optimized Docker Image 👏
- ED25519 4096 bits Padded Cryptography
- Public-Private key-pair generation (sent via email)
- Decetralization
- Peer discovery
- View elections results
- Travis CI and CodeCov Integration
PORT=8080
Development:
- Populate vendor directory with dependencies
dep ensure --vendor-only
- Serve on port 8080 (env)
go run main.go
Production:
- Build the optimized image
docker build -t elections-bc .
- Expose image on port 8080
docker run -d -p 8080:8080 elections-bc
Testing:
- Testing with coverage
go test ./... -v -cover
MIT © Osama Adil