Skip to content

private-attribution/draft

Repository files navigation

DRAFT - Distributed Relay and Automation Facilitation Tool

image of a draft beer tap

draft is a project designed to help test IPA at scale. It contains two components:

  1. draft-server: a web front end and service that starts queries and displays logs from the MPC helper servers.
  2. draft-sidecar: a sidecar backend API that runs next to the IPA binary on helper servers. This includes a CLI for setup and running.

Get started

Deploying a Helper Party

Requirements

Instructions for AWS Linux 2023

  1. Provision an EC2 instance. Download the provided ssh PEM file (e.g., <ssh_key.pem>) and add it to ~/.ssh.
  2. Point a subdomain of a domain you control to the public IP address.
  3. Add the host to your ~/.ssh/config file:
Host ipa
    Hostname <subdomain-name-for-helper>
    User ec2-user
    IdentityFile ~/.ssh/<ssh_key.pem>
  1. Update the draft/sidecar/ansible/inventory.ini file to only include a single host. (Unless you are running all 4 servers.)
  2. Provision your machine: ansible-playbook -i sidecar/ansible/inventory.ini sidecar/ansible/provision.yaml

To deploy new changes in draft, run: ansible-playbook -i sidecar/ansible/inventory.ini sidecar/ansible/deploy.yaml

Generating TLS certs with Let's Encrypt

You will need a domain name and TLS certificates for the sidecar to properly run over HTTPS. The following instructions assume your domain is example.com, please replace with the domain you'd like to use. You will need to create two subdomains, sidecar.example.com and helper.example.com. (Note, you could also use a subdomain as your base domain, e.g., test.example.com with two subdomains of that: sidecar.test.example.com and helper.test.example.com.)

  1. Set up DNS records for sidecar.example.com and helper.example.com pointing to a server you control.
  2. Make sure you've installed the requirements above, and are using the virtual environment.
  3. Install certbot: pip install certbot</