Skip to content

Commit

Permalink
Document ceremony (#3058)
Browse files Browse the repository at this point in the history
  • Loading branch information
cor authored Oct 2, 2024
2 parents d669836 + dc7e115 commit 0b763e8
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 27 deletions.
31 changes: 4 additions & 27 deletions ceremony/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte).

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm create svelte@latest

# create a new project in my-app
npm create svelte@latest my-app
```
# Ceremony Web App

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
nix run .#ceremony-dev-server
```

## Building

To create a production version of your app:
To create a production version of the union ceremony app:

```bash
npm run build
nix build .#ceremony
```

You can preview the production build with `npm run preview`.

> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
1 change: 1 addition & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Halfnode
Hashable
Hasher
Hedgies
Hetzner
Hhvf
Hyperlane
IAVL
Expand Down
4 changes: 4 additions & 0 deletions docs/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ export default defineConfig({
autogenerate: {
directory: "/joining-testnet"
}
},
{
label: "Ceremony",
link: "/ceremony"
}
]
},
Expand Down
55 changes: 55 additions & 0 deletions docs/src/content/docs/ceremony.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "Ceremony"
---

Union's Ceremony has the following components:

- Web app [ceremony.union.build](https://ceremony.union.build)
- [MPC client](https://github.com/unionlabs/union/pkgs/container/union%2Fmpc-client), running in the terminal
- The coordinator, managing the queue and aggregating uploads.

We use [Nix](https://nixos.org) to create fully reproducible builds of all components and provide commands so that you can build them yourself.

## Web App

Deployed on [ceremony.union.build](https://ceremony.union.build), Handles auth and shows queue status. Also shows all contributions.

You can build it locally like this:

```sh
GIT_LFS_SKIP_SMUDGE=true nix build github:unionlabs/union/release/ceremony#ceremony
```

## MPC Client

Image published [here](https://github.com/unionlabs/union/pkgs/container/union%2Fmpc-client), handles the generation of the contribution, generation of the gpg key, and signs/uploads the contributions.

You can build it locally like this on a `x86_64-linux` machine:

```sh
GIT_LFS_SKIP_SMUDGE=true nix build github:unionlabs/union/bbfaa2f39d0183c2fd6c1d2505fad6c64ddb39e1#packages.x86_64-linux.mpc-client -L
```

and load the image like this on a `x86_64-linux` machine::

```sh
docker load -i ./result
```

## MPC Coordinator

The coordinator has two components:

1. Postgres, managing the queue and contributions. Hosted by Supabase.
3. The `mpc-coordinator` service, verifying incoming contributions. Hosted by Hetzner.


You can see the database schema [here](https://github.com/unionlabs/union/blob/bbfaa2f39d0183c2fd6c1d2505fad6c64ddb39e1/mpc/coordinator/database.sql), and you can build the service locally like this on a `x86_64-linux` machine:

```sh
GIT_LFS_SKIP_SMUDGE=true nix build github:unionlabs/union/bbfaa2f39d0183c2fd6c1d2505fad6c64ddb39e1#packages.x86_64-linux.mpc-coordinator -L
```
There are no trust assumptions on the database, as at the end of the ceremony all contributions will be published and verifiable by all.



0 comments on commit 0b763e8

Please sign in to comment.