Implement Stwo challenger in Powdr 1

The first place the challenger is called is in stark.rs prove function:

in circuit_builder.rs in plonky3, the ConstraintSystem has a field: challenges_by_stage, can check how this field is built.

in stark.rs, the constraintSystem is initialized from a pil file

circuit_builder.rs

Data struct has a challenges field, and has a get …

Plonky3 notes about some basics

Traits

BaseAire

contains width(the number of columns) and preprocessed_trace(what is this used for?)

AirBuilderWithPublicValues

it extend the AirBuilder trait, which is the main trait, by adding the function to get public values

AirBuilder

it has many functions like these: to help user build air constraints

The main function return M, …

Stwo Commitment Data Structure

Start with the proof of stwo:

commitmentSchemeProof

proof.commitments

contains the proof info, the interesting part is the commitments, in the verification function, there will be commitments[0], commitments[1],commitments[2] represent the commitment of pre-process trace, witness trace and lookup trace commitments. namely, they only have three root commitments, every root commitment should …

Plonky3 logging

Pre-step:

add these to workspace dependencies

tracing = "0.1.37"
tracing-forest = "0.1.6"
tracing-subscriber = "0.3.17"
step 1:

add tracing subscriber to dependencies, namely, the dependencies should have these three

tracing.workspace = true
tracing-subscriber = { workspace = true, features = ["std", "env-filter"] }
tracing-forest = { workspace = true, features