Resources for running a proof server, serving Triton VM proofs for faster test suite execution.
The setup uses nginx to share the proofs, in cleartext, through HTTP. And it uses "rsync" and "inotify" to upload the proof files from the workstation to the server.
-
Store the three files where described in the files, one nginx file on the server, and two files on the workstation. Then add the missing values to the files: username, ip or URLs, directory paths etc.
-
Install programs for automatically sending proof files from workstation to server:
sudo apt update
sudo apt install rsync inotify-tools
- Set up SSH key-based authentication between your desktop and the remote machine:
ssh-keygen -t ed25519
ssh-copy-id user@server
- Make the
watch_and_sync_script.sh
script executable
chmod +x ~/bin/watch_and_sync.sh
- Start the systemd daemon, you should have configured during step 1.
sudo systemctl daemon-reload
sudo systemctl enable sync-triton-vm-proofs.service
- Verify status of syncing service
sudo systemctl status sync-triton-vm-proofs.service
- Install nginx
sudo apt update
sudo apt install nginx
- Make the directory for the proofs, and set correct permissions
sudo mkdir -p /var/www/triton-vm-proofs/
sudo chown -R www-data:www-data /var/www/triton-vm-proofs
sudo chmod -R 775 /var/www/triton-vm-proofs
- Enable the webserver defined in step 1.
sudo ln -s /etc/nginx/sites-available/triton-vm-proofs /etc/nginx/sites-enabled/
- Test nginx for syntax errors and reload nginx
sudo nginx -t
sudo systemctl reload nginx
- Add your ssh user to group www-data so it can write proof files
sudo usermod -g www-data <user>
Other relevant commands Check log of proof-syncing service, on workstation
journalctl -u sync-triton-vm-proofs.service -f
Check log of proof server, on server
tail -f /var/log/nginx/access.triton-vm-proofs.log
Summarize total data sent, on server
awk '{sum += $10} END {print sum / (1024 * 1024) " MB"}' /var/log/nginx/access.triton-vm-proofs.log