-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
19,232 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# Define an array of file paths | ||
paths=( | ||
"../examples/fibonacci/script/bin/execute.rs" | ||
"../examples/fibonacci/script/src/main.rs" | ||
"../examples/fibonacci/script/bin/groth16_bn254.rs" | ||
"../examples/fibonacci/script/build.rs" | ||
"../examples/fibonacci/script/src/main.rs" | ||
"../examples/groth16/program/src/main.rs" | ||
"../examples/groth16/script/src/main.rs" | ||
"../examples/io/program/src/main.rs" | ||
"../examples/cycle-tracking/program/bin/normal.rs" | ||
"../crates/zkvm/lib/src/lib.rs" | ||
"../examples/fibonacci/script/bin/compressed.rs" | ||
"../examples/fibonacci/program/src/main.rs" | ||
) | ||
|
||
# Ensure the ./static directory exists | ||
mkdir -p ./static | ||
|
||
# Loop over the paths and process each file | ||
for file in "${paths[@]}"; do | ||
if [[ -f "$file" ]]; then | ||
# Get the full path and strip everything before 'sp1/' | ||
stripped_path=$(readlink -f "$file" | sed -e 's|.*sp1/||') | ||
|
||
# Replace slashes with underscores for the target file name | ||
target_name=$(echo "$stripped_path" | tr '/' '_') | ||
|
||
# Define the target markdown file path | ||
target="./static/${target_name}.mdx" | ||
|
||
# Write the content into the markdown file | ||
{ | ||
echo "\`\`\`rust" | ||
cat "$file" | ||
echo "\`\`\`" | ||
} > "$target" | ||
|
||
echo "Processed $file -> $target" | ||
else | ||
echo "File not found: $file" | ||
fi | ||
done |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
book/generating-proofs/basics.md → book/docs/generating-proofs/basics.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
# Generating Proofs: Basics | ||
import Example from "../../static/examples_fibonacci_script_src_main.rs.mdx"; | ||
|
||
# Basics | ||
|
||
All the methods you'll need for generating proofs are included in the `sp1_sdk` crate. Most importantly, you'll need to use the `ProverClient` to setup a proving key and verifying key for your program and then use the `execute`, `prove` and `verify` methods to execute your program, and generate and verify proofs. | ||
|
||
To make this more concrete, let's walk through a simple example of generating a proof for a Fibonacci program inside the zkVM. | ||
|
||
## Example: Fibonacci | ||
|
||
```rust,noplayground | ||
{{#include ../../examples/fibonacci/script/src/main.rs}} | ||
``` | ||
<Example /> | ||
|
||
You can run the above script in the `script` directory with `RUST_LOG=info cargo run --release`. Note that running the above script will generate a proof locally. | ||
|
||
<div class="warning"> | ||
WARNING: Local proving often is much slower than the prover network and for certain proof types (e.g. Groth16, PLONK) require a significant amount of RAM and will likely not work on a laptop. | ||
</div> | ||
|
||
We recommend using the [prover network](./prover-network.md) to generate proofs. Read more about the [recommended workflow](./recommended-workflow.md) for developing with SP1. | ||
We recommend using the [prover network](./prover-network.md) to generate proofs. Read more about the [recommended workflow](./recommended-workflow) for developing with SP1. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# SP1 | ||
# Introduction | ||
|
||
*Documentation for SP1 users and developers*. | ||
|
||
|
File renamed without changes.
Oops, something went wrong.