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
@@ -16,33 +16,26 @@ Therefore, this page is split into two sections:
16
16
- The second section, [Request Configuration](#request-configuration), covers all available configuration options for the 5% of requests that require fine-tuning.
17
17
18
18
<Note>
19
-
The *Sending a Request* section uses the counter example as a template, its
The _Sending a Request_ section uses the counter example as a template, its source code can be found at: [boundless/examples/counter](https://github.com/boundless-xyz/boundless/tree/main/examples/counter)
22
20
</Note>
23
21
24
22
## Sending a Request
25
23
26
24
<Note>
27
-
If you want to submit a one-off request via the Boundless CLI, please see
28
-
[Requesting a Proof via the Boundless
25
+
If you want to submit a one-off request via the Boundless CLI, please see [Requesting a Proof via the Boundless
We recommend using [clap](https://crates.io/crates/clap) to parse these environment variables, as seen in [apps/L37-52](https://github.com/boundless-xyz/boundless/blob/cdc2435b6119a009c2cc73dc227a250bee7594fc/examples/counter/apps/src/main.rs#L37-L52).
38
33
</Tip>
39
34
40
35
#### Blockchain
41
36
42
37
<Tip>
43
-
We recommend using Alchemy for your RPC URL during testing; their free tier is
44
-
more than enough to test requesting a proof. Receiving proofs requires event
45
-
queries, which public RPCs may not support.
38
+
We recommend using Alchemy for your RPC URL during testing; their free tier is more than enough to test requesting a proof. Receiving proofs requires event queries, which public RPCs may not support.
46
39
</Tip>
47
40
48
41
Since we are submitting requests onchain, we will need private key for a wallet with sufficient funds on Sepolia, and a working RPC URL:
For this tutorial, we suggest using a Pinata API key which will upload your program at runtime.
51
+
For this tutorial, we suggest using a Pinata API key which will upload your program at runtime.
59
52
60
-
If you do not want to use an API key, or if you want to use a provider other than Pinata, you can pre-upload you program to a public URL (this could be hosted via Pinata or any other service).
61
-
62
-
To see more information about this option, please read [No Storage Provider](/developers/tutorials/request#no-storage-provider).
53
+
If you do not want to use an API key, or if you want to use a provider other than Pinata, you can pre-upload you program to a public URL (this could be hosted via Pinata or any other service).
63
54
55
+
To see more information about this option, please read [No Storage Provider](/developers/tutorials/request#no-storage-provider).
64
56
</Tip>
65
57
66
58
To make a program, and its inputs, accessible to provers, they need to be hosted at a public URL. We recommend using IPFS for storage, particularly via [Pinata](https://pinata.cloud), as their free tier comfortably covers most Boundless use cases.
@@ -200,13 +192,11 @@ let request = client.new_request()
200
192
### Inputs
201
193
202
194
<Tip>
203
-
When working with trusted provers, you can store inputs in *Amazon S3* and
204
-
restrict access via AWS S3's permission management - [Sensitive Inputs
195
+
When working with trusted provers, you can store inputs in _Amazon S3_ and restrict access via AWS S3's permission management - [Sensitive Inputs
To execute and run proving, the prover requires the inputs of the program.
209
-
Inputs can be provides as a public URL, or "inline" by including them directly in the request.
199
+
To execute and run proving, the prover requires the inputs of the program. Inputs can be provides as a public URL, or "inline" by including them directly in the request.
210
200
211
201
Program inputs are uploaded to the same storage provider. This can be done manually like so:
212
202
@@ -226,8 +216,7 @@ let (request_id, expires_at) = client.submit_onchain(request).await?;
226
216
227
217
In this example, inputs are included inline if they are small (e.g. less than 1 kB) or uploaded to a public URL first if they are large.
228
218
229
-
When submitting requests onchain with inline inputs, this will cost more gas if the inputs are large.
230
-
The offchain order-stream service also places limits on the size of inline input.
219
+
When submitting requests onchain with inline inputs, this will cost more gas if the inputs are large. The offchain order-stream service also places limits on the size of inline input.
231
220
232
221
### Proof Types
233
222
@@ -264,9 +253,7 @@ let request = client
264
253
```
265
254
266
255
<Note>
267
-
Blake3 Groth16 proofs are only supported with the `ClaimDigestMatch`
268
-
predicate, meaning you should only use this if you do not require the journal
269
-
to be delivered on-chain. Additionally, the journal must be exactly 32 bytes.
256
+
Blake3 Groth16 proofs are only supported with the `ClaimDigestMatch` predicate, meaning you should only use this if you do not require the journal to be delivered on-chain. Additionally, the journal must be exactly 32 bytes.
270
257
</Note>
271
258
272
259
For more details on proof types and when to use each, see [Proof Types](/developers/tutorials/proof-types).
When using offchain requests, you are required to deposit funds into the
294
-
Boundless market contract before you can make any proof requests. This can be
295
-
done with the [Boundless CLI](/developers/tooling/cli#requestor).
280
+
When using offchain requests, you are required to deposit funds into the Boundless market contract before you can make any proof requests. This can be done with the [Boundless CLI](/developers/tooling/cli#requestor).
296
281
</Note>
297
282
298
283
To submit a request offchain, we use:
@@ -322,7 +307,6 @@ There are two ways to configure auction parameters:
322
307
- You want to configure cycle-based pricing that applies to all requests
323
308
- You need to adjust gas estimates or other calculation parameters
324
309
- You want consistent pricing logic across multiple requests
325
-
326
310
- Use `with_offer` when:
327
311
- You need to override the automatic calculations for a specific request
328
312
- You want to set exact prices rather than using cycle-based and gas-price calculations
@@ -384,10 +368,8 @@ With this configuration, the SDK will execute the request to estimate cycles and
384
368
### Funding Modes
385
369
386
370
<Warning>
387
-
For most use-cases, we recommend using the default setting of `Always`, which
388
-
ensures that your requests will always be fully funded and thus can be
389
-
fulfilled by the network. *Setting any other funding mode is considered an
390
-
advanced feature*, and may lead to a degredation of proof fufillment rate.
371
+
For most use-cases, we recommend using the default setting of `Always`, which ensures that your requests will always be fully funded and thus can be fulfilled by the network. _Setting any other funding mode is considered an
372
+
advanced feature_, and may lead to a degredation of proof fufillment rate.
391
373
</Warning>
392
374
393
375
When submitting requests onchain, the Boundless Market SDK needs to fund the request with ETH to cover the `max_price` (see [ Auction Parameters](/developers/tutorials/auction#what-auction-parameters-are-configurable)) of the proof.
@@ -415,8 +397,7 @@ let funding_mode = FundingMode::Always;
415
397
```
416
398
417
399
<Tip>
418
-
If your balance is more than 3x the `max_price`, the SDK will log a warning
419
-
suggesting you consider a different funding mode to avoid overfunding.
400
+
If your balance is more than 3x the `max_price`, the SDK will log a warning suggesting you consider a different funding mode to avoid overfunding.
420
401
</Tip>
421
402
422
403
#### Never
@@ -428,8 +409,7 @@ let funding_mode = FundingMode::Never;
428
409
```
429
410
430
411
<Warning>
431
-
When using `Never` mode, you must ensure your onchain balance is sufficient to
432
-
cover the `max_price` of each request. Otherwise, requests may fail.
412
+
When using `Never` mode, you must ensure your onchain balance is sufficient to cover the `max_price` of each request. Otherwise, requests may fail.
433
413
</Warning>
434
414
435
415
#### AvailableBalance
@@ -452,9 +432,7 @@ let funding_mode = FundingMode::BelowThreshold(threshold);
452
432
```
453
433
454
434
<Tip>
455
-
Set the threshold appropriately to avoid underfunding. The threshold should be
456
-
at least as large as your typical `max_price` to ensure requests can be funded
457
-
when needed.
435
+
Set the threshold appropriately to avoid underfunding. The threshold should be at least as large as your typical `max_price` to ensure requests can be funded when needed.
458
436
</Tip>
459
437
460
438
#### MinMaxBalance
@@ -473,6 +451,5 @@ let funding_mode = FundingMode::MinMaxBalance {
473
451
This mode should minimize the number of onchain fundings while ensuring sufficient balance is maintained. It's ideal for applications that make frequent requests and want to optimize gas costs by reducing the number of funding transactions.
474
452
475
453
<Tip>
476
-
When the balance drops below `min_balance`, the SDK will fund up to
477
-
`max_balance` in a single transaction, reducing the need for frequent top-ups.
478
-
</Tip>
454
+
When the balance drops below `min_balance`, the SDK will fund up to `max_balance` in a single transaction, reducing the need for frequent top-ups.
0 commit comments