Coder Social home page Coder Social logo

sangaman / openvote Goto Github PK

View Code? Open in Web Editor NEW
11.0 5.0 4.0 121 KB

:ballot_box_with_check: A prototype of a voting machine that timestamps its results using OpenTimestamps - 3rd place at the DC Blockchain Summit Codeathon 2017

License: MIT License

JavaScript 89.72% HTML 10.28%
voting timestamps opentimestamps blockchain

openvote's Introduction

Open Vote

Third Place at the 2018 DC Blockchain Code-A-Thon

A MVP prototype electronic voting machine that implements proof-of-database using OpenTimestamps to detect vote tampering. At chosen intervals during voting, i.e. every 10 minutes, a snapshot of the database tracking voting results is stored to a file and the hash of the file is committed to the bitcoin blockchain using the OpenTimestamps API. After polls close, the voting results, database snapshots, and hashes are released to the public. Individuals can verify that each snapshot matches its corresponding hash and that the hash was indeed committed to the blockchain when it was supposed to. Any discrepancies indicate tampering.

The current demo functionality includes a command line tool to simulate voter registration, voting, and intermittent snapshots and timestamping. It also includes a basic web interface that lists snapshots and indicates whether they can be verified by OpenTimestamps.

Features to be included in future releases:

  • Automated timer for snapshots
  • Public key & signature combo to verify identity instead of "voterID"
  • Twitter integration for real time hash publication during voting process
  • Mechanism to reward the public for verifying transactions on the blockchain (against hashes published to Twitter)

Installation

git clone https://github.com/sangaman/openvote.git
npm install

Simulating Snapshots

This repository includes a set of timestamped database snapshots for demonstration purposes. However, you can create your own demo data. This requires a running local MongoDB server without password protection. The commands below will create a collection of 50 uniquely identified voters, snapshot the list of voters, then perform random voting in five batches of 10 votes with snapshots and timestamps in between each batch. Note that if you want to ensure that each snapshot is linked to a different time and block, you should space these commands at least 30 minutes apart.

node lib/ovcli.js register 50
node lib/ovcli.js vote 10
node lib/ovcli.js vote 10
node lib/ovcli.js vote 10
node lib/ovcli.js vote 10
node lib/ovcli.js vote 10

Running the Web Interface

You can start the server for the web interface on port 80 with the following command.

node lib/ovserver.js

The web interface will be accessible at http://127.0.0.1.

openvote's People

Contributors

rikagoldberg avatar sangaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.