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 …

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 …

prove with polynomials with variant size in stwo

Statemachine example in stwo

this statemachine example has component with different degrees:

component file

StateTRansitionEval is the evaluation function, coordinate mark the number of the Eval

statemachine 0 has just two numbers, the mix_into put these numbers in to channel

statemachine 1 aslo implement the mix_into function, and mix all …

Constraint system in STWO