# Plonky2

Plonky2\[32] = Brave Taboo System + Deep-Fri Promise + Goldilocks Domain. We plan to use Plonky2 as our recursive layer 2 and 3 (to be supported in the future), as it is more suitable for specific computations than Starky which is more suitable for ZKVM. It should be noted that the design described in this article is the original version of Plonky2, which will be more convenient for readers to learn.

## protocol configuration

Standard recursive configuration

Drink and self.

self{

num\_wires: 135,

n um \_ r o u t e d  w ir e : 80 ,

n um  c o n t in ts : 2 ,

You're real, you're real,

The security system: 100,

n um  c l e n g e s : 2 ,

Zero\_know where:false,

m a x  qu e o t e n t e g r e e  f a c t o r : 8 ,

fri \_config: FriConfig {

rate  bits: 3,

\_Height:4

p r o f\_ o f\_ w o r k\_b i t s : - 16 ,

F r i r e d u c t i o n t e r a t e g e l l e d i o n t e r a t e g o n t o n t e r a t o n t e r o n t o n t e r o n t o n t e r a t e b i t s (4 , 5) ,

n um  that and r y\_ r or a d s : 28 ,

},

}}

Standard recursive zk configuration

Bar and () ->Self{

Self{

num \_  wires： 135，

n um \_  r o u t e d \_  w ir e s : 80 ,

n um \_  c o ns t an ts : 2 ,

You're real, you're real,

Security system: 100,

n um \_  c h a l l e n g e s : 2 ,

Zero, know l side: true,

m a x \_  qu o t i e n t \_  d e g r e e \_  f a c t o r : 8 ,

fri \_  config： FriConfig {

rate \_  bits： 3，

cap \_ Height: 4,

p r o o f \_  o f \_  w o r k \_  b i t s :   16 ,

r e d u c t i o n \_  s t r a t e g y :   F r i R e d u c t i o n S t r a t e g y :: C o n s t a n t A r i t y B i t s (4 ,   5) ,

n um \_  qu e r y \_  r o un d s : 28 ,

} ,

}

}

Standard configuration

Bar and () ->Self{

Self{

num \_  wires： 136，

n um \_  r o u t e d \_  w ir e s : 80 ,

n um \_  c o ns t an ts : 2 ,

Security system: 100,

n um \_  c h a l l e n g e s : 2 ,

Zero\_ Knowing edge l: false,

m a x \_  qu o t i e n t \_  d e g r e e \_  f a c t o r : 8 ,

fri \_  config： FriConfig {

rate \_  bits： 3，

cap \_ Height: 4,

p r o o f \_  o f \_  w o r k \_  b i t s :   16 ,

r e d u c t i o n \_  s t r a t e g y :   F r i R e d u c t i o n S t r a t e g y :: C o n s t a n t A r i t y B i t s (4 ,   5) ,

n um \_  qu e r y \_  r o un d s : 28 ,

} ,

}}

## wide area configuration

num \_ wires： 234，

n um \_ r o u t e d \_ w ir e s : 80 ,

n um \_ c o ns t an ts : 2 ,

，

n um \_ c h a l l e n g e s : 2 ,

m a x \_ qu o t i e n t \_ d e g r e e \_ f a c t o r : 8 ,

fri \_ config： FriConfig {

rate \_ bits： 3，

cap \_high：4，

p r o o f \_ o f \_ w o r k \_ b i t s :   16 ,

r e d u c t i o n \_ s t r a t e g y :   F r i R e d u c t i o n S t r a t e g y :: C o n s t a n t A r i t y B i t s (4 ,   5) ,

n um \_ qu e r y \_ r o un d s : 28 ,

} ,

}

}

## Gates

Each gate is a gate with a row of 135 columns. Since different custom doors have different complexities, for some complex doors, 135 columns may limit only one operation, while for other simple doors, 135 columns may limit multiple operations. The operation index in the row is called the slot index.

Steps to use a custom door:

Ensure the type of gate;&#x20;

Secure gate row and slot positions;&#x20;

Secure the wire layout of the gate;

Ensure the consistency of public data and gate wires;&#x20;

Ensuring the row position of public data;&#x20;

Finalize the tracking form;&#x20;

Constraints on the tracking table;&#x20;

Evidence of sand scab formation.&#x20;

For ease of description, the trace tables in this article only show that one operation is slot 0.

## Curve assertion works

1 goal: check if the point is on the curve y 2= x3+ax+b.

Gate Type Number: 13

– 8: U32AddManyGate{2,3,5,7,9,11,13,15}

– 1: ComparisonGate

– 1: ArithmeZK WorldGate

– 1: U32ArithmeZK WorldGate

– 2: U32RangeCheckGate{0,8}

## curve-msm

.1 Goal: Implement Multiplicative Scalar Multiplication (MSM).

.2 Constraint information and cost:

Gate Type Number: 14

Door Instance Number: 147553

## curve scalar

1. Goal: To realize the multiplication operation between scalar and point.

<figure><img src="/files/OsHaj7jyP5X510h2kzj0" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/bKysyCuydXbn7q2vXHGB" alt=""><figcaption></figcaption></figure>

. 2 Constraint logic: see figure.

.3 Constraint information and costs:

Gate Type Number: 13

Door Instance Number: 180364

<figure><img src="/files/fbPP0h8v9exHn2aIjy0v" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zk-world.gitbook.io/zk-world-white-paper/algorithm/plonky2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
