You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BM-218: Improve local devnet docs instructions (github#49)
Also includes:
- move to ` ```sh ` and ` ```txt ` code blocks to get `hilight.js` to
work better (comments in script snippets mostly)
- minor glossary fixes
- minor style tweask
Copy file name to clipboardExpand all lines: docs/src/glossary.md
+27-9Lines changed: 27 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,35 @@ Further improving efficiency of inclusion proofs on-chain, this process builds a
11
11
12
12
> See `crates/aggregation-set/src/lib.rs` and `crates/guest/set-builder/set-builder-guest/src/main.rs` for details.
13
13
14
+
### Boundless Market
15
+
16
+
A coordination and clearing mechanism to that connects those requesting proofs generation, along with a commitment of payment, with and those able to fulfill with proof generation and receive payment.
17
+
18
+
In the initial 0th version, the Market is facilitated on-chain where one is [deployed][page-deployments], but it is expected to evolve into more efficient off-chain mechanisms in future versions.
19
+
20
+
> See the [Market Section][page-boundless-market] for more details.
21
+
14
22
### Bento
15
23
16
24
A cluster of services that coordinate to search for, bid on, and attempt to fulfil [proof order](#proof-order)s.
17
25
18
-
> See the [Bento Documentation][page-bento] for moe details.
26
+
> See the [Bento Section][page-bento] for more details.
19
27
20
28
### Broker
21
29
22
-
A cluster of services that coordinate to search for, bid on, and attempt to fulfil [proof order](#proof-order)s.
30
+
The Broker monitors a [deployment][page-deployments] of the [Boundless Market](#boundless-market) and, based on customizable criteria, bids on and locks-in on proof requests. Proof generation jobs are subsequently passed to an instance of [Bento](#bento), and ultimately are the request(s) are fulfilled it on the Market.
31
+
32
+
> See the [Broker Section][page-broker] for more details.
33
+
34
+
### Preflight
35
+
36
+
Running a proof request's execution _only_ via [Bento](#bento) (essential using [RISC Zero's `dev-mode`][r0-page-dev-mode]) in order to calculate the required [cycles][r0-term-clock-cycles] for the [proof order](#proof-order).
23
37
24
-
> See the [Bento Documentation][page-bento] for moe details.
38
+
This allows one to:
39
+
40
+
- Validate an order is possible to fulfill at all (execution completes)
41
+
- Confirm execution results match the [proof order](#proof-order) requirements
42
+
- Calculate - based on custom heuristics - the bid to lock-in on a [market](#boundless-market) order fulfillment.
25
43
26
44
### Prover
27
45
@@ -31,7 +49,7 @@ The market participant that fulfills [proof order](#proof-order)
31
49
32
50
<!-- TODO https://linear.app/risczero/issue/BM-201/replace-proof-request-with-order -->
33
51
34
-
An order placed on the [Boundless Market](#boundless-market) to that includes:
52
+
An order - also called a request - placed on the [Boundless Market](#boundless-market) to that includes:
35
53
36
54
- A Unique ID for the request on the Market
37
55
- Proof Requirements for a this order to be fulfilled, including the [Image ID][r0-term-image-id]
@@ -46,13 +64,13 @@ See `contracts/src/IProofMarket.sol` for more details.
46
64
<!-- TODO https://linear.app/risczero/issue/BM-202/replace-instances-of-client-with-requestor -->
47
65
48
66
Also referred to as the Client in the context of contracts, the party submitting orders to the market proofs form the Boundless Market.
49
-
50
-
### Preflight
51
-
52
-
is this specific and need a name? (run execution to check cost and see if execution is valid at all)
2. Initialize recursive submodules (located in `lib`, required by Foundry)
45
+
```sh
46
+
git submodule update --init
18
47
```
19
48
20
-
2. Test your deployment with the client CLI.
21
-
You can read more about the client on the [proving request][page-requestor-request] page.
49
+
## Run a Market devnet
22
50
23
-
```console
24
-
RISC0_DEV_MODE=1 RUST_LOG=info,boundless_market=debug cargo run --bin cli -- submit-request request.yaml --wait
25
-
```
51
+
For both requestors and provers, you will need to:
26
52
27
-
> If you see "Error: Market error: Failed to check fulfillment status",
28
-
> check the deployment logs from running `forge script` and ensure it matches the addresses listed in `.env`
29
-
> If they don't match, adjust the `.env` file or try restarting anvil and deploying again.
53
+
- Spin up a local `anvil` (or other EVM) devnet
54
+
- Deployed Boundless Market contracts to the devnet
55
+
- Run a [Broker][page-broker] instance that will lock in and return proofs to all proof requests
56
+
- Submit proof requests to be fulfilled by the Broker
30
57
31
-
Congratulations! You now have a local devnet running and a prover that will respond to proving requests.
58
+
### Spin up
32
59
33
-
3. To tear down the local devnet run:
60
+
An instance of the Market needs to be running in the background for applications to interact with, using the included `make` utilities or manually.
34
61
35
-
```console
36
-
make devnet-down
62
+
#### `make`
63
+
64
+
The included `makefile` in boundless is the most effective way to do this, and can be modified to suit specific needs.
65
+
66
+
1. Start a local devnet service (running in the background)
67
+
```sh
68
+
make devnet-up
69
+
source .env
37
70
```
38
71
39
-
Check out the is-even example in the [Boundless Foundry template][boundless-foundry-template] for an example of how to run and application using the prover market.
72
+
🎉 Congratulations!
73
+
You now have a local devnet service running in the background and a prover that will respond to proving requests.
74
+
75
+
When finished, tear down a running devnet run:
76
+
77
+
```sh
78
+
make devnet-down
79
+
```
40
80
41
-
You can also try editing `request.yaml` to send a request with different values.
42
-
Check `cargo run --bin cli -- --help` for a full list of commands available through the CLI.
81
+
#### Manually
43
82
44
-
If instead you prefer setting up a local devnet step by step, you can run the following commands as an alternative to the Makefile:
83
+
If you require customizing a local devnet configuration, and need to operate it manually, you can run the following commands:
45
84
46
85
1. Build the contracts
47
86
48
-
```console
87
+
```sh
49
88
forge build
50
89
```
51
90
52
91
2. Build the project
53
92
54
-
```console
93
+
```sh
55
94
cargo build
56
95
```
57
96
58
-
3. Start anvil
97
+
3. Start `anvil`
59
98
60
-
```console
99
+
```sh
61
100
anvil -b 2
62
101
```
63
102
@@ -67,50 +106,71 @@ If instead you prefer setting up a local devnet step by step, you can run the fo
67
106
Configuration environment variables are read from the `.env` file.
68
107
By setting the environment variable `RISC0_DEV_MODE`, a mock verifier will be deployed.
You can read more about on the [proving request][page-requestor-request] page.
133
+
🎉 Congratulations!
134
+
You now have a local devnet running and a prover that will respond to proving requests.
98
135
99
-
```console
100
-
RISC0_DEV_MODE=1 RUST_LOG=info,boundless_market=debug cargo run --bin cli -- submit-request request.yaml --wait
101
-
```
136
+
### Submit Proof Requests
137
+
138
+
Test your devnet with the boundless CLI:
139
+
140
+
```sh
141
+
RISC0_DEV_MODE=1 RUST_LOG=info,boundless_market=debug cargo run --bin cli -- submit-request request.yaml --wait
142
+
```
143
+
144
+
> If you see `Error: Market error: Failed to check fulfillment status`,
145
+
> check the `make devnet-up` deployment logs and ensure addresses match those listed in `.env`
146
+
> If they don't match, adjust the `.env` file and try again.
147
+
148
+
Try editing `request.yaml` to send a request to the Market with different values.
149
+
150
+
### Tear down
151
+
152
+
When finished, tear down a running devnet from the [`make devnet-up` workflow](#make) run:
153
+
154
+
```sh
155
+
make devnet-down
156
+
```
102
157
103
-
> If you see "Error: Market error: Failed to check fulfillment status",
104
-
> check the deployment logs from running `forge script` and ensure it matches the addresses listed in `.env`
105
-
> If they don't match, adjust the `.env` file or try restarting anvil and deploying again.
158
+
If running [manually](#manually), kill services and cleanup as needed.
106
159
107
-
Congratulations! You now have a local devnet running and a prover that will respond to proving requests.
160
+
## Application Development
108
161
109
-
Check out the is-even example in the [Boundless Foundry template][boundless-foundry-template]for an example of how to run and application using the prover market.
162
+
Further instructions for:
110
163
111
-
You can also try editing `request.yaml` to send a request with different values.
112
-
Check `cargo run --bin cli -- --help` for a full list of commands available through the CLI.
164
+
- the [Requestor Broadcasting][page-requestor-broadcast] page for submitting proofs
165
+
- See the [Boundless Foundry template][boundless-foundry-template-repo] for building a stand-alone application to interact with the Market
166
+
- the [Prover Manual][page-prover-manual] for fulfilling Market requests
0 commit comments