clearmatics/zeth

Joinsplit refactor / review?

dtebbs opened this issue · 0 comments

Further to #290, it could be valuable to review the joinsplit code and potentially refactor it into more maintainable blocks (it is currently approx ~620 lines with ~225 lines in the constructor. For example, a joinsplit_public_data_variable object / gadget.

It could also be worth checking for variables that are being unncessarily allocated (often as a result of limitations of libsnark). One example is the ZERO variable, which seems to be required as a consequence of libsnark::block_variable supporting only libsnark::pb_variable_array. (If libsnark::block_variable could be refactored to use libsnark::pb_linear_combination_array, it could handle constants without needing any further variables - there may be other examples).