dvote

module
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2021 License: AGPL-3.0

README

go-dvote

GoDoc Go Report Card

Join Discord Twitter Follow

This repository contains a set of libraries and tools for the Vocdoni decentralized backend infrastrucutre, as described in the documentation.

A good summary of the whole Vocdoni architecture can be found in the blog post technical overview v1.

Vocdoni

Vocdoni is a universally verifiable, censorship-resistant, and anonymous self sovereign governance system, designed with the scalability and ease-of-use to support either small/private and big/national elections.

Our main aim is a trustless voting system, where anyone can speak their voice and where everything can be audited. We are engineering building blocks for a permissionless, private and censorship resistant democracy.

We intend the algorithms, systems, and software that we build to be a useful contribution toward making violence in these cryptonetworks impossible by protecting users privacy with cryptography. In particular, our aim is to provide the necessary tooling for the political will of network participants to translate outwardly into real political capital, without sacrificing privacy.

vocdoni go-dvote team

dvotenode

The dvotenode is the main tool of go-dvote, it contains all the required features for making the decentralized Vocdoni backend possible.

Currently dvotenode can operate in three modes:

  • gateway mode provides an entry point to the P2P networks for the clients (APP or Web), it uses most of the components from go-dvote. Detailed information can be found here

  • miner mode provides a block validation node (full node) of the Vochain (Tendermint based blockchain for voting). Defailed information can be found here

  • oracle mode provdes a bridge between Ethereum and the Vochain

One of the design primitives of go-dvote is to run everything as a single daemon in order to have complete control over the components and avoid local RPC or IPC connections. So unlike other projects, go-dvote uses go-ethereum, go-ipfs and tendermint as GoLang libraries.

In addition, go-dvote is currently pure GoLang code, so generating a static and reproducible binary that works on most of the Linux hosts (and probably MacOS) without any dependence is possible.

For running dvotenode in gateway mode, 8GB of ram is recommended (4GB works but it is risky).

Status
  • Unified WebSockets JSON API for client connection
  • Letsencrypt automatic TLS support
  • Ethereum blockchain(s) support
  • Ethereum event subscription to the Vocdoni Process smart contract
  • ENS (ethereum name service) support
  • Libp2p pubsub like protocol for short encrypted messages
  • Nice logs
  • Docker support
  • Prometheus support (for metrics)
  • secp256k1 and ed25519 signature and encryption
  • Census Merkle Tree implementation
  • Native IPFS support
  • IPFS cluster support (custom implementation named ipfsSync)
  • Tendermint voting blockchain implementation
  • Vote Scrutinizer
  • BabyJubJub signature and hashing (ZK-snark friendly)
  • ZK-snark integration
  • BootNode automatic discovery
Compile and run

Compile from source in a golang environment (Go>1.16 required):

git clone https://go.vocdoni.io/dvote.git
cd go-dvote
go build ./cmd/dvotenode
./dvotenode --help
Docker

You can run go-dvote as a standalone container with a docker script (configuration options can be changed in file dockerfiles/dvotenode/env):

dockerfiles/gateway/dockerlaunch.sh

All data will be stored in the shared volume run.

Docker compose

Standalone components can be built and run as the examples:

  • Gateway (default)
cd dockerfiles/dvotenode
docker-compose build
docker-compose up -d
  • Miner
cd dockerfiles/dvotenode
docker-compose build
docker-compose -f docker-compose.miner.yml up -d

The test suite is an all-in-one compose file to bootstrap a minimal testing testing environment. To do a voting process test, follow the example:

cd dockerfiles/testsuite
docker-compose build
docker-compose up -d
go run ../../cmd/vochaintest/vochaintest.go --oracleKey 6aae1d165dd9776c580b8fdaf8622e39c5f943c715e20690080bbfce2c760223 --electionSize=1000

Contributor Covenant

Directories

Path Synopsis
Package census provides the census management operation
Package census provides the census management operation
arbotree
Package arbotree provides the functions for creating and managing an arbo merkletree adapted to the CensusTree interface
Package arbotree provides the functions for creating and managing an arbo merkletree adapted to the CensusTree interface
gravitontree
Package tree provides the functions for creating and managing an iden3 merkletree
Package tree provides the functions for creating and managing an iden3 merkletree
cmd
Package crypto contains cryptographic interfaces used in the vocdoni project.
Package crypto contains cryptographic interfaces used in the vocdoni project.
ethereum
Package ethereum provides cryptographic operations used in go-dvote related to ethereum.
Package ethereum provides cryptographic operations used in go-dvote related to ethereum.
nacl
Package nacl implements encryption and decryption using anonymous sealed boxes, depending on golang.org/x/crypto/nacl/box.
Package nacl implements encryption and decryption using anonymous sealed boxes, depending on golang.org/x/crypto/nacl/box.
Package data provides an abstraction layer for distributed data storage providers (currently only IPFS)
Package data provides an abstraction layer for distributed data storage providers (currently only IPFS)
db
lru
Package ipfssync provides a service to synchronize IPFS datasets over a p2p network between two or more nodes
Package ipfssync provides a service to synchronize IPFS datasets over a p2p network between two or more nodes
multirpc
router
Package router provides the routing and entry point for the go-dvote API
Package router provides the routing and entry point for the go-dvote API
Package router provides the routing and entry point for the go-dvote API
Package router provides the routing and entry point for the go-dvote API
test
Package vochain provides all the functions for creating and managing a vocdoni voting blockchain
Package vochain provides all the functions for creating and managing a vocdoni voting blockchain

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL