Valentin, one of our engineers started a nice side project to show the possibilities of immudb. His goal is to showcase a website that provides a secure way for elections.
Powered by immudb
The main feature is that the voting platform built on immudb is automatically verified by everyone who visits the website! So immudb could run on an untrusted system, but the amount of users visiting the website makes it impossible to manipulate the data unnoticed.
If you just want to go ahead and visit the GitHub project: https://github.com/padurean/immuvoting
Continue reading to get some more information about how it works.
The code gets compiled to WASM and resides in the VerifyConsistency function.
In it’s definition the code is split in 5 steps (there are comments in the code, marking each step):
GOOS=js GOARCH=wasm go build -o ../client/verifier.wasm ./verifier/verifier.go*
cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" ./client/
immudb v0.9.x – the immutable database. GitHub repo is here. More details about it can be found on it’s official site.
featch
API, const
keyword etc.).immudb
NOTE: immuvoting will try to connect to it using default config: localhost
, port 3322
, database defaultdb
and default credentials (have a look in server/main.go for more details)
from immuvoting‘s server folder run:
go get ./...
go run .
to start the HTTP API server (backend)python -m SimpleHTTPServer
.That’s all. You can now access the fronted at http://localhost:<xxx>.
NOTE: Port number depends on the HTTP server you used: default port for VSCode‘s Go Live it’s 5500
, for python’s SimpleHTTPServer
it’s 8000
.
For instructions on how to recompile it to WASM, see the README in the server/verifier folder.
More details about this can be read, for example, in this article or in this one which explains the Merkle proofs.