[][src]Module solana_libra_types::crypto_proxies

This module defines a data structure made to contain a cryptographic signature, in the sense of an implementation of solana_libra_crypto::traits::Signature. The container is an opaque NewType that intentionally does not allow access to the inner impl.

It also proxies the four methods used in consensus on structures that expect to receive one such implementation directly.

The goal of this structure is two-fold:

  • help make sure that any consensus data that uses cryptographic material is defined generically in terms of solana_libra_crypto::traits, rather than accessing the implementation details of a particular scheme (a.k.a. encapsulation),
  • contribute to a single-location place for instantiations of these polymorphic types (crate::chained_bft::consensus_types)
  • help the consensus crate avoid generic parameters within the code, by avoiding propagating generic signature type parameters throughout the crate's code (as prototyped in https://github.com/libra/libra/pull/522), as generic types are seen as hindering readability.

Structs

SignatureWrapper

Functions

random_validator_verifier

Helper function to get random validator signers and a corresponding validator verifier for testing. If custom_voting_power_quorum is not None, set a custom voting power quorum amount. With pseudo_random_account_address enabled, logs show 0 -> [0000], 1 -> [1000]

Type Definitions

LedgerInfoWithSignatures
Signature
ValidatorChangeEventWithProof
ValidatorInfo
ValidatorSigner
ValidatorVerifier