From 6bf57451e91bbc22deb6be6a2775981556eb74e9 Mon Sep 17 00:00:00 2001 From: cor Date: Wed, 2 Oct 2024 18:43:48 +0200 Subject: [PATCH 1/3] docs(ceremony): document components --- ceremony/README.md | 31 ++---------- .../content/docs/architecture/ceremony.mdx | 50 +++++++++++++++++++ 2 files changed, 54 insertions(+), 27 deletions(-) create mode 100644 docs/src/content/docs/architecture/ceremony.mdx diff --git a/ceremony/README.md b/ceremony/README.md index 5ce676612e..f6174e29ee 100644 --- a/ceremony/README.md +++ b/ceremony/README.md @@ -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. diff --git a/docs/src/content/docs/architecture/ceremony.mdx b/docs/src/content/docs/architecture/ceremony.mdx new file mode 100644 index 0000000000..a89b5a9566 --- /dev/null +++ b/docs/src/content/docs/architecture/ceremony.mdx @@ -0,0 +1,50 @@ +--- +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: + +```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: + +```sh +docker load -i ./result +``` + +## MPC Coordinator + +Is deployed on Supabase. + + +You can build it locally like this: + +```sh +GIT_LFS_SKIP_SMUDGE=true nix build github:unionlabs/union/bbfaa2f39d0183c2fd6c1d2505fad6c64ddb39e1#packages.x86_64-linux.mpc-coordinator -L +``` + + From 1e338a9ac0f45f2043bfeb70509ee993a006dead Mon Sep 17 00:00:00 2001 From: cor Date: Wed, 2 Oct 2024 19:15:52 +0200 Subject: [PATCH 2/3] docs(ceremony): note us requirements --- dictionary.txt | 1 + docs/src/content/docs/architecture/ceremony.mdx | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dictionary.txt b/dictionary.txt index bdb521c97d..dd6c201067 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -89,6 +89,7 @@ Halfnode Hashable Hasher Hedgies +Hetzner Hhvf Hyperlane IAVL diff --git a/docs/src/content/docs/architecture/ceremony.mdx b/docs/src/content/docs/architecture/ceremony.mdx index a89b5a9566..9df52696de 100644 --- a/docs/src/content/docs/architecture/ceremony.mdx +++ b/docs/src/content/docs/architecture/ceremony.mdx @@ -24,13 +24,13 @@ GIT_LFS_SKIP_SMUDGE=true nix build github:unionlabs/union/release/ceremony#cerem 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: +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: +and load the image like this on a `x86_64-linux` machine:: ```sh docker load -i ./result @@ -38,13 +38,18 @@ docker load -i ./result ## MPC Coordinator -Is deployed on Supabase. +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 build it locally like this: + +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. + From dc7e11515c460eba47789d8d2bee864962b4c76d Mon Sep 17 00:00:00 2001 From: cor Date: Wed, 2 Oct 2024 19:20:18 +0200 Subject: [PATCH 3/3] refactor(docs): move ceremony to top-level --- docs/astro.config.ts | 4 ++++ docs/src/content/docs/{architecture => }/ceremony.mdx | 0 2 files changed, 4 insertions(+) rename docs/src/content/docs/{architecture => }/ceremony.mdx (100%) diff --git a/docs/astro.config.ts b/docs/astro.config.ts index 5a8bbbcde7..87c289b45b 100644 --- a/docs/astro.config.ts +++ b/docs/astro.config.ts @@ -193,6 +193,10 @@ export default defineConfig({ autogenerate: { directory: "/joining-testnet" } + }, + { + label: "Ceremony", + link: "/ceremony" } ] }, diff --git a/docs/src/content/docs/architecture/ceremony.mdx b/docs/src/content/docs/ceremony.mdx similarity index 100% rename from docs/src/content/docs/architecture/ceremony.mdx rename to docs/src/content/docs/ceremony.mdx