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

Add functions to generate VRF Proof to PrivValidator-derived classes #6

Closed
torao opened this issue Dec 11, 2019 · 3 comments
Closed
Assignees
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code

Comments

@torao
Copy link
Contributor

torao commented Dec 11, 2019

To generate a VRF Proof, it needs to implement an additional function in a subclass derived from the PrivValidator interface that holds a private key to generate the signature.

The target subclasses derived from the PrivValidator are:

  1. FilePV has a key pair mapped to a local file and uses it to generate signatures.
  2. MockPV generates and keeps a key pair on the memory and uses it to generate signatures for tests.
  3. SignerRemote provides RPC functions to delegate signature to PrivValidator of the remote process.
  4. SignerValidatorEndpoint uses Mutex for each SignerRemote method call to acquire a monitor and synchronize it.

This issue is to add the GenerateVRFProof() function to these classes.

@torao torao self-assigned this Dec 11, 2019
@torao torao added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Dec 11, 2019
@torao torao added this to the Evolve Leader Election into VRF milestone Dec 11, 2019
@torao
Copy link
Contributor Author

torao commented Dec 13, 2019

The unit-test has been finished. I'll create PR after #4 will be merged.

@egonspace
Copy link
Contributor

Why is GenerateVRFProof() added to the subclass, not to PrivValidator itself?
If you add it to the subclass, ConsensusState has the subclass as field instead of PrivValidator, is it right?

@torao
Copy link
Contributor Author

torao commented Mar 23, 2020

PR #15 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: enhancement Classification: New feature or its request, or improvement in maintainability of code
Projects
None yet
Development

No branches or pull requests

2 participants