Bus in different field -1

the goal is to understand the extra cost (witness column) brought by using different field, in the bus part.

start with lookup_via_challenges_range_constraint.asm

use std::convert::fe;
use std::protocols::lookup::lookup;
use std::math::fp2::from_base;
use std::prover::challenge;

machine Main with degree: 8 {

    // Prove a correct decomposition of x into 3-bit limbs
    col fixed x = 

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 …

Review, remove_trait_impls

Related type:

TraitsResolver

TraitsResolver helps to find the implementation for a given trait function and concrete type arguments.

TraitsResolver has a function resolve_trait_function_reference (see below) for a given polynomial reference, it resolves its trait

one of the input to this polynomialReference,

using fibo_no_public example, PolynomialReference looks like:

Understanding the remove_trait_impls

How Powdr translates PIL to Plonky3 and what about to stwo —2

following the first post

got two tasks:

  • generate trace from pil to stwo
  • implement FrameworkEval trait, which is used by stwo to define constraint, to PowdrCircuit

let’s talk about generate trace first.

in stwo, the trace is in this format as showed in last post

ColumnVec<CircleEvaluation<SimdBackend, BaseField, BitReversedOrder>>

how powdr …