MCPcopy Create free account
hub / github.com/argumentcomputer/ix / circuit

Method circuit

crates/aiur/src/vk_codec.rs:163–173  ·  view source on GitHub ↗
(&mut self, c: &Circuit<AiurCircuit>)

Source from the content-addressed store, hash-verified

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.
164fn 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"));

Callers

nothing calls this directly

Calls 3

aircircuitMethod · 0.80
vecMethod · 0.80
usizeMethod · 0.80

Tested by

no test coverage detected