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

Better expose prover_server (generic) util functions #417

Open
AntoineRondelet opened this issue Nov 4, 2021 · 1 comment
Open

Better expose prover_server (generic) util functions #417

AntoineRondelet opened this issue Nov 4, 2021 · 1 comment
Labels
c++ Task related to the c++ part of the code base code-quality Task related to the code quality (refactor, enhancements etc.)

Comments

@AntoineRondelet
Copy link
Contributor

Related to clearmatics/zecale#89 (comment)

Despite being mere wrappers around the libzeth functions, some functions in the prover_server (Zeth) and aggregator_server (Zecale) are duplicated across the projects (functions like load_keypair, write_keypair, write_constraint_system etc). Duplicated code is prone to inconsistencies (one version changed and not the others) which is not good. Also, with code: less is more. Less code is less code to maintain and always a good idea. Let's see how we could package these utils function on the prover server to better expose them and use them straight in other projects like Zecale. Maybe we could create a new namespace like libzeth::server that contains all these functions and we could use them straight in prover_server.cpp in Zeth and in aggregator_server.cpp in Zecale.

@AntoineRondelet AntoineRondelet added code-quality Task related to the code quality (refactor, enhancements etc.) c++ Task related to the c++ part of the code base labels Nov 4, 2021
@dtebbs
Copy link
Contributor

dtebbs commented Nov 4, 2021

I was just addressing this as part of clearmatics/zecale#89 (comment). The main reason for these functions was to open the streams with the error-checking options (which is a couple of pretty annoying lines). This has now been wrapped in the libtool library (since I hit similar issues in the zeth tool code), so these functions are no longer required (and removing them results in less code).

See #418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Task related to the c++ part of the code base code-quality Task related to the code quality (refactor, enhancements etc.)
Projects
None yet
Development

No branches or pull requests

2 participants