{ message_type: "Relation", message: { version: "2.0.0", plugins: [ "zkif_vector", "zkif_assert_equal", "zkif_ring" ], types: [ { element_type: "Field", element: { modulo: { value: [ 7 ] } } }, { element_type: "Field", element: { modulo: { value: [ 101 ] } } }, { element_type: "PluginType", element: { name: "zkif_ring", operation: "type", params: [ "2", "8" ] } } ], conversions: [ { output_count: { type_id: 1, count: 1 }, input_count: { type_id: 0, count: 1 } } ], directives: [ { directive_type: "Function", directive: { name: "assert_equal_private", output_count: [ ], input_count: [ { type_id: 1, count: 1 } ], body_type: "PluginBody", body: { name: "zkif_assert_equal", operation: "private", params: [ "1", "1" ], public_count: [ ], private_count: [ { type_id: 1, count: 1 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateNew", gate: { type_id: 1, last_id: 8 } } }, { directive_type: "Gate", directive: { gate_type: "GatePublic", gate: { } } }, { directive_type: "Gate", directive: { gate_type: "GatePrivate", gate: { out_id: 1 } } }, { directive_type: "Gate", directive: { gate_type: "GatePrivate", gate: { out_id: 2 } } }, { directive_type: "Gate", directive: { gate_type: "GateConvert", gate: { out_type_id: 1 } } }, { directive_type: "Gate", directive: { gate_type: "GateConvert", gate: { out_type_id: 1, out_first_id: 1, out_last_id: 1, in_first_id: 1, in_last_id: 1 } } }, { directive_type: "Gate", directive: { gate_type: "GateConvert", gate: { out_type_id: 1, out_first_id: 2, out_last_id: 2, in_first_id: 2, in_last_id: 2 } } }, { directive_type: "Gate", directive: { gate_type: "GateDelete", gate: { last_id: 2 } } }, { directive_type: "Function", directive: { name: "square", output_count: [ { type_id: 1, count: 1 } ], input_count: [ { type_id: 1, count: 1 } ], body_type: "Gates", body: { gates: [ { gate_type: "GateMul", gate: { type_id: 1, left_id: 1, right_id: 1 } } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "square", out_ids: [ { first_id: 3, last_id: 3 } ], in_ids: [ { first_id: 0, last_id: 0 } ] } } }, { directive_type: "Function", directive: { name: "vector_mul_7_2", output_count: [ { type_id: 1, count: 2 } ], input_count: [ { type_id: 1, count: 2 }, { type_id: 1, count: 2 } ], body_type: "PluginBody", body: { name: "zkif_vector", operation: "mul", params: [ "1", "2" ], public_count: [ ], private_count: [ ] } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "vector_mul_7_2", out_ids: [ { first_id: 4, last_id: 5 } ], in_ids: [ { first_id: 1, last_id: 2 }, { first_id: 1, last_id: 2 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateAdd", gate: { type_id: 1, out_id: 6, left_id: 4, right_id: 5 } } }, { directive_type: "Gate", directive: { gate_type: "GateMulConstant", gate: { type_id: 1, out_id: 7, in_id: 3, constant: [ 100 ] } } }, { directive_type: "Gate", directive: { gate_type: "GateAdd", gate: { type_id: 1, out_id: 8, left_id: 6, right_id: 7 } } }, { directive_type: "Gate", directive: { gate_type: "GateAssertZero", gate: { type_id: 1, in_id: 8 } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "assert_equal_private", out_ids: [ ], in_ids: [ { first_id: 3, last_id: 3 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateDelete", gate: { type_id: 1, last_id: 8 } } }, { directive_type: "Function", directive: { name: "ring_add", output_count: [ { type_id: 2, count: 1 } ], input_count: [ { type_id: 2, count: 1 }, { type_id: 2, count: 1 } ], body_type: "PluginBody", body: { name: "zkif_ring", operation: "add", params: [ "2" ], public_count: [ ], private_count: [ ] } } }, { directive_type: "Function", directive: { name: "ring_mul", output_count: [ { type_id: 2, count: 1 } ], input_count: [ { type_id: 2, count: 1 }, { type_id: 2, count: 1 } ], body_type: "PluginBody", body: { name: "zkif_ring", operation: "mul", params: [ "2" ], public_count: [ ], private_count: [ ] } } }, { directive_type: "Function", directive: { name: "ring_equal", output_count: [ ], input_count: [ { type_id: 2, count: 1 }, { type_id: 2, count: 1 } ], body_type: "PluginBody", body: { name: "zkif_ring", operation: "equal", params: [ "2" ], public_count: [ ], private_count: [ ] } } }, { directive_type: "Gate", directive: { gate_type: "GatePrivate", gate: { type_id: 2 } } }, { directive_type: "Gate", directive: { gate_type: "GatePrivate", gate: { type_id: 2, out_id: 1 } } }, { directive_type: "Gate", directive: { gate_type: "GatePrivate", gate: { type_id: 2, out_id: 2 } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "ring_add", out_ids: [ { first_id: 3, last_id: 3 } ], in_ids: [ { first_id: 0, last_id: 0 }, { first_id: 1, last_id: 1 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "ring_mul", out_ids: [ { first_id: 4, last_id: 4 } ], in_ids: [ { first_id: 2, last_id: 2 }, { first_id: 3, last_id: 3 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GatePublic", gate: { type_id: 2, out_id: 5 } } }, { directive_type: "Gate", directive: { gate_type: "GateCall", gate: { name: "ring_equal", out_ids: [ ], in_ids: [ { first_id: 4, last_id: 4 }, { first_id: 5, last_id: 5 } ] } } }, { directive_type: "Gate", directive: { gate_type: "GateDelete", gate: { type_id: 2, last_id: 5 } } } ] } }