(&mut self, c: &Circuit<AiurCircuit>)
| 161 | /// and `lookup_prefix_len` (= 1 + max node id reachable from the lookups) |
| 162 | /// are all recomputed on decode, and the Lean reader derives the observed |
| 163 | /// shape limbs the same way. |
| 164 | fn encode_circuit(buf: &mut Vec<u8>, circuit: &Circuit<Val>) { |
| 165 | let compiled = &circuit.graph; |
| 166 | push_u16(buf, circuit.main_width); |
| 167 | push_u16(buf, circuit.preprocessed_width); |
| 168 | // u32: the Bytes2 table height is exactly 65536. |
| 169 | push_u32(buf, circuit.preprocessed_height); |
| 170 | // Combined max degree (user graph + analytic logUp), as observed. Not |
| 171 | // derivable cheaply in-circuit (it would need a full degree pass). |
| 172 | push_u16(buf, circuit.max_constraint_degree); |
| 173 | // The lookup group size is a free per-circuit choice (it changes the |
| 174 | // constraint structure, not just counts), so it must be serialized. |
| 175 | buf |
| 176 | .push(u8::try_from(circuit.lookup_group_size).expect("group size fits u8")); |
nothing calls this directly
no test coverage detected