Skip to content

Conversation

lopeetall
Copy link
Contributor

I added a utility to serialize verifying keys and proofs to JSON so that they can more easily be used in Remix or Truffle.

@lopeetall lopeetall requested a review from epost September 17, 2019 00:00
Copy link
Member

@epost epost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @lopeetall! 👍 Sorry about the summit-induced delay.

using namespace std;

template<typename ppT>
void vk_to_json(tbcs_ppzksnark_verification_key<ppT> vk, string pathToFile)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lopeetall Maybe add a doc comment here to clarify that vk means 'verifying key'? Or perhaps we could even have the function name spell it out. And perhaps it would also be good to make it more explicit that pathToFile refers to a json output file that is going to be created.

vk_data << "[\"" << IC_N.X << "\", \"" << IC_N.Y << "\"]";
}

vk_data << "]" << endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
vk_data << "]" << endl;
vk_data << "]" << endl;

^ indentation whoopsie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants