Skip to content

Commit 76cd292

Browse files
authored
ci: add prettier (#11)
ci: add prettier
1 parent 458a915 commit 76cd292

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7957
-7967
lines changed

ARCHITECTURE.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document describes the high-level architecture of Union and associated pack
44

55
## Repository Structure
66

7-
At the root of the repository, you'll find directories such as `uniond`, `unionvisor`, and `unionpd`, which are binaries necessary to run the network. To see how to build one of these binaries, check the `flake.nix` file. These binaries can be built by running
7+
At the root of the repository, you'll find directories such as `uniond`, `unionvisor`, and `unionpd`, which are binaries necessary to run the network. To see how to build one of these binaries, check the `flake.nix` file. These binaries can be built by running
88

99
```nix
1010
nix build .\#uniond # or unionvisor or unionpd
@@ -14,15 +14,15 @@ To see all packages/apps that we define, run `nix flake show`. To see how these
1414

1515
### Generated Code
1616

17-
Currently generated code, such as protobuf definitions and a vendor directory, are checked into the repo. This will be removed later once we add support for private repos and proto derivations.
17+
Currently generated code, such as protobuf definitions and a vendor directory, are checked into the repo. This will be removed later once we add support for private repos and proto derivations.
1818

1919
### READMEs
2020

21-
We attempt to have a README.md for every significant component, describing what it is and how to work on it.
21+
We attempt to have a README.md for every significant component, describing what it is and how to work on it.
2222

2323
### Documentation
2424

25-
Source code is always the source of truth. The best location to get into the nitty-gritty details is doc comments. We currently do not publish these, but might in the future.
25+
Source code is always the source of truth. The best location to get into the nitty-gritty details is doc comments. We currently do not publish these, but might in the future.
2626

2727
We refrain from separating docs and links from the actual code, as refactors can create dead links and stale docs. It's best to use text search to find where components are defined, as PRs are still adding significant components.
2828

@@ -34,7 +34,7 @@ We refrain from separating docs and links from the actual code, as refactors can
3434
`unionvisor` is a supervisor of `uniond`, which makes deployments easier and more resilient. It is not required for node operations but is recommended.
3535
`unionpd` is the ZK prover. Validators do not need to run it, but IBC relayers and MEV searchers will need to process transactions and capture value.
3636

37-
### Support
37+
### Support
3838

39-
`tools` is used to bring in 3rd party tooling and development tools.
39+
`tools` is used to bring in 3rd party tooling and development tools.
4040
`networks` is used to define docker-compose configurations of Union and Ethereum networks for local testing.

CONTRIBUTING.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Welcome to Union
22

3-
Thank you for investing your time in contributing to our project!
3+
Thank you for investing your time in contributing to our project!
44

55
In this guide, you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.
66

@@ -16,7 +16,6 @@ We evaluate the need for a PR based on:
1616
2. Maintainability: will this become a burden for little gain, or add value?
1717
3. Can the core team understand the code additions being made, and maintain them, or will they rely on you in the future?
1818

19-
2019
## Working on a PR
2120

2221
Make sure to check the ARCHITECTURE.md document to get a feel for the repository structure. It explains our build system more in-depth. If you want to run approximately the same tests as CI does, run `nix flake check`. For this, you will need to install [nix](https://zero-to-nix.com/start/install).
@@ -25,7 +24,7 @@ Make sure to check the ARCHITECTURE.md document to get a feel for the repository
2524

2625
Sometimes you might need to extend the CI. For this always use nix. You'll need to keep a few things into account:
2726

28-
1. Your additions must ensure compatibility with our supported targets:
27+
1. Your additions must ensure compatibility with our supported targets:
2928

3029
```nix
3130
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
@@ -49,5 +48,4 @@ Finally, remain polite and friendly. Reviewing can feel harsh, but it is a learn
4948

5049
## Post-Merge
5150

52-
You'll be an official contributor and mentioned in the release, as well as visible in GitHub's analytics.
53-
51+
You'll be an official contributor and mentioned in the release, as well as visible in GitHub's analytics.

VERSIONING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Two main versioning processes are elaborated on below: our use of semantic versi
88

99
Our implementation of semantic versioning is in the form of `v{X}.{Y}.{Z}` where:
1010

11-
* `{X}` indicates the major version. Major versions contain new features that may be incompatible with older versions and alter union's consensus. Detailed release notes and announcements can be expected for major versions.
11+
- `{X}` indicates the major version. Major versions contain new features that may be incompatible with older versions and alter union's consensus. Detailed release notes and announcements can be expected for major versions.
1212

1313
Node Update: `required`
1414

15-
* `{Y}` indicates the minor version. Minor versions may contain non-feature changes that may still be breaking. Usually these are reserved for security updates and bug fixes. Detailed release notes and announcements can be expected for minor versions.
15+
- `{Y}` indicates the minor version. Minor versions may contain non-feature changes that may still be breaking. Usually these are reserved for security updates and bug fixes. Detailed release notes and announcements can be expected for minor versions.
1616

1717
Node Update: `required`
1818

19-
* `{Z}` indicates the patch version. Patch versions will not contain breaking changes or new features. Release notes will be auto-generated from git commits for patch versions, announcements should not be expected.
19+
- `{Z}` indicates the patch version. Patch versions will not contain breaking changes or new features. Release notes will be auto-generated from git commits for patch versions, announcements should not be expected.
2020

2121
Node Update: `optional`
2222

cspell.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@
88
"addWords": true
99
}
1010
],
11-
"dictionaries": [
12-
"en_US",
13-
"companies",
14-
"softwareTerms",
15-
"go",
16-
"union"
17-
],
11+
"dictionaries": ["en_US", "companies", "softwareTerms", "go", "union"],
1812
"ignorePaths": [
1913
"rust/ethereum-light-client/src/test/valid_light_client_update_*.json",
2014
"rust/protos/*",

docs/README.md

-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ nix run .\#docs-dev-server
1010

1111
Then open [localhost:3000](http://localhost:3000) in your browser. Edit the contents of `docs/` and see them change live in your browser.
1212

13-
1413
## Static Build
1514

1615
```
1716
nix build .\#docs
1817
```
19-

docs/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
33
};

docs/docs/architecture/mainnet.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: 'Mainnet Overview'
2+
title: "Mainnet Overview"
33
---
44

55
# Mainnet
66

7-
The union.fi mainnet release date will be announced after the public testnet period has ended.
7+
The union.fi mainnet release date will be announced after the public testnet period has ended.
88

9-
## Genesis
9+
## Genesis
1010

1111
The network will be bootstrapped with the top validators from the public testnet
1212

@@ -20,4 +20,4 @@ The network has an initial active validator set size of 64, which may be increas
2020

2121
### Prover
2222

23-
The prover connects over the RPC interface to construct CometBLS-Groth16 proofs. It submits these to the Ethereum.
23+
The prover connects over the RPC interface to construct CometBLS-Groth16 proofs. It submits these to the Ethereum.

docs/docs/architecture/testnet.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
---
2-
title: 'Testnet Overview'
2+
title: "Testnet Overview"
33
---
44

55
# Testnet
66

7-
The union.fi testnet acts as a production-like staging environment, tracking the release candidates of [uniond](https://github.com/unionfi/union).
7+
The union.fi testnet acts as a production-like staging environment, tracking the release candidates of [uniond](https://github.com/unionfi/union).
88

9-
## Genesis
9+
## Genesis
1010

1111
The network was bootstrapped with 6 validators from the founding team. The genesis config may be found [here](https://github.com/UnionFi/genesis).
1212

1313
## Architecture
1414

1515
### Topology
1616

17-
The private testnet has 6 validators. It is not configured to be proof of authority (POA), but since tokens are not available until the public testnet, it is effectively a POA chain. The genesis validators are used as boot and RPC nodes.
17+
The private testnet has 6 validators. It is not configured to be proof of authority (POA), but since tokens are not available until the public testnet, it is effectively a POA chain. The genesis validators are used as boot and RPC nodes.
1818

1919
<img src="/img/testnet-overview.drawio.svg" width="100%" height="30%"/>
2020

2121
### Prover
2222

2323
The prover connects over the RPC interface to construct CometBLS-Groth16 proofs. It submits these to the [Goerli Testnet](https://goerli.net/).
2424

25-
In production configurations, a relayer should connect to its validator to avoid data withholding attacks and for increased reliability.
25+
In production configurations, a relayer should connect to its validator to avoid data withholding attacks and for increased reliability.

docs/docs/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ slug: /
44

55
# Union Finance
66

7-
Union Finance docs.
7+
Union Finance docs.

docs/docs/nodes-validators/create-testnet-genesis.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Creating the Testnet Genesis'
2+
title: "Creating the Testnet Genesis"
33
---
44

55
<!--
@@ -23,7 +23,7 @@ Both the host node and genesis validators should generate an app key pair.
2323

2424
To add your app key, you can use the `uniond keys` interface to either create a new key pair or import an existing key pair.
2525

26-
*Note: The variable ` $KEY_NAME` is to be replaced by whatever name you desire to locally refer to your app key by.*
26+
_Note: The variable ` $KEY_NAME` is to be replaced by whatever name you desire to locally refer to your app key by._
2727

2828
### Create a new Key Pair
2929

@@ -95,9 +95,9 @@ The `genesis.json` file has many options for configuration. A good summary of wh
9595

9696
Most notably, the sections:
9797

98-
* [Mint](https://hub.cosmos.network/main/resources/genesis.html#mint)
99-
* [Staking](https://hub.cosmos.network/main/resources/genesis.html#staking)
100-
* [Slashing](https://hub.cosmos.network/main/resources/genesis.html#slashing)
98+
- [Mint](https://hub.cosmos.network/main/resources/genesis.html#mint)
99+
- [Staking](https://hub.cosmos.network/main/resources/genesis.html#staking)
100+
- [Slashing](https://hub.cosmos.network/main/resources/genesis.html#slashing)
101101

102102
### Provide Genesis Validators Proto-Config
103103

@@ -115,13 +115,13 @@ To generate the genesis transaction, we will use `uniond gentx`.
115115

116116
The following values should be defined as follows:
117117

118-
* `KEY_NAME` Name of the app key you created/restored earlier.
118+
- `KEY_NAME` Name of the app key you created/restored earlier.
119119

120-
* `STAKE` The stake you will put down to be a validator (`10000000 <= STAKE < genesis_balance`).
120+
- `STAKE` The stake you will put down to be a validator (`10000000 <= STAKE < genesis_balance`).
121121

122-
* `PUBKEY` the value returned from `uniond tendermint show-validator`
122+
- `PUBKEY` the value returned from `uniond tendermint show-validator`
123123

124-
* `MONIKER` Your moniker ID.
124+
- `MONIKER` Your moniker ID.
125125

126126
```sh
127127
uniond gentx $KEY_NAME $STAKE "bn254" --chain-id union-testnet-1 --pubkey $PUBKEY --moniker $MONIKER
@@ -164,7 +164,6 @@ cp ~/.uniond/config/genesis.json union-testnet/
164164

165165
After you have contributed the genesis file, genesis validators will be able to obtain the final genesis config.
166166

167-
168167
## Genesis Validators
169168

170169
The last step for genesis validators is to obtain the genesis configuration and overwrite their current one with it.

docs/docs/nodes-validators/running-uniond.md

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Running uniond'
2+
title: "Running uniond"
33
---
44

55
# Running `uniond`
@@ -12,11 +12,11 @@ To run `uniond` without manually installing `nix` or NixOS, you can use docker.
1212

1313
## Pre-requisites
1414

15-
* A working installation of docker
15+
- A working installation of docker
1616

1717
## Login
1818

19-
*Note: This section will not be required once the [union](https://github.com/unionfi/union) repository is public*
19+
_Note: This section will not be required once the [union](https://github.com/unionfi/union) repository is public_
2020

2121
We use the GitHub Container Registry to host our docker images. Given the [union](https://github.com/unionfi/union) repository is under a private organization, you will first need to authenticate docker with ghcr.io before downloading and running the `uniond` docker image.
2222

@@ -30,7 +30,7 @@ docker login ghcr.io
3030

3131
Supply `docker` with your GitHub username. When asked for your password, instead supply your GitHub PAT that you just created and noted.
3232

33-
*Note: By default, `docker` will insecurely store your GitHub PAT. For alternatives, see: [docker login: Credentials Store](https://docs.docker.com/engine/reference/commandline/login/#credentials-store)*
33+
_Note: By default, `docker` will insecurely store your GitHub PAT. For alternatives, see: [docker login: Credentials Store](https://docs.docker.com/engine/reference/commandline/login/#credentials-store)_
3434

3535
You should now be able to download and run docker images from ghcr.io.
3636

@@ -48,7 +48,7 @@ You should now be able to run this version of `uniond` locally.
4848

4949
Running `uniond` with `docker run` has a few caveats. These tips will help ensure you're able to accomplish everything you need with `uniond` using `docker`.
5050

51-
* **Storing your `uniond` configuration:**
51+
- **Storing your `uniond` configuration:**
5252

5353
When interacting with `uniond` it is helpful to have a persistent and accessible location to store your `uniond` configuration.
5454

@@ -62,7 +62,7 @@ Running `uniond` with `docker run` has a few caveats. These tips will help ensur
6262
docker run --mount type=bind,source="$HOME/uniond-config",target=/uniond-config $DOCKER_FLAGS ghcr.io/unionfi/uniond:$UNIOND_VERSION $UNIOND_SUB_COMMAND --home "/uniond-config"
6363
```
6464

65-
* **Publish your docker container ports:**
65+
- **Publish your docker container ports:**
6666

6767
When running a validator node, you will need to publish the necessary TCP ports to communicate with and receive request from other nodes.
6868

@@ -72,5 +72,3 @@ Running `uniond` with `docker run` has a few caveats. These tips will help ensur
7272
# Include both ports for traffic to flow through
7373
docker run -p 26656:26656 -p 26657:26657 $DOCKER_FLAGS ghcr.io/unionfi/uniond:$UNIOND_VERSION $UNIOND_SUB_COMMAND
7474
```
75-
76-

docs/docs/nodes-validators/setting-up-node.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: 'Setting up a node'
2+
title: "Setting up a node"
33
---
44

55
# Setting Up a Node
66

77
This document will walk you through the process of self-hosting a Union node.
88

9-
# Requirements
9+
# Requirements
1010

1111
To be able to send and receive messages in the network, you'll need to conduct TCP port forwarding for ports `26656` & `26657`.
1212

@@ -18,7 +18,7 @@ To be able to send and receive messages in the network, you'll need to conduct T
1818

1919
This section will walk you through building the node binary. These instructions are different for Docker and Nix.
2020

21-
*NOTE: It's expected that all validators/nodes use Nix or Docker to set up their node. Imperative installations are not officially supported.*
21+
_NOTE: It's expected that all validators/nodes use Nix or Docker to set up their node. Imperative installations are not officially supported._
2222

2323
## Docker
2424

@@ -33,33 +33,34 @@ Run `nix build` in the root of our repository after cloning:
3333
nix build "github:UnionFi/union"
3434
```
3535
-->
36+
3637
```sh
3738
nix build "git+ssh://[email protected]/UnionFi/union"
3839
```
3940

40-
*NOTE: the `uniond` executable is stored as `./result/bin/uniond`*
41+
_NOTE: the `uniond` executable is stored as `./result/bin/uniond`_
4142

4243
# Environment Variables
4344

4445
This document will often refer to environment variables you likely don't have set. You can either manually replace them before running commands, or set them before starting with the rest of the tutorial.
4546

4647
Here's a list of the environment variables we'll use and hints for setting them:
4748

48-
* ` $CHAIN_ID` - either `union-1` for mainnet, or `union-testnet-1` for testnet.
49+
- ` $CHAIN_ID` - either `union-1` for mainnet, or `union-testnet-1` for testnet.
4950

5051
```sh
5152
# Example $CHAIN_ID
5253
CHAIN_ID=union-testnet-1
5354
```
5455

55-
* ` $MONIKER` - The name used for your validator node.
56+
- ` $MONIKER` - The name used for your validator node.
5657

5758
```sh
5859
# Example $MONIKER
5960
MONIKER="Unionized Goblin"
6061
```
6162

62-
* ` $KEY_NAME` - The name you've assigned to the key pair you'll use for this tutorial.
63+
- ` $KEY_NAME` - The name you've assigned to the key pair you'll use for this tutorial.
6364

6465
```sh
6566
# Example $KEY_NAME
@@ -68,7 +69,7 @@ Here's a list of the environment variables we'll use and hints for setting them:
6869

6970
# Connect to the Public RPC
7071

71-
*NOTE: The public RPC is currently not available.*
72+
_NOTE: The public RPC is currently not available._
7273

7374
Now to connect the `uniond` binary to the public RPC.
7475

@@ -81,6 +82,7 @@ uniond config chain-id $CHAIN_ID
8182
Set the public RPC node:
8283

8384
<!-- TODO: Replace `$RPC_NODE_URL` with our RPC node URL. https://github.com/UnionFi/union/issues/30 -->
85+
8486
```sh
8587
uniond config node $RPC_NODE_URL
8688
```
@@ -97,9 +99,10 @@ uniond init $MONIKER "bn254" --chain-id $CHAIN_ID
9799

98100
**`GENESIS_URL` options:**
99101

100-
* Union Testnet: `https://raw.githubusercontent.com/unionfi/genesis/main/union-testnet-1/genesis.json`
102+
- Union Testnet: `https://raw.githubusercontent.com/unionfi/genesis/main/union-testnet-1/genesis.json`
101103

102104
<!-- TODO: Create and upload genesis file for users to download. https://github.com/UnionFi/union/issues/31 -->
105+
103106
```sh
104107
curl $GENESIS_URL > ~/.union/config/genesis.json
105108
```
@@ -196,5 +199,5 @@ Where `STAKE` is the amount of stake you're putting down for your validator (i.e
196199

197200
It's then recommended to backup these files from `~/.union/config` in a secure location:
198201

199-
* `priv_validator_key.json`
200-
* `node_key.json`
202+
- `priv_validator_key.json`
203+
- `node_key.json`

0 commit comments

Comments
 (0)