SP1 Documentation

repository·main·Indexed 23 days ago

https://github.com/succinctlabs/sp1

SP1 is a high-performance zero-knowledge virtual machine (zkVM) that enables developers to prove the execution of arbitrary Rust or LLVM-compiled programs using standard Rust code. The ecosystem includes the sp1-cli (cargo-prove) for building and tracing, sp1-hypercube as the core proof system, and specialized crates for CUDA GPU acceleration (sp1-cuda), JIT compilation (sp1-core-jit), and RISC-V execution (sp1-core-executor).

Tokens
98.4K
Snippets
191
Records
539
Agent score
83%

What's inside SP1

  1. Overview of sp1-gpu-cudart

    main

    The sp1-gpu-cudart crate provides a high-level, safe, and ergonomic Rust API for performing GPU operations. It is designed to abstract over the low-level CUDA runtime, specifically to support the SP1 GPU prover.

    Key capabilities include:

    • GPU memory management: Handling allocation and data transfers between host and device.
    • Kernel launches: Providing an interface to execute GPU kernels.
    • Task scope management: Managing the lifecycle and scope of GPU operations.
    • Synchronization: Utilities for managing CUDA streams and synchronization.
  2. Overview of slop-algebra

    main
    slop-algebra is a crate providing field algebra and polynomial operations for the SLOP (Succinct Library of Polynomials) ecosystem. It is built on top of the p3_field crate from Plonky3 and extends it with univariate polynomial arithmetic, including utilities for evaluation and interpolation.
  3. Overview of slop-primitives

    main

    The slop-primitives crate provides core primitive types for the SLOP (Succinct Library of Polynomials) ecosystem. It is designed with minimal dependencies to serve as a foundational layer for polynomial-based operations.

    One of its primary features is the FriConfig struct, which is adapted from Plonky3.

  4. Overview of slop-tensor

    main
    The slop-tensor crate provides N-dimensional tensor operations specifically designed for polynomial proof systems. It is a component of the SLOP (Succinct Library of Polynomials) ecosystem. The primary data structure is the Tensor struct, which enables efficient storage and manipulation of multi-dimensional arrays of field elements.
  5. What is SP1?

    main
    SP1 is a high-performance zero-knowledge virtual machine (zkVM) designed to prove the execution of arbitrary programs written in Rust or any LLVM-compiled language. It enables developers to write ZK programs using standard Rust code (with std support), allowing for the implementation of complex systems like ZK Tendermint light clients or type-1 zkEVMs using Reth. Most Rust crates are supported and can be used within SP1 programs.
  6. Overview of slop-futures

    main

    The slop-futures crate provides asynchronous and concurrent execution utilities designed for the Succinct Library of Polynomials (SLOP). It is used to enable efficient, parallel execution of proof system operations, specifically targeting multi-core system optimization.

    Key capabilities include:

    • Handle management: Managing the lifecycle of asynchronous operations.
    • Pipeline utilities: Tools for streaming computations through stages.
    • Queue abstractions: Mechanisms for distributing work across available resources.
    • Rayon integration: Support for parallel iteration using the Rayon library.
  7. Overview of sp1-gpu-tracegen

    main

    sp1-gpu-tracegen

    sp1-gpu-tracegen is the core component responsible for GPU-accelerated trace generation for SP1 machine traces. It converts the execution of an SP1 program into the polynomial representations required for the proving process.

    This crate is a sub-component of the SP1-GPU project, which provides GPU acceleration for the SP1 prover.

  8. Overview of sp1-gpu-jagged-assist

    main
    The sp1-gpu-jagged-assist crate provides CUDA helper kernels designed for jagged polynomial operations. These kernels are specifically used to assist with the sparse-to-dense conversion process within the SP1 GPU proving pipeline, enabling efficient handling of variable-sized polynomials on the GPU.
  9. Overview of slop-basefold

    main

    slop-basefold is a component of the SLOP (Succinct Library of Polynomials) that provides a BaseFold polynomial encoding and commitment scheme. It specifically implements the verifier for the BaseFold multilinear polynomial commitment scheme, designed for logarithmic-time verification.

    Key capabilities include:

    • Defining the BaseFold proof structure.
    • Providing a logarithmic-time BaseFold verifier implementation.
    • Offering type aliases for BaseFold configurations tailored for both testing and SP1 deployment environments.