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

IF: Miscellaneous code cleanups #1644

Open
greg7mdp opened this issue Sep 15, 2023 · 0 comments
Open

IF: Miscellaneous code cleanups #1644

greg7mdp opened this issue Sep 15, 2023 · 0 comments

Comments

@greg7mdp
Copy link
Contributor

greg7mdp commented Sep 15, 2023

I'd like to do a code cleanup pass when the HS files are not actively modified by many people. For example.

  • avoid excessive vector copies when aggregating/verifying signatures (include update fc & bls12 submodule to use std::span instead of std::vector for input parameters.
  • reduce number of calls to fc::crypto::blslib::aggregate when verifying a quorum_certificate (see evaluate_quorum)
  • update hotstuff.hpp class structure to the new version documented by Areg in IF: Redefine view number and add generation number to the finalizer set #1589
  • add simpler type aliases in hotstuff.hpp to make the code less verbose, for ex:
   using bls_public_key_t  = fc::crypto::blslib::bls_public_key;
   using bls_private_key_t = fc::crypto::blslib::bls_private_key;
   using bls_signature_t   = fc::crypto::blslib::bls_signature;
   using bls_key_map_t     = std::map<bls_public_key_t, bls_private_key_t>;
  • As discussed with Fabiana, HotStuff should be a standalone Finite State Machine (which can be tested independently and doesn't know about Leap or Controller), which internally maintains the separation pacemaker (liveness) and chain (safety), but imho these classes are tightly coupled and can be friend of each other.
    In addition there should be an interface class connecting Leap and the HotStuff FSM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants