MCPcopy Create free account
hub / github.com/ddkang/zkml / configure

Method configure

src/commitments/poseidon_commit.rs:79–100  ·  view source on GitHub ↗
(
    meta: &mut ConstraintSystem<F>,
    // TODO: ??
    _input: [Column<Advice>; L],
    state: [Column<Advice>; WIDTH],
    partial_sbox: Column<Advice>,
  )

Source from the content-addressed store, hash-verified

77
78impl<F: PrimeField + Ord + FromUniformBytes<64>> PoseidonCommitChip<F, WIDTH, RATE, L> {
79 pub fn configure(
80 meta: &mut ConstraintSystem<F>,
81 // TODO: ??
82 _input: [Column<Advice>; L],
83 state: [Column<Advice>; WIDTH],
84 partial_sbox: Column<Advice>,
85 ) -> PoseidonCommitChip<F, WIDTH, RATE, L> {
86 let rc_a = (0..WIDTH).map(|_| meta.fixed_column()).collect::<Vec<_>>();
87 let rc_b = (0..WIDTH).map(|_| meta.fixed_column()).collect::<Vec<_>>();
88
89 meta.enable_constant(rc_b[0]);
90
91 PoseidonCommitChip {
92 poseidon_config: Pow5Chip::configure::<P128Pow5T3Gen<F, 0>>(
93 meta,
94 state.try_into().unwrap(),
95 partial_sbox,
96 rc_a.try_into().unwrap(),
97 rc_b.try_into().unwrap(),
98 ),
99 }
100 }
101}
102
103impl<F: PrimeField + Ord + FromUniformBytes<64>> Commit<F>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected