Skip to content

Runtime configurable BLS crate - attempt 2#182

Draft
ArtiomTr wants to merge 1 commit intograndinetech:developfrom
ArtiomTr:Runtime-configurable-bls-2
Draft

Runtime configurable BLS crate - attempt 2#182
ArtiomTr wants to merge 1 commit intograndinetech:developfrom
ArtiomTr:Runtime-configurable-bls-2

Conversation

@ArtiomTr
Copy link
Copy Markdown
Collaborator

So this is second attempt to create runtime configurable BLS crate (#181). Here backend is specified via global variable, so no need to specify backend when implementing traits like Default or TryFrom. However, bls backend must be set beforehand, otherwise setting other bls backend can mix backends, and panic. I can avoid panicking, by doing backward conversion - e.g., if somehow PublicKey::Blst was initialized, but PublicKey::Zkcrypto is needed, I can convert PublicKey::Blst -> PublicKeyBytes -> PublicKey::Zkcrypto. Such approach will never panic, but will have performance penalty for converting between backends.

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

Successfully merging this pull request may close these issues.

1 participant