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

namespace barretenberg #475

Closed
codygunton opened this issue May 24, 2023 · 2 comments
Closed

namespace barretenberg #475

codygunton opened this issue May 24, 2023 · 2 comments

Comments

@codygunton
Copy link
Collaborator

codygunton commented May 24, 2023

Right now I think there is no real utility in having this namespace, and it should be split up, for instance, into ecc, polynomial, srs, bn254, grumpkin, secp256k1 and secp256r1. This is not urgent, but it has come up recently because of the asymmetry between barretenberg::fr/fq and grumpkin::fr/fq. Functions used for bn254 and grumpkin are being put in the barretenberg namespace, which is sort of awkward. Also, it's not like "barretenberg" is convenient to type, and it would surely be clearer people newly looking at the code to see bn254::fr in various places rather than barretenberg::fr.

What we should do is put everything in /src/barretenberg into the namespace barretenberg, and then we should move some things such as barretenberg::fr farther up the namespace chain.

@codygunton
Copy link
Collaborator Author

Follow-up: Charlie raised this on a call with me last week. He points out that everything in src/barretenberg should be in barretenberg namespace for when external consumers use Bb as a C++ library.

@codygunton codygunton changed the title namespace barretenberg is not useful namespace barretenberg everywhere Jun 14, 2023
@codygunton codygunton changed the title namespace barretenberg everywhere namespace barretenberg Jun 14, 2023
@codygunton
Copy link
Collaborator Author

Transferred to #794

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

No branches or pull requests

1 participant