Skip to content

Commit

Permalink
Fmt, comments and minor rewording
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless committed Dec 15, 2020
1 parent 062a348 commit 81ed823
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ zk test db
zk run loadtest # Has to be run in the 3rd terminal
```

**Note**. If you have compilation issues with `sqlx`, then make sure to run `zk up` before running the tests.
**Note**. If you have compilation issues with `sqlx`, then make sure to run `zk up` before running the tests. Also, if
you see some tests fail, might need to call `zk db reset` and restart the tests.

## Developing circuit

Expand Down
12 changes: 9 additions & 3 deletions docs/launch.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ zk init
During the first initialization you have to download around 8 GB of setup files, this should be done once. If you have a
problem on this step of the initialization, see help for the `zk run plonk-setup` command.

If you any other problems with the `zk init` command, go to the `Troubleshooting` section at the end of this file. There are solutions for some common error cases.
If you any other problems with the `zk init` command, go to the `Troubleshooting` section at the end of this file. There
are solutions for some common error cases.

To completely reset the dev environment:

Expand Down Expand Up @@ -93,18 +94,22 @@ output.
## Troubleshooting

### Invalid mount config for type "bind"

**Problem.** `zk init` failes with the following error:

```sh
Cannot create container for service geth: invalid mount config for type "bind": bind source path does not exist: /home/stanislav/matter-labs/zksync-dev/volumes/geth
```
```

You might also see these errors not only for geth, but also for `postgres` and `tesseracts`.

**Solution**. In the repository folder there should be a folder `volumes`, with three folders inside of it: `geth`, `tesseracts`, `postgres`. If some of these are missing, you must create them on your own.
**Solution**. In the repository folder there should be a folder `volumes`, with three folders inside of it: `geth`,
`tesseracts`, `postgres`. If some of these are missing, you must create them on your own.

### SSL error: certificate verify failed

**Problem**. `zk init` failes with the following error:

```sh
Initializing download: https://universal-setup.ams3.digitaloceanspaces.com/setup_2%5E20.key
SSL error: certificate verify failed
Expand All @@ -115,6 +120,7 @@ SSL error: certificate verify failed
### rmSync is not a function

**Problem**. `zk init` failes with the following error:

```sh
fs_1.default.rmSync is not a function
```
Expand Down
24 changes: 18 additions & 6 deletions docs/setup-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ If logging out does not help, restarting the computer should.
## `Node` & `Yarn`
1. Install `node` (requires version 14.14.0 or higher).
Since our team tries to always use the latest LTS version of `node.js`, we suggest you to install [nvm](https://github.com/nvm-sh/nvm). It will allow you to update the node version quickly in the future.
1. Install `Node` (requires version 14.14.0 or higher). Since our team attempts to always use the latest LTS version of
`Node.js`, we suggest you to install [nvm](https://github.com/nvm-sh/nvm). It will allow you to update `Node.js`
version easily in the future.
2. Install `yarn`. Instructions can be found on the [official site](https://classic.yarnpkg.com/en/docs/install/).
Expand All @@ -47,7 +48,9 @@ Check if yarn is installed by running the following command:
$ yarn -v
```
If you face any problems when installing `yarn`, it might be the case that your package manager installed the wrong package. Make sure to thoroughly follow the instructions above on the official website. It has a lot of troubleshooting guides in it.
If you face any problems when installing `yarn`, it might be the case that your package manager installed the wrong
package. Make sure to thoroughly follow the instructions above on the official website. It has a lot of troubleshooting
guides in it.
3. Run `yarn global add @vue/cli-service`
Expand Down Expand Up @@ -143,18 +146,27 @@ Also, we need [`sqlx`](https://github.com/launchbadge/sqlx) CLI (it is used to g
cargo install --version=0.2.0 sqlx-cli
```

If you face an error `Could not find directory of OpenSSL installation`, then you should do the following. The instruction is targeted on debian-based Linux, but generally the steps are similar for all OS.
If you face an error `Could not find directory of OpenSSL installation`, then you should do the following. The
instruction is targeted on debian-based Linux, but generally the steps are similar for all OS.

- Install `libssl-dev`:

```sh
sudo apt install libssl-dev
```
- Install OpenSSL. Here is [the instruction for Ubuntu](https://www.notion.so/matterlabs/Setup-checklist-056a2e5c3a104608a5a25788520ef0ff#5f34729bdffe496f9d38c46787c640d7), but the steps should be similar for the debian-based Linux distros.
- Add `OPENSSL_DIR` variable to your environment. This would typically be `/usr/local/ssl`. You can do this by adding the following line to your shell profile file (e.g. `~/.bash_profile`):

- Install OpenSSL. Here is
[the instruction for Ubuntu](https://www.notion.so/matterlabs/Setup-checklist-056a2e5c3a104608a5a25788520ef0ff#5f34729bdffe496f9d38c46787c640d7),
but the steps should be similar for the debian-based Linux distros.
- Add `OPENSSL_DIR` variable to your environment. This would typically be `/usr/local/ssl`. You can do this by adding
the following line to your shell profile file (e.g. `~/.bash_profile`):

```sh
export OPENSSL_DIR=/usr/local/ssl
```

- Install `package-config`:

```sh
sudo apt-get install -y pkg-config
```
Expand Down
2 changes: 2 additions & 0 deletions infrastructure/zk/src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ async function checkEnv() {
}
await utils.exec('cargo sqlx --version');
const { stdout: version } = await utils.exec('node --version');
// Node v.14.14 is required because
// the `fs.rmSync` function was added in v14.14.0
if ('v14.14' >= version) {
throw new Error('Error, node.js version 14.14.0 or higher is required');
}
Expand Down

0 comments on commit 81ed823

Please sign in to comment.