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

Importing a VRF implementation #3215

Closed
ZenGround0 opened this issue Aug 9, 2019 · 2 comments
Closed

Importing a VRF implementation #3215

ZenGround0 opened this issue Aug 9, 2019 · 2 comments

Comments

@ZenGround0
Copy link
Contributor

Description

We need a secure ECVRF implementation to complete the consensus protocol (see spec). We should source this from an existing project.

I've just confirmed that the licensing for algorand's libsodium fork is compatible with go-filecoin's licensing. I recommend moving forward with this code.

Acceptance criteria

We can call the VRF endpoint functions: MakeProof, VerifyProof, VerifyKey from our go code.

Risks + pitfalls

We will need to use cgo. Algorand nodes are also calling this code so there shouldn't be too many complications coming from this.

The filecoin node needs to be able to have keys that work with VRF functions. A cursory glance shows that secp256k1 does not show up in the ECVRF spec. We'll need to look closer to see what is going on, but we might need to generate fully separate ticket signing keys, or move message signing to the underlying VRF scheme if we don't want multiple types of keys.

Managing this dependency should be done thoughtfully to avoid complexity. We can't reuse algorand's cgo work and directly import a subpath of the algorand node because it's GPL.
Perhaps we'll want a cgo bindings project that we can import that handles linking to the libsodium library. Alternatively maybe we want another submodule.

Where to begin

Make a plan for dependency management.
Understand the endpoints we want.
Familiarize yourself with cgo bindings as used elsewhere in the filecoin project.

@ZenGround0
Copy link
Contributor Author

Please see filecoin-project/specs#441 for discussion on which VRF construction to use. We might be rolling our own construction using BLS signatures internally which would resolve the multiple key complexity (all miner addresses would just be BLS). Stay tuned for the conclusion there.

@anorth
Copy link
Member

anorth commented Mar 1, 2020

Obsolete (we use BLS)

@anorth anorth closed this as completed Mar 1, 2020
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