add dockerignore file; readme update

This commit is contained in:
Alexey 2020-02-08 18:57:49 +03:00
parent 3159f97daa
commit 276f0f1e9f
13 changed files with 27 additions and 0 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
node_modules
.env
.env.development
.env.production
.git
db.development.sqlite
server/snark_files/response_*

1
.gitignore vendored
View File

@ -92,3 +92,4 @@ sw.*
db.development.sqlite
.env.development
.env.production
server/snark_files/response_*

View File

@ -36,6 +36,7 @@ $ yarn dev
```
## Production setup
Follow instructions in the [Initialize ceremony]() section to generate `current.params` file.
``` bash
# Edit all necessary environment variables. See the explanation above.
$ cp .env.example .env.production
@ -49,3 +50,17 @@ $ cd ..
# 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
```
# Initialize ceremony (`current.params` file creation):
1. `git clone https://github.com/tornadocash/phase2-bn254 && cd phase2-bn254`
1. `git checkout wasm`
1. go to `./powersoftau/src/bn256/mod.rs` and change `REQUIRED_POWER` to 15 (it's going to fit 36k constaints snark)
1. `cd powersoftau`
1. run `./test.sh`. After this step you will get many `phase1radix*` files.
1. Download [withdraw.json](https://github.com/tornadocash/tornado-core/releases/download/v2.0/withdraw.json) for required circuit to `./phase2` folder
1. `cd ../phase2`
1. `cp ../powersoftau/phase1radix* .`
1. `cargo run --release --bin new withdraw.json current.params`
1. The `current.params` file is your initial challenge file.
1. copy `current.params`, `withdraw.json` and `phase1radix*` to `./server/snark_files` folder.
1. `mv withdraw.json circuit.json`

View File

@ -91,6 +91,10 @@ router.post('/response', upload.single('response'), async (req, res) => {
console.log('Committing changes')
await fs.rename(`/tmp/tornado/${req.file.filename}`, './server/snark_files/current.params')
await fs.copyFile(
'./server/snark_files/current.params',
`./server/snark_files/response_${contributionIndex}`
)
console.log('Finished')
res.json({ contributionIndex })

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.