Go to file
2020-02-08 18:36:03 +03:00
assets add download link to navbar 2020-02-09 01:18:00 +10:00
components Readme updates 2020-02-08 18:36:03 +03:00
frontend add frontend and increase timeout for nginx 2020-02-05 23:20:01 -08:00
layouts tornado styles 2020-01-29 23:13:06 +10:00
lib/phase2 phase2 lib 2020-01-29 16:20:11 +03:00
middleware init project 2020-01-29 13:54:03 +03:00
pages Readme updates 2020-02-08 18:36:03 +03:00
plugins make it work again! 2020-01-29 19:59:37 +03:00
server csrf protection; validation middleware; morgan removing 2020-02-08 17:00:16 +03:00
static make it work again! 2020-01-29 19:59:37 +03:00
store logout button 2020-02-09 00:41:27 +10:00
.editorconfig init project 2020-01-29 13:54:03 +03:00
.env.example Readme updates 2020-02-08 18:36:03 +03:00
.eslintignore make it work again! 2020-01-29 19:59:37 +03:00
.eslintrc.js updates 2020-01-29 14:30:50 +03:00
.gitignore git oauth WIP 2020-02-07 18:21:34 +03:00
.prettierignore make it work again! 2020-01-29 19:59:37 +03:00
.prettierrc init project 2020-01-29 13:54:03 +03:00
docker-compose.yml git oauth WIP 2020-02-07 18:21:34 +03:00
Dockerfile dockerfile fix 2020-02-05 19:07:20 +03:00
nuxt.config.js Readme updates 2020-02-08 18:36:03 +03:00
package.json csrf protection; validation middleware; morgan removing 2020-02-08 17:00:16 +03:00
README.md Readme updates 2020-02-08 18:36:03 +03:00
seed.sql index page contributions 2020-02-05 18:02:34 +03:00
yarn.lock csrf protection; validation middleware; morgan removing 2020-02-08 17:00:16 +03:00

Tornado.cash Trusted Setup Ceremony app

zk-SNARKs require a pre-existing setup between the prover and verifier. A set of public parameters define the “rules of the game” for the construction of zk-SNARKs. This app allows everyone to contribute with your source of entropy so that tornado.cash can be trustless.

Environment variables

The app can use .env.development and .env.production. What file will be used depends on NODE_ENV variable. For command yarn dev the .env.development is used. The yarn start uses .env.production.

ENV_VAR Description
DISABLE_S3 Disable contributions uploading to AWS S3. true or false
AWS_ACCESS_KEY_ID AWS access key
AWS_SECRET_ACCESS_KEY AWS secret key
AWS_S3_BUCKET AWS S3 bucket where the contributions will be uploaded
MYSQL_USER Mysql user the app uses. Notice, you don't need mysql db for development. The app will use local sqlite db in dev mode. Local db is stored in db.development.sqlite file.
MYSQL_PASSWORD Mysql password for MYSQL_USER
MYSQL_DATABASE Mysql database
TWITTER_CONSUMER_KEY Twitter consumer API key. Twitter app
TWITTER_CONSUMER_SECRET Twitter consumer API secret
TWITTER_CALLBACK_URL Twitter callback URL. The app handles the /api/oauth_callback/twitter endpoint. Feel free to change domain name and protocol though
GITHUB_CLIEND_ID Github client id. How to create Github OAuth app
GITHUB_CLIENT_SECRET Github client secret
GITHUB_CALLBACK_URL Github callback URL. The app handles the /api/oauth_callback/github endpoint. Feel free to change domain name and protocol though
SESSION_SECRET A random string that will be used by express-session to sign the session ID cookie.

Development setup

$ yarn install

# Edit all necessary environment variables. See the explanation above.
$ cp .env.example .env.development

# serve with hot reload at localhost:3000
$ yarn dev

Production setup

# Edit all necessary environment variables. See the explanation above.
$ cp .env.example .env.production

# Run Nginx + Letsencrypt containers to serve https requests to the app
$ cd frontend 
$ docker-compose up -d
$ cd ..

# Set VIRTUAL_HOST and LETSENCRYPT_HOST variables in the app's docker-compose.yml file
# Run the app and mysql database containers. It will use the MYSQL_USER, MYSQL_PASSWORD and MYSQL_DATABASE vars you specified in .env.production file.
$ docker-compose up -d