Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libzeth: fix json output of pghr13 proofs #218

Merged
merged 1 commit into from
May 15, 2020
Merged

Conversation

dtebbs
Copy link
Contributor

@dtebbs dtebbs commented May 13, 2020

Fix pghr13 proof_write_json funnction, which was using the default stream operator (which produces binary by default).

@@ -117,7 +117,17 @@ template<typename ppT>
std::ostream &pghr13_snark<ppT>::proof_write_json(
const typename pghr13_snark<ppT>::ProofT &proof, std::ostream &os)
{
return os << proof;
os << "{\n";
os << " \"a\" :[" << point_g1_affine_to_json<ppT>(proof.g_A.g) << "],\n";
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the surrounding [ and ] here as these are already added in the point_g1_affine_to_json functions which write the group elements as an array of hex string https://github.com/clearmatics/zeth/blob/master/libzeth/core/group_element_utils.tcc#L18

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I restored it from the old code and forgot to fix this. Should be updated now.

@AntoineRondelet AntoineRondelet merged commit ddc59b4 into develop May 15, 2020
@AntoineRondelet AntoineRondelet deleted the fix-pghr13-json branch July 28, 2020 17:53
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.

None yet

2 participants