Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update readme with instructions for Dockerized environment #37

Merged
merged 3 commits into from
Jul 10, 2023

Conversation

NickVolynkin
Copy link
Contributor

@NickVolynkin NickVolynkin commented Jul 9, 2023

docs: update readme with instructions for Dockerized environment

Update two sections:

  • Introduction: cloning the repository and getting Docker images.
  • Local development workflow: compile a circuit, make a statement, make a proof.

Add a table of contents, made with doctoc:

npm install -g doctoc
doctoc README.md

The section with Proof Market is almost untouched and very much out of date. Will update it in #21

Preview the updated instructions in https://github.com/NilFoundation/zkllvm-template/blob/readme/README.md.

Resolve #4
Resolve #18

run.sh: rename script and explicitly run in verbose mode

Rename ci.sh to run.sh.
The main purpose of this script is not to facilitate CI.
It is to give developers who take the course a super-easy and reliable
way to go through it.
We only test it in CI to check that it works when developers use it.

Do the set -x explicitly with the --verbose key.
We need this setting in CI and when developing the code in the workflow.
Although, developers who take the course don't need all this extra noise
in their console.

run.sh: make config.ini available in all conditions

The proof-generator binary looks for the config in
~/.config/config.ini. As we run the container with --user,
the username inside the container is one of three options:

  • The root, if the host user is also root; in this case the config
    directory is /root/.config/.

  • An unnamed user with given id; in this case the username is empty,
    so the config directory is /.config/.

  • A named user with the same id as on the host; it can happen only if
    the developer has made a custom image by adding something like this:

    RUN useradd -u 1337 -m zkdev
    USER zkdev

    It's the safest option, but we can't expect everyone to do it as we
    try to make the tutorial as simple as possible.

Workaround for NilFoundation/proof-market-toolchain#61

@NickVolynkin NickVolynkin force-pushed the readme branch 5 times, most recently from 54d4474 to de8fa03 Compare July 9, 2023 09:48
Rename ci.sh to run.sh.
The main purpose of this script is not to facilitate CI.
It is to give developers who take the course a super-easy and reliable
way to go through it.
We only test it in CI to check that it works when developers use it.

Do the `set -x` explicitly with the `--verbose` key.
We need this setting in CI and when developing the code in the workflow.
Although, developers who take the course don't need all this extra noise
in their console.
@NickVolynkin NickVolynkin force-pushed the readme branch 24 times, most recently from 6009f51 to ada05a3 Compare July 9, 2023 12:41
The `proof-generator` binary looks for the config in
~/.config/config.ini. As we run the container with `--user`,
the username inside the container is one of three options:

* The `root`, if the host user is also `root`; in this case the config
  directory is `/root/.config/`.
* An unnamed user with given id; in this case the username is empty,
  so the config directory is `/.config/`.
* A named user with the same id as on the host; it can happen only if
  the developer has made a custom image by adding something like this:

  ```Dockerfile
  RUN useradd -u 1337 -m zkdev
  USER zkdev
  ```

  It's the safest option, but we can't expect everyone to do it as we
  try to make the tutorial as simple as possible.

Workaround for NilFoundation/proof-market-toolchain#61
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
Update two sections:

* Introduction: cloning the repository and getting Docker images.
* Local development workflow: compile a circuit, make a statement, make a proof.

Add a table of contents, made with `doctoc`:
```bash
npm install -g doctoc
doctoc README.md
```

The section with Proof Market is almost untouched and very much out of date.
Will update it in #21

Resolve #4
Resolve #18i
Copy link

@alexandra-mara alexandra-mara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@NickVolynkin NickVolynkin merged commit e3b6bed into master Jul 10, 2023
1 check passed
@NickVolynkin NickVolynkin deleted the readme branch July 10, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial: describe the local proving workflow Tutorial: describe the zkLLVM stage
3 participants