Skip to content

Commit 19af95f

Browse files
committed
Add RecursiveCircuit
The RecursiveCircuit verifies N proofs of itself (N=arity), together with the logic defined at the InnerCircuit (in our case, used for the MainPodCircuit logic). The arity defines the maximum amount of proofs of itself that the RecursiveCircuit verifies. When arity>1, using the RecursiveCircuit has the shape of a tree of the same arity. π_root ▲ ┌───────┴────────┐ │RecursiveCircuit│ └─▲───▲───▲────▲─┘ ┌───────┘ ┌┘ └┐ └──────┐ │π''_1 │ ... │ π''_N│ ┌────────┴───────┐ ┌┴┐┌─┐┌┴┐ ┌───────┴────────┐ │RecursiveCircuit│ │.││.││.│ │RecursiveCircuit│ └──▲─────────▲───┘ └─┘└─┘└─┘ └──▲─────────▲───┘ │ │ │ │ π_1 ... π_N π'_1 ... π'_N where N: arity of the RecursiveCircuit π_i: plonky2 proof of the RecursiveCircuit
1 parent 26a6b2d commit 19af95f

File tree

4 files changed

+583
-0
lines changed

4 files changed

+583
-0
lines changed

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ serde = "1.0.219"
2323
serde_json = "1.0.140"
2424
base64 = "0.22.1"
2525
schemars = "1.0.0-alpha.17"
26+
hashbrown = { version = "0.14.3", default-features = false, features = ["serde"] }
2627

2728
# Uncomment for debugging with https://github.com/ed255/plonky2/ at branch `feat/debug`. The repo directory needs to be checked out next to the pod2 repo directory.
2829
# [patch."https://github.com/0xPolygonZero/plonky2"]

src/backends/plonky2/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ pub mod circuits;
33
pub mod mainpod;
44
pub mod mock;
55
pub mod primitives;
6+
pub mod recursion;
67
pub mod signedpod;

0 commit comments

Comments
 (0)