Open namnc opened 2 months ago
We may also want the gates to have some topological order (e.g. a gate id i > j will only use inputs from gates with id at most j).
I made this python script to convert our json circuit to a sort of arithmetic bristol format during EthTaipei hackathon: https://gist.github.com/namnc/1351994aacb25054ee4696c52ad0802e
This can be used with Kevin's MP-SPDZ loader here: https://gist.github.com/mhchia/79a26963664accbafebb27cf19b8e562#file-circuit_arith-py
It basically parses the json and build a tree with multiple roots and generate id from the leaves in a topological order.
I will proceed with marking main component inputs and outputs.
We may have redundant info now so we may want to streamline the output.
Below is Bristol format we can extend it: https://nigelsmart.github.io/MPC-Circuits/