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: update README #4

Merged
merged 6 commits into from
Jun 5, 2024
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
82 changes: 38 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
# WP1
# Sphinx

![](./assets/wp1.png)
![](./assets/sphinx.jpg)
*[Natasha De Vere](https://www.flickr.com/photos/col_and_tasha/6060947569/in/photostream/), [Attribution (CC BY 2.0)](https://creativecommons.org/licenses/by/2.0/)*

WP1 is a performant, 100% open-source, contributor-friendly zero-knowledge virtual machine (zkVM) that can prove the execution of arbitrary Rust (or any LLVM-compiled language) programs. WP1 democratizes access to ZKPs by allowing developers to use programmable truth with popular programming languages.

WP1 is inspired by the open-source software movement and takes a collaborative approach towards building the best zkVM for rollups, coprocessors and other ZKP applications. We envision a diversity of contributors integrating the latest ZK innovations, creating a zkVM that is _performant_, _customizable_ and will stand the _test of time_.

**[Install](https://succinctlabs.github.io/sp1/getting-started/install.html)**
| [Docs](https://succinctlabs.github.io/sp1)
| [Examples](https://github.com/wormhole-foundation/wp1/tree/main/examples)

## For Developers: Build with WP1

**Note that WP1 is still in alpha and is not yet ready for production use.**


Today, developers can write programs, including complex, large programs like a ZK Tendermint light client, in Rust (with std support), generate proofs and verify them. Most Rust crates should be supported and can be used seamlessly by your program. Example programs can be found in the [examples](https://github.com/wormhole-foundation/wp1/tree/main/examples) folder.

To get started, make sure you have [Rust](https://www.rust-lang.org/tools/install) installed. Then follow the [installation](https://succinctlabs.github.io/sp1/getting-started/install.html) guide in the WP1 book and read the [getting started](https://succinctlabs.github.io/sp1/getting-started/quickstart.html) section.

For developers looking for inspiration on what to build, check out the open issues with the [showcase](https://github.com/wormhole-foundation/wp1/issues?q=is%3Aopen+is%3Aissue+label%3Ashowcase) label to see what sorts of programs that showcase the capabilities of WP1 are interesting to hack on.

## For Contributors

Open-source is a core part of WP1's ethos and key to its advantages. We wish to cultivate a vibrant community of open-source contributors that span individuals, teams and geographies. If you want to contribute, or follow along with contributor discussion, you can use our main Telegram to chat with us. Our contributor guidelines can be found in [CONTRIBUTING.md](./CONTRIBUTING.md).

Find a list of [good first issues](https://github.com/wormhole-foundation/wp1/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+) in the open issues of this repo. We are always looking for contributors interested in tasks big and small, including minor chores across the codebase, optimizing performance, adding precompiles for commonly used cryptographic operations, adding documentation, creating new example programs and more. Please reach out in the Telegram chat if interested!


## Roadmap

Today, WP1 can generate and verify proofs for Rust programs that have been compiled to RISC-V. WP1 supports proving of programs of arbitrary length by using a unique "shared challenges" argument that allows the prover to shard a long computation into small shards, and then generate a global proof that these shards are properly connected together.

The main priorities in the next few months are performance optimizations, getting the core zkVM constraint logic audited, as well as wrapping the WP1 STARK proof into a SNARK proof that is cheaply verifiable in the EVM (by adapting similar [previous work](https://github.com/succinctlabs/gnark-plonky2-verifier) done by the Succinct Team).
Sphinx is an open-source zero-knowledge virtual machine (zkVM) that can prove
the execution of [RISC-V](https://en.wikipedia.org/wiki/RISC-V) bytecode, with
initial tooling support for programs written in
[Rust](https://en.wikipedia.org/wiki/Rust_(programming_language)). Additionally,
Sphinx aims to support other reduction engines, including the evaluator for the
[Lurk programming language](https://www.lurk-lang.org) , which could be extended
to other functional languages like JavaScript or Lean.

## Acknowledgements

We would like to acknowledge the projects below whose previous work has been instrumental in making this project a reality:

- [Plonky3](https://github.com/Plonky3/Plonky3): The WP1's prover is powered by the Plonky3 toolkit.
- [Valida](https://github.com/valida-xyz/valida): The WP1 cross-table lookup architecture, prover, borrow macro, and chip design are inspired by Valida.
- [RISC0](https://github.com/risc0/risc0): The WP1 Rust toolchain and install/build scripts for the toolchain borrow code from RISC0.
- [SP1](https://github.com/succinctlabs/sp1): The SP1 ZKVM of which this repo is a fork of.

## Tips

We recommend you install the [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) extension.
Note that if you use `cargo prove new` inside a monorepo, you will need to add the manifest file to `rust-analyzer.linkedProjects` to get full IDE support.
Sphinx builds on the work of many organizations who have supported and
contributed to open-source software. These organizations, and many others not
listed, exemplify the principle that zero-knowledge cryptography is not a
zero-sum game, and that when we make our work freely available for others to
build on, the whole world benefits:

- [Wormhole Foundation](https://wormhole.foundation/) who has generously
supported the project from the beginning both through awarding Lurk Lab a [contributor
grant](https://wormhole.foundation/blog/wormhole-foundation-awards-contributor-grant-to-lurk-lab-to-bring-trustless-transfers-to-wormhole-with-zk-proofs),
johnchandlerburnham marked this conversation as resolved.
Show resolved Hide resolved
and through their broader ecosystem work.
- [Succinct Labs](https://www.succinct.xyz), a fellow Wormhole ecosystem
[contributor](https://wormhole.foundation/blog/wormhole-foundation-awards-contributor-grant-to-supranational-for-wormhole-zk-hardware-acceleration),
whose [SP1](https://github.com/succinctlabs/sp1) zkVM developed a novel
approach to integrating custom precompile acceleration and integrated this
with work from Risc Zero, Valida, Polygon and others to create an excellent
packaged developer experience. Sphinx is a fork of SP1
- [Risc Zero](https://www.risczero.com/), who developed and maintain the
[riscv32im-risc0-zkvm-elf](https://doc.rust-lang.org/nightly/rustc/platform-support/riscv32im-risc0-zkvm-elf.html)
Copy link
Contributor

@huitseeker huitseeker Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So technically this isn't what SP1/Sphinx is using: as the name of every compiled SP1 program indicates, it has its own riscv32im-succinct-zkvm-elf target (notice 'succinct'), which clones Risc0's process for defining (and using) a custom RiscV compilation target, but does not reuse the outcome of that process (and those credits for maintenance kinda suggest that Sphinx does).

Copy link
Member Author

@johnchandlerburnham johnchandlerburnham Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, what about

  • Risc Zero, who developed and maintain the riscv32im-risc0-zkvm-elf Rust toolchain, from which the riscv32im-succinct-zkvm-elf toolchain used by SP1 and Sphinx are derived.

Or something like that?

Rust toolchain and related tooling.
- [Delendum](https://delendum.xyz/writings/2023-05-10-zkvm-design.html) and [Lita Foundation](https://www.lita.foundation/), whose [Valida
zkVM](https://github.com/valida-xyz/valida) influenced the cross-table lookup
architecture, prover, borrow macro, and chip design of SP1.
- [Polygon Zero](https://polygon.technology/about) whose
[Plonky3](https://github.com/Plonky3/Plonky3) STARK toolkit powers much of the
above projects.

We sincerely thank all these teams and projects, and we are committed to
upstreaming our contributions wherever possible.
Binary file added assets/sphinx.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/wp1.png
Binary file not shown.