Without having a formal background in programming or computer science, something like participating in the Sapling MPC can seem very daunting. I decided to write this guide to help people who might be a little intimidated or unsure if they should participate.

I wanted to take part in the ceremony, but also wanted to do so in a way that minimized trust or any threats to my personal computer. This led me to use an AWS instance of Ubuntu Server 16.04, accessing it through SSH, and using the command line. This guide assumes you are at least somewhat comfortable with the four terms in bold.

Note that these are just the steps that I took and they aren’t necessarily the best or most secure methods. I am sharing these steps as an educational guide in case anyone finds it helpful.

Getting started

To learn more about the Sapling MPC ceremony, read the official announcement here.

I recommend using something like c5d.xlarge 4 vCPU 8 GiB RAM for your AWS instance (it ended up costing me $0.67 USD for the four hour period, but with this guide it should take you less time). When setting it up, be sure to create a keypair and save the private key for later use.

Signing up for the Sapling MPC ceremony

There are only a few days left to participate so if you are interested, don’t hesitate! All you have to do is email mpc@z.cash with Sapling MPC in the subject line, letting them know that you would like to participate.

You should receive an email with a link to sign up for a four hour time slot (that’s how much time they give you to complete your contribution). Once it is your turn, you should receive an email containing a link to your parameters (params) to download.

Downloading the params

I couldn’t get the params downloaded using the command line, presumably because of the way the file was hosted. Because time was limited, I downloaded it to my personal Windows computer (without opening/running the file) and used PSCP (PuTTY Secure Copy Protocol) to move the file to the AWS Ubuntu server (explained below).

Amazon has a good help page for using PuTTY to connect to your Linux instance. FYI, for Ubuntu we replace ec2-user with ubuntu . Be sure to follow the instructions on that page to convert your private key to a .ppk file.

Before moving the file, you can SSH into your Ubuntu Server instance and clone the Sapling MPC GitHub repository:

sudo apt-get update

sudo apt-get -y upgrade git clone https://github.com/zcash-hackworks/sapling-mpc

cd sapling-mpc

With PuTTY installed (on Windows) and your private key converted, run the following command in cmd to transfer the params to your AWS instance:

Note: The public_dns is the ipv4 of your instance. This command is one line, but the word-wrapping makes it appear as two.

pscp -i C:\path\my-key-pair.ppk C:\path\params ubuntu@public_dns:/home/ubuntu/sapling-mpc/params

Installing Rust

The code that performs the computations to generate the new parameters (new_params) is written in Rust, so you’ll need to install it on the AWS instance. I got the steps from this guide. This is easily done by typing:

curl https://sh.rustup.rs -sSf | sh

Accept the default options and press 1 to install. I’m not sure if the following step is necessary but I decided to go ahead with it anyway:

source ~/.profile

source ~/.cargo/env

To check that it worked and you have the latest stable version of Rust (1.27.2 at the time of writing), type:

rustc --version

Computing the new parameters

Now that you have Rust installed, you are ready to run the code to compute the new parameters! The instructions in the email from mpc@z.cash didn’t work for me, so I did it slightly differently. Specifically, I was getting permission errors when trying to run the cargo command as instructed. Trying to use sudo cargo ... resulted in another error. So instead I used the full path to cargo and it worked. To get the full path, type which cargo and it should return the path /home/ubuntu/.cargo/bin/cargo . With that, I used the following command to compute the new_params:

sudo /home/ubuntu/.cargo/bin/cargo run --release --bin compute

Note: This was my first experience with Rust and I found multiple posts recommending NOT to use sudo when running cargo. I’m not sure why, but since this was on an AWS instance that I planned to terminate immediately I wasn’t concerned.

You should see the code being compiled and then a message that the program is running. Nothing else displays until it is finished, which can take 10–30 minutes depending on hardware (was probably around 20 minutes for me). Once it’s finished, you will get a success message displayed along with the hash that your contribution is bound to (it’s recommend to save this hash to verify the results to in the future). Here’s what my results looked like:

Moving the new_params to your personal computer and uploading

Once the new_params file was generated, I used PSCP to transfer it back to my personal computer to upload (again, without opening/running the file):

pscp -i C:\path\my-key-pair.ppk ubuntu@public_dns:/home/ubuntu/sapling-mpc/new_params C:\path

ew_params

Note: As before, this is one single command.

The email from mpc@z.cash contains a link to easily upload the new_params for the next participant:

Conclusion

After you upload your new_params, you should receive an email saying they appear valid. An hour or so later you will receive confirmation that your contribution has been confirmed.

Hopefully you found this guide helpful. If you have any questions or comments, please feel free to ask!