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: minor terminology updates and style fixes #102

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions gitbook-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ a computational infrastructure, scale it, and specialize as a proof producer.

`=nil;` understands that generating proofs is a task that should be outsourced to such
a specialized provider.
This is exactly why we are building the Proof Market — a marketplace where everyone can request a zkProof,
This is exactly why we are building Proof Market — a marketplace where everyone can request a zkProof,
and a network of specialized producers will respond to such requests.

We see the Proof Market as the place where proof requesters and proof producers will meet
We see Proof Market as the place where proof requesters and proof producers meet
and create a free, open, and self-sustaining market.



{% hint style="info" %}
Currently, the Proof Market accepts circuits generated using our zkLLVM compiler.
Currently, Proof Market accepts circuits generated using our zkLLVM compiler
and based on the [Placeholder](https://github.com/NilFoundation/evm-placeholder-verification) proof system.
However, the ultimate goal is to enable validation of any proofs from any system.
{% endhint %}

{% hint style="warning" %}
The Proof Market is currently in its beta version.
Proof Market is currently in its beta version.
We expect there will be continuous changes in it following the feedback we receive from the customers.
{% endhint %}
30 changes: 15 additions & 15 deletions gitbook-docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@

* [Portal overview](getting-started/portal-overview.md)
* [Environment setup](getting-started/environment-setup.md)
* [Installation](getting-started/installation.md)
* [Toolchain installation](getting-started/installation.md)

## Market

* [Economics](market/economics.md)
* [Supported proof systems](market/supported-proof-systems.md)
* [User Guides](market/user-guides/README.md)
* [User guides](market/user-guides/README.md)
* [Sign up](market/user-guides/sign-up.md)
* [Circuit Developer](market/user-guides/circuit-developer.md)
* [Proof Requester](market/user-guides/proof-requester.md)
* [Proof Producer](market/user-guides/proof-producer.md)
* [Circuit developer](market/user-guides/circuit-developer.md)
* [Proof requester](market/user-guides/proof-requester.md)
* [Proof producer](market/user-guides/proof-producer.md)
* [Web interface](market/front-end.md)
* [CLI Reference](market/cmd-reference/README.md)
* [CLI reference](market/cmd-reference/README.md)
* [User account utilities](market/cmd-reference/user.md)
* [Statement](market/cmd-reference/statement.md)
* [Statement utilities](market/cmd-reference/statement.md)
* [Proposal utilities](market/cmd-reference/bid.md)
* [Request utilities](market/cmd-reference/ask.md)
* [Proof utilities](market/cmd-reference/proof.md)
* [Terminology](market/overview.md)

## Guides

* [Requester/Producer Flow](guides-1/requester-producer-flow.md)
* [Mina Proof pipeline - Example](guides-1/mina-proof-pipeline-example/README.md)
* [1. Setup](guides-1/mina-proof-pipeline-example/1.-setup.md)
* [2. Deploy zkApp](guides-1/mina-proof-pipeline-example/2.-deploy-zkapp.md)
* [3. Proof Request](guides-1/mina-proof-pipeline-example/3.-proof-request.md)
* [4. Validate Proof](guides-1/mina-proof-pipeline-example/4.-validate-proof.md)
* [Requester/producer flow](guides-1/requester-producer-flow.md)
* [Mina proof pipeline example](guides-1/mina-proof-pipeline-example/README.md)
* [Part 1. Setup](guides-1/mina-proof-pipeline-example/1.-setup.md)
* [Part 2. Deploying zkApp](guides-1/mina-proof-pipeline-example/2.-deploy-zkapp.md)
* [Part 3. Requesting a proof](guides-1/mina-proof-pipeline-example/3.-proof-request.md)
* [Part 4. Proof validation](guides-1/mina-proof-pipeline-example/4.-validate-proof.md)

## Misc

* [Contributing](misc/contributing.md)
* [Code Of Conduct](misc/code-of-conduct.md)
* [Contact](misc/contact.md)
* [Code of conduct](misc/code-of-conduct.md)
* [Contact us](misc/contact.md)
6 changes: 3 additions & 3 deletions gitbook-docs/getting-started/environment-setup.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
description: Environment setup for the Proof Market CLI
description: Environment setup for Proof Market CLI
---

# Environment setup

This guide describes how to set up packages/libraries required to interact
with the Proof Market through the command line.
with Proof Market through the command line.

## Dependencies

Expand Down Expand Up @@ -47,7 +47,7 @@ Use the recommended versions of the libraries to avoid compilation issues:

We've tested the following versions of the libraries:

```
```bash
NickVolynkin marked this conversation as resolved.
Show resolved Hide resolved
clang-12
clang++12
boost == 1.76
Expand Down
17 changes: 6 additions & 11 deletions gitbook-docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Make sure you've performed the [environment setup](environment-setup.md) before
continuing with the installation.
{% endhint %}

The Proof Market toolchain is a collection of Python scripts for interacting with the Proof Market.
[Proof Market toolchain](https://github.com/NilFoundation/proof-market-toolchain)
is a collection of Python scripts for interacting with Proof Market.
These scripts are required for all participants.

Clone the repository:
Expand All @@ -16,23 +17,21 @@ git clone --recurse-submodules git@github.com:NilFoundation/proof-market-toolcha

Based on the user's role, they must install additional binaries/scripts to interact with the market.

To interact with the proof market, you must also have Python setup and its dependencies.
To interact with Proof Market, you must also have Python setup and its dependencies.

We recommend setting up a virtual environment to interact with the proof market.
We recommend setting up a virtual environment to interact with Proof Market.

```
```bash
pip3 install --user virtualenv
python3 -m virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
```



## Circuit developer

* Follow the installation guide for [zkLLVM](https://docs.nil.foundation/zkllvm/guides/installation).
zkLLVM is used to compile circuits and generate binaries to be hosted on the Proof Market.
zkLLVM is used to compile circuits and generate binaries to be hosted on Proof Market.
* Set up [authentication](../market/user-guides/sign-up.md) and follow the user guide
for [circuit developers](../market/user-guides/circuit-developer.md).

Expand All @@ -47,7 +46,6 @@ pip3 install -r requirements.txt
## Proof producer

* As a proof producer, you need to compile the `proof-generator` binary.
Currently, there are two options, a single-threaded (low performance) and a multithreaded one.

### Build

Expand All @@ -58,10 +56,7 @@ cmake -G "Unix Makefiles" \
-DCMAKE_C_COMPILER=/usr/bin/clang-12 \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-12 \
..
# Single-threaded version
cmake --build . -t proof-generator
# Multi-threaded version
cmake --build . -t proof-generator-mt
```

* Set up [authentication](../market/user-guides/sign-up.md) and follow the user guide
Expand Down
10 changes: 7 additions & 3 deletions gitbook-docs/getting-started/portal-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ description: Navigating the Proof Market documentation portal
---

# Portal overview

## Getting started

This section describes setting up the environment to interact with the Proof Market.
This section describes setting up the environment to interact with Proof Market.

## Market

The Market section provides articles on market dynamics and participants,
and guides on how to create and sell proofs.

## Guides and tutorials

In this section, you can find step-by-step guides on how to request and obtain proofs
from Proof Market and a Mina proof pipeline example.

## Misc

This section contains other guidelines and information on contributing
to the Proof Market, code of conduct, and contact details for feedback and collaboration.
to Proof Market, code of conduct, and contact details for feedback and collaboration.
4 changes: 2 additions & 2 deletions gitbook-docs/guides-1/mina-proof-pipeline-example/1.-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ You're going to need the following environments ready for this guide.

## Step 1: Proof Market

Prerequisites from the Proof Market side are:
Prerequisites from Proof Market side are:

* [Environment setup](../getting-started/environment-setup.md).
* [Proof Market toolchain installation and setup](../../getting-started/installation.md).
You don't need to set up a virtual environment for the Proof Market toolchain,
You don't need to set up a virtual environment for Proof Market toolchain,
we will only be using its Python scripts.
This directory will be referred to as `proof-market-toolchain` home in the guide.
* [Authentication on Proof Market](../../market/user-guides/sign-up.md).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Part 3. Request a proof
# Part 3. Requesting a proof

In this part, we will collect the information required to submit a proof request
to be validated on EVM and post such a request.
Expand Down Expand Up @@ -65,7 +65,7 @@ Look for the following keys in the statement list:

That's the two proofs we want to be validated in EVM.
For that, we're going to use the [`request_tools.py` script](../../market/cmd-reference/ask.md)
from the Proof Market toolchain:
from Proof Market toolchain:

```bash
python3 scripts/request_tools.py push \
Expand All @@ -81,18 +81,23 @@ current prices, as they may change based on demand.

This proof should validate the full ledger state:

```console
$ python3 scripts/request_tools.py push \
```bash
python3 scripts/request_tools.py push \
--cost 16 \
--file ../mina-state-proof/mina_ledger_state.json \
--key 32292
```

This command will return request's data in JSON format:

```json
{
"_key":"65017881",
"statement_key":"32292",
"status" : "created"
...
}
```
NickVolynkin marked this conversation as resolved.
Show resolved Hide resolved

We will use the `_key` of that request to check the order status and retrieve the proof.
The key of this order is `65017881`, and the status for now is `created`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ If everything went well, you now have two files with proofs,
and all that's left to do is to verify them.
For that you'll need:

* For ledger state proof:
* For ledger state proof
* file with the ledger proof from Proof Market;
* ledger hash which this proof attests to.
* Account state proof:
* For account state proof
* file with the account proof from Proof Market;
* ledger hash which this proof attests to (same as for ledger state proof);
* account state data (in JSON).
Expand Down Expand Up @@ -103,11 +103,6 @@ jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB

### Validating account state

{% hint style="info" %}
Proof validation for account state is still in development.
These commands show the API usage.
{% endhint %}

Upon [checking the account state](2.-deploy-zkapp.md#step-4-check-the-account-state),
it was saved to `mina_zkapp_state.json` in the `mina-state-proof` home.
There's also an example of account data at `examples/data/account_data.json`.
Expand All @@ -121,17 +116,17 @@ Basically, it should look like this:
"locked": Locked/Staked balance in MINA
},
"state": 8-byte state of zkApp/user account,
"proof_extension": id
"proof_extension": proof id
}
```

The `state` needs to be converted into a padded comma-separated string.

To see validation of account bytes in Ethereum, replace the following parameters:
* proof: file path to the account state proof that is validated (a dummy variable for now).
* ledger: hash of the ledger against which the account state is validated.
This should be the hash that has already been committed in the previous step.
* state: file path to the account state to which the above proof attests.
* prooffile path to the account state proof that is validated;
* ledger hash of the ledger against which the account state is validated.
This should be the hash that has already been committed in the previous step;
* state file path to the account state to which the above proof attests.

```bash
npx hardhat validate_account_state \
Expand All @@ -145,7 +140,7 @@ For example, there's a test account state in the repo:

```bash
npx hardhat validate_account_state \
--proof ./account_proof.bin \
--proof ./test/data/proof_account.bin \
--state ./examples/data/account_data.json \
--ledger jwYPLbRQa4X86tSJs1aTzusf3TNdVTj58oyWJQB132sEGUtKHcB \
--network localhost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
This section describes a step-by-step workflow to validate MINA proofs in EVM
via `=nil;` Proof Market.

Start here: [Mina proof pipeline example, step 1](1.-setup.md).
Start here: [Mina proof pipeline example, part 1](1.-setup.md).
6 changes: 3 additions & 3 deletions gitbook-docs/guides-1/requester-producer-flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Request orders can optionally carry public inputs.
For our example, we'll send two numbers we want to be added on the Pallas curve.
We will use a sample input from the `proof-market-toolchain` repository:

```console
```bash
$ python3 scripts/request_tools.py push \
--cost 2 \
--file ./example/input/arithmetic_example/input.json \
Expand Down Expand Up @@ -217,7 +217,7 @@ See the corresponding part
of the [proof producer's guide](../market/user-guides/proof-producer.md#order-status-fetch-inputs).

```console
$ ./build/bin/proof-generator-mt/proof-generator-mt \
$ ./build/bin/proof-generator/proof-generator \
--circuit_input example/statements/arithmetic_example_statement.json \
--public_input example/input/arithmetic_example/input.json \
--proof_out arithmetic_proof.bin
Expand Down Expand Up @@ -259,7 +259,7 @@ Requests:
}
```

To retrieve proof from the Proof Market, you'll need either the proof key or the request key.
To retrieve proof from Proof Market, you'll need either the proof key or the request key.

```bash
python3 scripts/proof_tools.py get \
Expand Down
3 changes: 2 additions & 1 deletion gitbook-docs/market/cmd-reference/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CLI Reference

Use the scripts from the [Proof Market toolchain](https://github.com/NilFoundation/proof-market-toolchain) to interact with the Proof Market:
Use the scripts from [Proof Market toolchain](https://github.com/NilFoundation/proof-market-toolchain)
to interact with Proof Market:

* [Make a new account](user.md).
* [Push your statement as a circuit developer](statement.md).
Expand Down
4 changes: 2 additions & 2 deletions gitbook-docs/market/cmd-reference/proof.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ options:

## Submitting proof

You'll need the proof file and request or proposal key to submit proof to the Proof Market.
You'll need the proof file and request or proposal key to submit proof to Proof Market.
You can provide only one of the two possible keys.

### Usage
Expand Down Expand Up @@ -55,7 +55,7 @@ Proof for 458426 is pushed

## Retrieving proof

To retrieve proof from the Proof Market, you'll need either the proof key or the request key.
To retrieve proof from Proof Market, you'll need either the proof key or the request key.

### Usage

Expand Down
Loading