当前位置: 首页 > 软件库 > Web3 > 区块链 >

vocdoni-node

授权协议 AGPL-3.0 License
开发语言 Google Go
所属分类 Web3、 区块链
软件类型 开源软件
地区 不详
投 递 者 宗政浩慨
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

go-dvote

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.17 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

  • Node.js简介 Node.js是什么 Node.js是一个JS运行环境(runtime),用来运行javascript程序。这一点跟Python等有点类似,它提供了一个运行的平台。 同时,它提供了一些内置模块,使得javascript程序可以脱离浏览器等束缚,作为一个独立的程序来运行。 用途 主要用来开发服务器应用,每个服务器应用就是一个独立的服务器软件。 当然,也可以直接在本地运行、测试。比

  • Node.js 常用工具 util 是一个Node.js 核心模块,提供常用函数的集合,用于弥补核心JavaScript 的功能 过于精简的不足。 util.inherits util.inherits(constructor, superConstructor) 是一个实现对象间原型继承的函数。 JavaScript 的面向对象特性是基于原型的,与常见的基于类的不同。JavaScript 没

  • (1)vcbuild.bat (2)node.sln (3)build 'D:\Program' 不是内部或外部命令,也不是可运行的程序 修改 node_js2c.vcxproj   <Command>call call 

  • 一、fs文件系统模块 1、读取指定文件中的内容 (1)fs.readFile()的语法格式 fs.readFile(path[,options],callback) 参数1:必选参数,字符串,表示文件的路径。 参数2:可选参数,表示以什么编码格式来读取文件。 参数3:必选参数,文件读取完成后,回调函数。 (2)fs.readFile()的示例代码 const fs = require('fs')

 相关资料
  • 问题内容: 为了在工作中进行演示,我想比较NodeJS和C的性能。这是我写的: Node.js(for.js): 我使用GCC编译for.c并运行它: 结果: 然后我在NodeJS中尝试了它: 结果: 在运行了无数次之后,我发现无论如何它都是成立的。如果我将for.c切换double为long在循环中使用a而不是a ,则C花费的时间甚至更长! 不是试图发动火焰战争,但是为什么执行相同操作的Node

  • 问题内容: 我想在Java中使用for-each循环进行迭代。我有一个for循环和一个do-while循环,但没有for-each。 问题答案: 此问题的解决方法很简单,值得庆幸的是,您只需实现一次即可。 在将此实用程序类添加到项目中并 为源代码添加方法的后,您可以像这样使用它:

  • 问题内容: 我已经用以下代码读取了Java中的XML文件: 那么,如何从节点实例获取完整的xml内容?(包括所有标签,属性等) 谢谢。 问题答案: 您将使用DOMSource(而不是StreamSource),并在构造函数中传递您的节点。 然后,您可以将节点转换为字符串。 快速样本:

  • 问题内容: 我正在尝试合并两个xml文件,如下所示,但我无法获得所需的输出,请帮助我,谢谢 Java代码: File1.xml File2.xml 电流输出: 预期产量: 问题答案: 为了自己做。您应该执行以下操作: testFinal.xml的最终输出: 如你所愿;-) 希望能帮助到你,

  • 问题内容: 我正在做一些测试,但是无论是否使用该方法,我都看不到任何区别。但是ExampleDepot网站上的示例使用了它。那么,这是为了什么呢?(文档对我也不清楚) 问题答案: 您可以以编程方式构建DOM树,该树具有与实际XML结构不对应的无关结构- 尤其是诸如文本类型的多个节点彼此相邻或文本类型的空节点之类的东西。该方法将删除这些文本,即,它将相邻的文本节点合并并删除空白文本节点。 当您有其他

  • 问题内容: 如何在Ubuntu上编译/安装node.js?失败,并显示错误消息。 问题答案: 一线 安装所有必需的依赖项(curl和git并不是真正需要的,但是非常有用,如果通过nvm安装也需要)。 并非总是需要最后两个依赖项,但是无论如何安装它们确实很有用,而且以后可能也需要它。 仅安装 cxx编译器 如果 openssl 丢失