Skip to content

Commit 4bc229c

Browse files
authored
chore: improvements to book on interface (#1593)
1 parent b89a1c0 commit 4bc229c

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

book/src/custom-extensions/overview.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,40 @@ Our design for the configuration procedure above was inspired by the [EVMMAX pro
2828
To use these extensions, you must populate an `openvm.toml` in your package root directory (where the `Cargo.toml` file is located).
2929
We will explain in each extension how to configure the `openvm.toml` file.
3030

31-
The template `openvm.toml` file is as follows:
31+
A template `openvm.toml` file using the default VM extensions shipping with OpenVM is as follows:
3232

3333
```toml
3434
[app_vm_config.rv32i]
35+
3536
[app_vm_config.rv32m]
37+
range_tuple_checker_sizes = [256, 8192]
38+
3639
[app_vm_config.io]
40+
3741
[app_vm_config.keccak]
42+
3843
[app_vm_config.sha256]
44+
3945
[app_vm_config.native]
46+
4047
[app_vm_config.bigint]
48+
range_tuple_checker_sizes = [256, 8192]
49+
4150
[app_vm_config.modular]
4251
supported_modulus = ["<modulus_1>", "<modulus_2>", ...]
52+
4353
[app_vm_config.fp2]
4454
supported_modulus = ["<modulus_1>", "<modulus_2>", ...]
55+
4556
[app_vm_config.pairing]
4657
supported_curves = ["Bls12_381", "Bn254"]
58+
4759
[[app_vm_config.ecc.supported_curves]]
4860
modulus = "<modulus_1>"
4961
scalar = "<scalar_1>"
5062
a = "<a_1>"
5163
b = "<b_1>"
64+
5265
[[app_vm_config.ecc.supported_curves]]
5366
modulus = "<modulus_2>"
5467
scalar = "<scalar_2>"

book/src/getting-started/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ OPENVM_FAST_TEST=1 cargo openvm prove app --input "0x010A00000000000000"
7070
```
7171

7272
The `--input` field is passed to the program which receives it via the `io::read` function.
73-
In our `main.rs` we called `read()` to get `n: u64`. The input here is `n = 10u64` _in little endian_. Note that this value must be padded to exactly 8 bytes (64 bits).
73+
In our `main.rs` we called `read()` to get `n: u64`. The input here is `n = 10u64` _in little endian_. Note that this value must be padded to exactly 8 bytes (64 bits) and is prefixed with `0x01` to indicate that the input is composed of raw bytes.
7474

7575
The serialized proof will be output to `./openvm/app.proof`.
7676

book/src/writing-apps/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ To see how more complex inputs can be converted into a VM-readable format, see t
3636

3737
## Generating a Proof
3838

39-
Given an app configuration TOML file, you first need to generate a proving and verifying key:
39+
To generate a proof, you first need to generate a proving and verifying key:
4040

4141
```bash
4242
cargo openvm keygen
4343
```
4444

45-
After generating the keys, you can generate a proof by running:
45+
If you are using custom VM extensions, this will depend on the `openvm.toml` file which encodes the VM extension configuration; see the [custom extensions](../custom-extensions/overview.md) docs for more information about `openvm.toml`. After generating the keys, you can generate a proof by running:
4646

4747
```bash
4848
cargo openvm prove app --input <path_to_input | hex_string>

0 commit comments

Comments
 (0)