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

VDFParams and VDF traits #14

Open
burdges opened this issue Mar 19, 2019 · 3 comments
Open

VDFParams and VDF traits #14

burdges opened this issue Mar 19, 2019 · 3 comments

Comments

@burdges
Copy link
Contributor

burdges commented Mar 19, 2019

Is there a reason for using the traits VDFParams and VDF over inherent methods? There are clear reasons to be generic over the group implementation, and ideally this should even be exposed, but afaik there is never any reason to being generic over the proof type.

@afck
Copy link
Collaborator

afck commented Mar 19, 2019

They do offer the same API, with the same semantics, so doesn't it make sense to make them implement the same trait, in case someone wants to make the VDF algorithm configurable?

@burdges
Copy link
Contributor Author

burdges commented Mar 19, 2019

I suppose but traits can hide more than desired too.

Just another idea: Avoid the separate params types and traits by making the params public in the VDF types, because the separate params types and traits seemingly do nothing. Also, expose the real functionality as inherent methods for the VDF types. If users want to change anything else, then they can reimplement VDF for some wrapper type with different parameters. At present, there are no other parameters, but the obvious ones include the group and some ownership function.

@afck
Copy link
Collaborator

afck commented Mar 19, 2019

Yes, that makes sense to me. 👍

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

2 participants