MCPcopy Index your code
hub / github.com/brevis-network/pico

github.com/brevis-network/pico @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
4,699 symbols 14,926 edges 739 files 784 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Pico

Pico

Pico is an open-source zero-knowledge virtual machine (zkVM) that transforms how developers build secure, scalable, and high-performance decentralized applications. Drawing on the innovative Glue-and-Coprocessor architecture, Pico fuses the efficiency of specialized circuits with the adaptability of a general-purpose zkVM. This unique design empowers you to craft tailored proof systems that meet the diverse needs of your applications.

Install | Docs | Examples | Telegram | Discord

Getting Started

Before you begin, please ensure that you have installed all the requirements. For installation and setup instructions, refer to the Installation Guide and follow the steps outlined in Quick Start section in Pico Docs.

Key Features

Pico's design is rooted in the need for adaptable, high-performance ZK systems that can keep up with the rapidly evolving cryptography research. Rather than relying on a "one size fits all" solution, Pico's modular architecture lets you:

  • Leverage Interchangeable Proving Backends: Select from multiple proving backends to achieve the best performance and efficiency.
  • Integrate App-Specific Circuits: Seamlessly incorporate specialized circuits/coprocessors to accelerate domain-specific computations.
  • Customize Proving Workflows: Assemble and fine-tune proof generation pipelines tailored to your application's specific requirements.

Supported Proving Backends

One of Pico's most innovative features is its ability to seamlessly switch between multiple proving backends. Currently, Pico supports generating proofs in all phases — RISCV, CONVERT (RECURSION), COMBINE (RECURSION), COMPRESS (RECURSION) and ONCHAIN (for EVM) — with both STARK on KoalaBear and STARK on BabyBear. For CircleSTARK on Mersenne31, Pico currently supports the RISCV-Phase, with RECURSION and EVM phases coming soon.

  • STARK on KoalaBear (prime field $p = 2^{31} - 2^{24} + 1$): Supports generating proofs for
  • [x] RISCV-Phase
  • [x] RECURSION-Phase
  • [x] EVM-Phase
  • STARK on BabyBear (prime field $p = 2^{31} - 2^{27} + 1$): Supports generating proofs for
  • [x] RISCV-Phase
  • [x] RECURSION-Phase
  • [x] EVM-Phase
  • CircleSTARK on Mersenne31 where $p = 2^{31} - 1$). Supports generating proofs for
  • [x] RISCV-Phase
  • [ ] RECURSION-Phase
  • [ ] EVM-Phase

Security

Pico has undergone a security review from Sherlock and is recommended for production use. The audit report is available here.

For Contributors

We welcome contributions from developers, researchers, and enthusiasts. Your input is crucial for Pico's evolution, whether you're fixing bugs, enhancing performance, improving documentation, or adding new features.

Before getting started, please review our Repo Layout to understand the repository structure. For detailed contribution instructions, see our Contributing Guidelines.

Acknowledgements

Pico draws inspiration from the following projects, each representing cutting-edge advancements in zero-knowledge proof systems. - Plonky3: Pico's proving backend is based on Plonky3, extending its modularity to the zkVM layer to enable the flexible selection of proving fields and systems that best fit each use case. - SP1: Pico derives significant inspiration from SP1's chip design and their constraints. Its recursion compiler and precompiles originate from SP1. - Valida: Pico's implementation of cross-table lookups is inspired by Valida's pioneering work in this area. - RISC0: Pico's Rust toolchain is based on the one originally developed by RISC0.

Extension points exported contracts — how you extend this code

NumLimbs (Interface)
Trait that holds the typenum values for # of limbs and # of witness limbs. [9 implementers]
vm/src/chips/gadgets/utils/field_params.rs
WeierstrassAffinePoint (Interface)
A trait for affine points on Weierstrass curves. [4 implementers]
sdk/patch-libs/src/utils.rs
ClockUpdate (Interface)
Trait for emulators that support bulk clock updates [1 implementers]
aot-runtime/src/types.rs
AotRun (Interface)
(no doc) [1 implementers]
examples/aot_common/src/lib.rs
ChipBehavior (Interface)
Chip behavior [45 implementers]
vm/src/machine/chip.rs
AffinePoint (Interface)
(no doc) [5 implementers]
sdk/patch-libs/src/utils.rs
PublicValuesBuilder (Interface)
AirBuilder with public values originally from AirBuilderWithPublicValues in p3 [6 implementers]
vm/src/machine/builder/public_values.rs
Field (Interface)
Alias trait for the [`ff::PrimeField`] with 32 byte field elements. Note: All bytes should be considered to be in big-e [1 …
sdk/patch-libs/src/ecdsa.rs

Core symbols most depended-on inside this repo

iter
called by 749
vm/src/emulator/riscv/syscalls/precompiles/mod.rs
clone
called by 747
vm/src/compiler/riscv/program.rs
clone
called by 465
vm/src/machine/keys.rs
unwrap
called by 431
vm/src/iter/single/mod.rs
map
called by 420
vm/src/compiler/word.rs
push
called by 373
vm/src/compiler/recursion/ir/builder.rs
collect
called by 216
vm/src/iter/rayon/mod.rs
len
called by 210
vm/src/emulator/riscv/memory.rs

Shape

Method 2,703
Function 1,240
Class 556
Interface 107
Enum 70
Struct 23

Languages

Rust96%
Go4%

Modules by API surface

vm/src/emulator/riscv/emulator/mod.rs114 symbols
sdk/sdk/src/libm.rs112 symbols
vm/src/compiler/recursion/ir/arithmetic.rs106 symbols
vm/src/emulator/riscv/memory.rs92 symbols
vm/src/compiler/riscv/disassembler/rrs.rs90 symbols
aot-runtime/src/emulator/memory.rs85 symbols
vm/src/compiler/recursion/ir/builder.rs63 symbols
aot-runtime/src/emulator/instructions_base.rs62 symbols
vm/src/machine/septic/extension.rs52 symbols
aot-runtime/src/emulator/instructions_tracked.rs51 symbols
aot-runtime/src/emulator/instructions_no_count.rs50 symbols
gnark/koalabear/koalabear.go44 symbols

For agents

$ claude mcp add pico \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page