-
Notifications
You must be signed in to change notification settings - Fork 21
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
PoST package structure for v1.0 #116
Labels
Comments
From architecture discussion:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The package structure of PoST is quite confusing and could be improved for the next major release. I propose the following layout for clearer naming of types and generally reducing the number of individual packages a user of the library has to interact with:
post
: The root package containing the module definition, the initializer, all types and functions associated with it and everything that is currently inconfig
andshared
and doesn't fit and one of the following packagespost/internal
: Internal functionality not to be used directly by users of this library. This includes the bridges to the C and rust code and possibly other internal types and functions not intended to be available outside of the modulepost/internal/oracle
: The oracle should be an internal package since its use outside of generating and verifying proofs is limited and users of the library should call those functions over the oracle directly.post/proof
: Contains theGenerate
andVerify
functions, as well as theProof
andMetadata
types fromshared
.With this structure it is unlikely that a user of the library has to import more than one package at a time, while at the moment
proving
andverifying
also always require to also importconfig
andshared
both of which collide with packages with the same name in other modules.post.Config
is more meaningful thanconfig.Config
,proving.Generate
/verifying.Verify
are less clear compared toproof.Generate
/proof.Verify
.Also there is a clear dependency chain between packages of these structure:
post/proof
->post
->post/internal
The former packages only import the later and not vice versa.
The text was updated successfully, but these errors were encountered: